view · edit · print · history

SlugOS boot from NFS

NFS roots are not officially supported with SlugOS 4.8.

Unofficially, here's a hack provided by mvester that can get it working.

Start from a fresh flash, and install the necessary stuff for NFS (the nfs, sunrpc, portmap, and lockd kernel modules) to the internal flash. you can do this by doing ( ipkg install kernel-module-nfs )

It may be necessary to do

   modprobe nfs

to ensure that nfs (+ sunrpc and lockd which depend on it) are properly loaded,
and it may be necessary to do

   /etc/init.d/portmap start

(or reboot) if portmap is not running.

Run turnup as described

turnup nfs -i server:/root-filesystem

Once you've done the turnup to the nfs partition, cd to the /boot directory (on the flash), and edit the /boot/nfs file, so that it looks like the one below (addition of lines 9, 11, 12, and 19).

Now on the nfs root filesystem (which is probably easiest to access from the NFS server itself at this point), edit the etc/network/interfaces file, and comment out or remove the "auto eth0" line in that file. Reboot, wait for the triple-beep that would indicate a sucessful boot.

01) #!/bin/sh
02) # boot from the nfs partition "$1" (which
03) # must be given) using options from the rest of
04) # the command line.
05) #
06) # Use the standard init path (see /etc/init.d/rcS)
07) export PATH=/sbin:/bin:/usr/sbin:/usr/bin
08) #
09) mount -t proc proc /proc
10) . /etc/default/functions
11) modprobe ixp4xx_mac
12) modprobe nfs
13) leds boot system
14) #
15) if /boot/network
16) then
17) # network is up and running, the NFS mount will
18) # now succeed (possibly), use /boot/disk
19) exec /boot/disk "$@"
20) fi
21) # fallback - use the flash boot
22) leds beep -f 1000 -r 2
23) exec /boot/flash

view · edit · print · history · Last edited by peter taylor.
Based on work by Charles Lindsey, toms, and x.
Originally by toms.
Page last modified on October 21, 2008, at 01:49 PM