The very first problem: couldn't find the right options in the kernel
configuration (using "menuconfig"). The documentation in
Documentation/nfsroot.txt is obsoleted, I would suggest this text to
be added to the first section:
===
On newer kernel releases, you will find "IP kernel level autoconfiguration"
under the section "Networking Options"/"TCP/IP Networking". You will have
to select this first, or the option "Root File System on NFS"
will not appear under "File Systems"/"Network File Systems"/
"NFS File System Support"/
===
Second problem: neither net/ipv4/ipconfig.c nor fs/nfs/nfsroot.c seemed to
care at all about the kernel parameters (though "root=/dev/nfs" seems
to be honored). They should have been called from the
checksetup(char*) function in init/main.c. According to debug output,
the checksetup function is run for each parameter at the command line,
but the corresponding setup functions in nfsroot and ipconfig is not
called.
The ipconfig logics is only started through the checksetup logics.
This is really weird, at this point of the execution, network drivers
haven't been loaded yet.
I hardcoded some values into the nfsroot.c, and forced ipconfig to be
started from nfsroot.c. Problems didn't stop there.
At nfsroot.c, function root_nfs_get_handle the "status"
value is returned if it is below zero. But what should the function
return if the status value is ok? I had to remove the if-test before
the mounting would work.
This is 2.4.20 with the gentoo-patches, compiled with gcc 3.2
After all my hacking and whacking, I finally got a kernel that managed
to find the IP address through DHCP, mount root through NFS using a
hard-coded server address and a hard coded path trailed with the last
digits of the IP address - but it did not want to mount other
NFS-partitions - the mount command would just freeze over.
(I'd appreciate CCs on any follow-ups)
-- Check our new Mobster game at http://hstudd.cs.uit.no/mobster/ (web game, updates every 4th hour, no payment, no commercials) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/