linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Brox <tobias@stud.cs.uit.no>
To: linux-kernel@vger.kernel.org
Subject: PROBLEM: nfsroot.c + ipconfig.c (2.4.20)
Date: Wed, 23 Apr 2003 17:10:43 +0200	[thread overview]
Message-ID: <200304231510.h3NFAh430564@lgserv3.stud.cs.uit.no> (raw)

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)

             reply	other threads:[~2003-04-23 14:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 15:10 Tobias Brox [this message]
2003-04-23 16:33 ` PROBLEM: nfsroot.c + ipconfig.c (2.4.20) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200304231510.h3NFAh430564@lgserv3.stud.cs.uit.no \
    --to=tobias@stud.cs.uit.no \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).