On Sun Jun 25 2000 at 19:12, NISHIDA Wataru wrote:

> I'm trying to setup a Linux box using initrd and NFS-root capabilities.
> What I want to do is
>   1. Boot up with minimum kernel and mount an initial root file system using initrd.
>   2. Select NIC modules, and enter network parameters.
>   3. Load required modules and switch to NFS-root.

Last time I tried to do it like this, it simply didn't work (and I
wasted a LOT of time trying).  The ONLY way I could get it to work,
was to compile the nfs-root stuff (arp, bootp etc - like you have
done) into the kernel, along with the necessary ethernet drivers.
The main problem was getting the kernel to do the bootp stuff
*after* loading the drivers etc.  And actually specifying network
config at this point is rather a useless waste of time (that's what
dhcpd/bootp is for!)  And I couldn't get it to switch / to an
nfsroot filesystem once I had the kernel booted from an initrd.
(Disclaimer: this is all over 12 months ago, not recently).

> First, I made a simple root file system and a boot disk for initrd and
> confirmed root switching function using..
> # echo 0x303 > /proc/sys/kernel/real-root-dev

Use rdev on the kernel image itself.

> However, I could not identify nfs-root-name and nfs-root-addres
> in /proc/sys/kernel.

You need to make a /dev/nfsroot (/dev/boot255) device file.
It is all nicely documented in the kernel source docs:

        /usr/src/linux/Documentation/nfsroot.txt

Just reading that should get you up and running.

The real trick is getting all the NFS stuff set up so that the
kernel can actually find it all and successfully run from it.  When
it does work, it is *magic*  :)

> The kernel is 2.2.16 and CONFIG_IP_PNP, CONFIG_ROOT_NFS, and
> CONFIG_NFS_FS options were compiled in.

Cool, needed.  Along with the nic drivers.

> Any additional parameter(s) is required for nfs-root-* assignment?

Read the diskless HOWTO, it explains all.  (So do the beowulf and
other such HOWTOs).

You DO need to run rdev on the boot kernel image, and it does need
the drivers and networking compiled into it.

You can't use an initrd at this point (well I couldn't, not without
a lot of trickery... I do have it working with PXE, but that's
quite another story, since even the kernel image is obtained over
the network and there's no real hassles using initrd images with it).

> Thanks in advance.

Good luck, all the best.  This is fun stuff (well, at least I have
fun with this at times when I get to play with it... but don't tell
the boss that I actually *enjoy* it :)

Cheers
Tony
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to