[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NFS root and initrd

On Thu, 2004-02-12 at 12:59, Carlos O'Donell wrote:
> Adam,
> > I'm having trouble setting up an initrd for NFS root in a diskless
> > cluster.
> Why bother? Just build in everything that you need immediately at boot.
> It's what I've always done for the diskless systems. You have to waste
> more memory mounting a local shmfs to unpack the root fs and install the
> modules. It's a hassle with no reward? Unless you have some good
> reason... ?

Well, because I'm lazy, and want to be able to use stock Debian kernels.
But not lazy, and slightly obsessed at this point, so I'm putting some
time into it now. :-)

Okay, I've got quite a bit further.  I bloated the initrd quite a bit,
but managed to get it to use /etc/network/interfaces to bring up the
network, and to mount root and /etc just fine, even with a stock kernel
image and using DHCP to get an address.  All you need to do is put the
attached "nfs" file in /etc/mkinitrd/scripts, and add your net driver
module, nfs, and af_packet for DHCP to /etc/mkinitrd/modules (mkinitrd
in woody isn't smart enough to copy those modules into the initrd, but
sarge's works).  Then install the kernel, make an NBI using the
resulting ramdisk, and you're in business.

Next problem: when it exits from /linuxrc in the initrd, I get:
Warning: unable to open an initial console
lockd: cannot monitor
lockd: failed to monitor
(and the last two lines repeat a few times)

Searched a bit, and people seem to think this happens when devfs isn't
mounted. But /dev is mounted with devfs.  Any idea what else it could
be?  Or is cheating with pivot_root to get NFS root on a non-NFS-root
kernel just never going to work?

One other thing: /initrd/var won't unmount because it's busy, presumably
with dhclient and/or mount stuff.  Perhaps this is interfering?

-Adam P.

GPG fingerprint: D54D 1AEE B11C CE9B A02B  C5DD 526F 01E8 564E E4B6

Welcome to the best software in the world today cafe!

Reply to: