I am a great fan of NFS, and having moved most of my PCs over to linux, use NFS exclusively on my ubuntu based servers. Found my open source floppy of NASLite-NFS yesterday and threw it at a virtual machine just for fun. The installation and setup reminded me just how easy it is to get going, and to end up with a fully fledged NFS file server on your LAN.
Security isn’t great, you’ll have to run behind a LAN and firewall to prevent unauthorised access, but I have found nothing much better for turning a cruddy old PC into something useful.
Note, if the command is in quotes, remove the quotes when typing or pasting!
Here is the setup process:
1. Cruddy old PC with any number of hard drives, a floppy drive and wired network card connected to the network
2. Accept that all existing data will be overwritten
3. Floppy disk
4. Copy of the NasLite-NFS Floppy Image
1. First get the image onto your floppy on another PC, I use Xubuntu 8.10 at present
2. On Ubuntu 8.10+ you need to enable the floppy drive so “sudo modprobe floppy”
3. Unzip the zip file to reveal the .img file and then issue the following command in a terminal:
“dd if=/tmp/fd0.img of=/dev/fd0” (assumes img file is in the directory /tmp/)
“dd if=/tmp/fd0.img of=/dev/fd0u1722” (if img is 1.7mb)
You might need to sudo this command if it doesn’t work
4. Take the floppy to your cruddy PC and stick it in the floppy drive. it needs to stay there from now on.
5. Start up the cruddy PC and let it boot from floppy (you may need to edit the bios if it doesn’t)
6. You will eventually get a screen that looks like this:
7. Login is admin Password is nas
8. This will then bring you to the configuration screen:
9. Work your way through the selections as follows:
9.1 Change Network Settings. Adjust the IP address of you NAS box accordingly. I am running in the 10 range soafter selecting 1 and pressing Enter I typed 10.10.10.22 255.255.255.0, ensuring I had a single space between the IP and the mask, then press Enter again, you’ll get a confirmation so press Enter again. Use whatever IP range your LAN is in.
9.2 Change Name. If you want to change the name of the NAS box type 2 then Enter. I choose to be nice and original and called it NASBOX.Press Enter when done, and Enter again to confirm. If you are on a linux clinet, the name won’t matter too much as you will have to mount the shares to directories in any case.
9.4 Configure Storage Disks. This is the biggie! I have one disk on board, the primary master. Type 4 and then 1 and press Enter. Type y to confirm and then NASLite does its stuff to configure the disk. Press Enter again to confirm. if you have more than one disk on board, repeat this process for each disk.
9.5 Change Password. Best to do this to prevent other users messing with your settings. Follow procedure much the same as for Change Name. As you can see from the screenshot I entered a weak password 🙂
9.9 Save Configuration. Your configuration data is saved to the floppy, so make sure it is in the floppy drive. Type 9 and you will see a summary of your configuration. Type y to save settings, and press Enter to confirm.
10. Ready to restart now
Type 7 and confirm the reboot with a “y”
The PC will boot back up to the login in screen, but you don’t need to do anything else, your NAS is up and running.
The Disk-1 line is the read/write disk you created in step 9.4. There won’t be any files in there because that’s your next job! The Info line is worth a click as it will show you all sorts of information about your NAS box. Follow each of the links to find out.
You will also be able to browse files on your NAS from this interface and “download” them.
Setting up the nfs share on your client PC (assumes Ubuntu derivative)
Open up a terminal…
Install as follows:
“sudo apt-get install portmap nfs-common”
Create directory to mount the share:
“sudo mkdir /media/NASBOX” (you can call it whatever you like)
To manually mount your share, type as follows:
“sudo mount 10.10.10.22:/export/Disk-1 /media/NASBOX”
(don’t forget the “export” directory, its not obvious at first)
You can now use your clients file manager to copy files to and from your NAS box.
To make the mount permanent you will need to edit your /etc/fstab file:
“sudo nano -w /etc/fstab”
at the bottom of the file enter the following:
“10.10.10.22:/export/Disk-1 /media/NASBOX nfs rsize=8192,wsize=8192,timeo=14,intr,bg”
Do this on other PCs as necessary. That’s it