Before you get started, here are some files of interest:
NFS-Root-Client HOWTO
NFS-Root HOWTO
http://www.ltsp.org/download/lts/doc/lts-sf.html
Diskless-HOWTO.html - good section on how to troubleshoot init problems
http://www.linux-embedded.com
My server is running RedHat 7.0, kernel 2.2.16-22 and the IOs are running kernel 2.3.99-pre9 with
a special pegasus patch to get stable USB ethernet. The more recent
2.4 kernels seem to work fine with the IO but I haven't switched them
over yet. When you build the kernel, here are the relevant options.
Most of the drivers can be loaded using modules except for the USB
ethernet support.
CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y
CONFIG_ROOT_NFS=y (this enables NFS for the root filesystem - see the
help for this topic!)
CONFIG_DEVFS_FS=y
CONFIG_RAMFS=y
CONFIG_USB_UHCI=y
CONFIG_USB_PEGASUS=y
Here's the lilo.conf for IO:
boot=/dev/hdb
timeout=20
prompt
default=kern3
disk=/dev/hdb
bios=0x80
vga=1
image=/boot/vmlinuz-2.3.99-pre9devfssound
label=kern3
read-only
append="nfsroot=192.168.1.1:/tftpboot,rsize=1024,wsize=1024"
The server is at 192.168.1.1 and the IO's filesystem is at /tftpboot
on the server. The rsize and wsize were required to get stable
ethernet working over USB, which you may or may not need depending on
your USB ethernet adapter.
The HOWTOs recommend keeping the entire filesystem separate between
the server and the clients. I chose a mix and made separate entries
under /tftpboot on the server for /bin, /etc, /lib, /sbin and I shared
/usr, /home between the IO and the server. Whenever I update binaries
on the regular server filesystem, I just copy over the contents of
/bin, /lib, and /sbin to the versions in /tftpboot. I use devfsd on
the IO to generate the entries in /dev. One of my common mistakes is
that I accidently delete the /tftpboot/sbin/devfsd when I copy over
/sbin from the server. You could probably get away with keeping
everything except /etc the same between the IOs and the server if
you're careful.
I had to use an older version of LILO (version 21) for putting the
kernel image on the Sandisk. The version on my server (21.4-4) didn't
work with the IO. Once you get a version working, you can carefully
add new kernels to the IOs Sandisk. I used a hard disk on the IO to
get the Sandisk programmed the first time but there are probably some
other clever ways.
The only files on the IO's Sandisk are:
/boot: boot.0300, boot.0340, boot.b, map,
vmlinuz-2.3.99-pre9devfssound
/etc: lilo.conf
/dev: hdb (this is needed to get things started I guess)
There are empty directories for /lib, /mnt, /proc, /root, /sbin, /tmp,
/usr.
My /tftpboot/etc/fstab looks like this (host1 is the name of the server):
/dev/hdb1 / ext2 defaults,ro 1 1
ramfs /tmp ramfs defaults,rw 0 0
shm /var/shm shm defaults,rw 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/ram0 /tmp ext2 defaults,rw 0 0
host1:/usr /usr nfs rsize=1024,wsize=1024,user,owner,exec,dev,suid,ro 1 1
In /tftpboot/etc/rc.d/rc.sysinit, I added these lines at appropriate
places:
# Mount the devfs filesystem
mount -n -t devfs none /dev
/sbin/devfsd /dev
echo 'Setting up ramdisks: '
mount ramfs /tmp -t ramfs || echo 'Failure to mount /tmp ramdisk'
chmod a+rwt /tmp
mkdir /tmp/var
chmod a+rxwt /tmp/var
mkdir /var/shm
mount -t shm none /var/shm || echo 'Failure to mount shared memory fs'
cd /tmp/var
mkdir log
mkdir log/news
ln -s log adm
mkdir lib
mkdir lib/xkb
mkdir lock
mkdir lock/subsys
mkdir run
mkdir share
mkdir share/etc
mkdir share/etc/X11
mkdir share/etc/home
mkdir share/etc/home/user
mkdir spool
mkdir spool/cron
mkdir spool/cron/crontabs
ln -s /tmp tmp
I use xdm along with xfs to serve X apps from the server to the IOs. That is another
subject but that part is not too hard to figure out.
I'm sure there's many more details I forgot but hopefully this is
enough to get you going. The links at the beginning give a pretty
good overview of the big picture. Good luck!