NFS booting debian [Re: Warning "Contains linux content" Was: Re: [OT] Re: [plug] File Conversions}

Joshua Chase joshych at
Sun Jun 24 08:48:29 WST 2007

changed to title the appropriate.

Daniel Foote <freefoote at> wrote: > I have 2 storage boxes here, one has 15 250GB drives in a RAID-6 and one has 4 200GB in a RAID-5. I
> used to have 2 complete copies of the nfs-root and mount them separately. Now I use a single
> initramfs and a very early script in rcS.d that sets whatever parameters are different between the 2
> boxes based on eth0 mac address (mainly hostname actually).

In the case of my two boxes, I was running X on them. Naturally, one
has a built in Intel chipset, and the other a Savage. Two additional
lines to /etc/init.d/gdm, and I get a different xorg config per MAC

MACADDR=`ifconfig | grep HWaddr | awk '{print $5}'`
export XORGCONFIG="xorg.$MACADDR.conf"

Users are served up by NIS from my fileserver, as are the home directories.

> The kernel is non-modular and I have the drivers for both boxes built in, so PXE loads the one
> kernel then loads the initramfs and away they go.

I used the Shipped Debian Kernel and corresponding initrd, rather than
compile my own. You have to have the initrd to be able to mount the
NFS root, as it's not built in the default Debian kernel. I chose to
do it this way because I wanted easy upgrades to the kernel in the

> > I was also a few weeks ago trying to netboot an ancient 386 just for
> > kicks, and was thinking of using a very small initrd for it's root. So
> > far, I've made the machine boot a kernel, but that's about it. I have
> > two things working against me: the machine has 8MB of RAM, and Debian
> > is compiled for 486 or better machines these days... resulting in code
> > that won't run on that machine... I had to manually compile a kernel
> > for it, but 2.6.21 boots quite happily on it.
> Hrm.. you will be pretty tight, even my Belkin ADSL router has 16mb of ram. An nfs root will be ok,
> but you *will* need swap, and swap over nfs particularly on small memory machines has a tendency to
> deadlock. I had better luck with swap over nbd but there is still a theoretical deadlock there (not
> that I ever hit it).

Thanks for that - I'll look into it.

> My biggest issue converting a debian install to initramfs was making udev work properly, and that
> was a matter of adding a single line in /etc/udev/udev.conf
> no_static_dev="1"
> Once I did that it "just worked".
> I've had a play with a few extra bits and bobs to make the root visible (which it's not by default
> if you just use a single initramfs). Without a visible root, apt-get would not run as it could not
> tell how much space it has to play with.

I didn't need to make the 386 do much at all (this was all a bit of
lark, anyway) - basically, busybox would be fine by itself. I guess
I'll have to try Linux-from-scratch into a chroot to keep the size
down, and compile it for 386.

Thanks for your scripts, I'll have a look into it when I get some time
this week.

Daniel Foote.
PLUG discussion list: plug at
Committee e-mail: committee at

Yahoo!7 Mail has just got even bigger and better with unlimited storage on all webmail accounts. Find out more.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the plug mailing list