Next Previous Contents

11. NFS server on a floppy

This section was written by Ron Peters, rpeters@hevanet.com It explains how to set up an NFS server when booting up from floppy. It was originally devised to be able to NFS share a cdrom from another non-Linux/UNIX machine to install Linux on a machine that does not have a cdrom.

11.1 Introduction

This document is being created for those who will run into the same problem I had recently. I was building a Linux server on a machine that didn't have a cdrom and has no facility for adding one except for possibly an external SCSI or the like. Now that it is getting less and less likely that you will be installing on a machine like that, this document may not be that valuable. However, I would have appreciated it when I was trying to build my machine.

Since my machine didn't have a cdrom drive, I thought I would go find an NFS server for Win95 and share the cdrom for long enough to install the box and get it on my network. Of the two products I found, (I'm not mentioning names but one was freeware and the other was a 14 day limited license), one didn't work out of the box, and the other couldn't handle the Linux naming convention well enough to complete the install.

I then settled on trying to boot my Win95 machine with the boot/root set of disks and then use a suplimentary floppy to set up the NFS server.

This was remarkably simple, and the procedure is probably easier than reading this introduction but I believe that putting the whole procedure in one place will be value added.

11.2 Expectations

This document was derived using the boot/root disks from one of the current InfoMagic developer distributions of Slackware. I used kernel version 2.0.34 for the boot/root disks, but the NFS server programs were taken from a 2.0.30 server. I have always used the Slakware installation method, not because it is any easier or better or worse, just that I am comfortable with it and I haven't taken the time to try another method.

I don't believe that there will be many problems using this document in relation to OS version. I would recommend using something relatively current. Since it is likely that this will be used for installation, a current boot/root set will likely be used.

Your mileage may vary.

11.3 Requirements

11.4 Server Setup

Boot the temporary NFS server

Boot the NFS server system from boot floppy and make sure the network card is recognized. It is also necessary that the CDROM be recognized. I will use eth0 as the example network card.

Mount the floppy and cdrom

Once the system is booted up, the boot/root floppies are not needed. The system is fully contained in RAM.

Replace the root floppy with the suplimentary disk. Mount the floppy:

mount /dev/fd0 /floppy

This assumes that the floppy is an ext2 file system type. I imaging that the suplimentary disk could be a DOS floppy with the files on it, but I haven't tried that yet. I imagine that this would be easier that a disk image. In this case, it would be a mount -t msdos ...etc. This should probably be put in the todo section.

Mount the cdrom:

mount -t iso9660 /dev/hdc /cdrom

The floppy and cdrom devices are the ones I used. These may be different depending on application. The mount points /floppy and /cdrom exist on the root floppy disk image so they can be used. If they don't, create them or you could use any mount points you like.

Set up networking on the temporary server.

This is where the temporary NFS server is set up to talk on the network. There are only a few commands to run. There are a few items of information that you will need before running the commands (values are examples):

IPADDR:172.16.5.100 #This is the address of the temporary server.

NETMASK:255.255.255.0 #This is the netmask.

BROADCAST:172.16.5.255 #The last number (255) is significant from IPADDR.

ETHNETWORK:172.16.5.0 #Once again, slightly different from IPADDR.

GATEWAY:172.16.5.251 #Only needed if you have a gateway. You will probably know. Most home networks won't have a gateway.

The commands to get on the network. Insert values from above:

ifconfig eth0 inet IPADDR arp netmask NETMASK broadcast BROADCAST

route add -net ETHNETWORK netmask NETMASK eth0

Only use next command if you have a gateway and need to go through it:

route add default gw GATEWAY netmask 0.0.0.0 eth0

If all goes well, you are now on the network and should be able to ping other nodes.

Set up the NFS share.

Determine the directory that you want to NFS share. In the case of the my example, I used the /cdrom/slakware directory. Put this directory in the /etc/exports file:

echo "/cdrom/slakware" > /etc/exports

11.5 Run the NFS server

Go to /floppy/usr/sbin and run:

./rpc.portmap

./rpc.mountd

./rpc.nfsd

Complete, start the install.

This should share the "/cdrom/slakware" directory in the /etc/exports file. Once this is done, you can now boot up the machine to be installed from boot/root floppies (I used same ones that I booted NFS server with) and start the installation.

Once you are ready to choose the media source location, choose the NFS server option. It will ask about the ip address of the server. Give it the IP address that you used as IPADDR for the server. It will also ask for the directory to be mounted. This is the directory you put in the /etc/exports on the NFS server.

The system will then NFS mount the server. Watch for any error messages. All should be complete and you can continue the installation.

11.6 Troubleshooting

Nothing Here Yet.

I don't have any troubleshooting info yet. Perhaps as people use this procedure, there will be more tips and hints available.

11.7 To Do

DOS Disk.

Check out a DOS disk for the suplimentary disk.

rpc commands.

Check out specific order of running rpc.* commands and if all or just some of the command needs to be run.


Next Previous Contents