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

* Re: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Trond Myklebust @ 2003-04-23 16:33 UTC (permalink / raw)
  To: tobias; +Cc: linux-kernel


Read the fine HOWTO:

   ftp://ftp.uninett.no/pub/linux/docs/HOWTO/mini/NFS-Root

Cheers,
  Trond

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

* Re: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Tobias Brox @ 2003-04-26 10:33 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-kernel

[Trond Myklebust - Wed at 06:33:39PM +0200]
>    ftp://ftp.uninett.no/pub/linux/docs/HOWTO/mini/NFS-Root

I'm pretty sure my problems stems from something fishy in the kernel
code, not simply because I don't know what I'm doing.

The FAQ above is not much up-to-date, either.  I have a creeping
feeling that the nfsroot feature is not much used together with the
more recent kernel versions, as most modern computers are equipped
with harddisks.  I'd like to hear success-stories from people that
have managed to do a diskless boot with a kernel of version 2.4.20 or
more recent.

According to a an earlier mail to this list (available at
http://www.geocrawler.com/archives/3/35/2001/6/0/6079479/ ) ipconfig
should be called from init/main.c:checksetup() - I can say for sure
that this does not take place, regardless of what options I feed the
kernel with.

In the 2.5.66-version of the kernel, the function above has been
renamed to obsolete_checksetup.

When booting up with 2.5.66, it also fails to load the network driver
in time.  I know I have compiled the right driver into the kernel (and
not as a module).

-- 
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

* Re: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
  2003-04-26 10:33   ` Tobias Brox
@ 2003-04-26 10:39     ` Tobias Brox
  2003-04-29 12:28     ` Hans-Peter Jansen
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Brox @ 2003-04-26 10:39 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-kernel

[Tobias Brox - Sat at 12:33:56PM +0200]
> I'd like to hear success-stories from people that
> have managed to do a diskless boot with a kernel of version 2.4.20 or
> more recent.

Oh .. for the record: after hacking a bit around, I did manage to boot
up disklessly with 2.4.20 - but when trying to mount other
NFS-partitions run-time, the mount-command hangs.  (This problem does
not occur when booting up with the same kernel on a computer with a
disk)

-- 
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

* Re: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
  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
  1 sibling, 1 reply; 6+ messages in thread
From: Hans-Peter Jansen @ 2003-04-29 12:28 UTC (permalink / raw)
  To: tobias; +Cc: linux-kernel

[Cutted Trond, since he's surely busy with more important things]

On Saturday 26 April 2003 12:33, Tobias Brox wrote:

> with harddisks.  I'd like to hear success-stories from people that
> have managed to do a diskless boot with a kernel of version 2.4.20 or
> more recent.

No problem here with 2.4.20, 2.5.any not yet tested. I'm doing diskless 
since ages, but my setup seems to vary from yours. In short, I'm using 
etherboot, tftp and mknbi. E.g.:

mknbi-linux $kernelimg $ramdisk --rootdir="/netboot/%s,v3" --ip=rom \ 
--append="$append"

%s gets replaced by the loader with the systems ip address. It refers to 
a symbolic link, which is pointing to the real root dir.

I'm able to boot standard distri (install-) kernels (SuSE) this way, 
which makes updating a hitch, through I prefer to run my home rolled.

Mangling a standard distri to run diskless is a bit of a hassle, but no
real problem either.

Cheers,
Pete

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

* Re: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
  2003-04-29 12:28     ` Hans-Peter Jansen
@ 2003-04-29 12:37       ` Tobias Brox
  0 siblings, 0 replies; 6+ messages in thread
From: Tobias Brox @ 2003-04-29 12:37 UTC (permalink / raw)
  To: Hans-Peter Jansen; +Cc: linux-kernel

[Hans-Peter Jansen - Tue at 02:28:03PM +0200]
> No problem here with 2.4.20, 2.5.any not yet tested. I'm doing diskless 
> since ages, but my setup seems to vary from yours. In short, I'm using 
> etherboot, tftp and mknbi. E.g.:
> 
> mknbi-linux $kernelimg $ramdisk --rootdir="/netboot/%s,v3" --ip=rom \ 
> --append="$append"

One more question; do you mount other nfs-partitions after booting?

I should probably try to play a bit more around with nfsroot.  As for
now, I skipped it completely, and chose to rely on initrd instead.  I
get grub to download a (quite big) initrd from the server, and then
it's passed to the kernel as the root system.  After booting, I can
put up network and mount partitions through nfs.

-- 
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).