linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
@ 2003-04-23 15:10 Tobias Brox
  2003-04-23 16:33 ` Trond Myklebust
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Brox @ 2003-04-23 15:10 UTC (permalink / raw)
  To: linux-kernel

I tried to create a GRUB boot floppy that would download the kernel
from a server, mount the root partition over nfs and then mount other
nfs partitions later.

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)

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-04-29 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-23 15:10 PROBLEM: nfsroot.c + ipconfig.c (2.4.20) Tobias Brox
2003-04-23 16:33 ` Trond Myklebust
2003-04-26 10:33   ` Tobias Brox
2003-04-26 10:39     ` Tobias Brox
2003-04-29 12:28     ` Hans-Peter Jansen
2003-04-29 12:37       ` Tobias Brox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).