Bug 207341 - mkinitrd: Network Driver Detection prior to NFS Mount
mkinitrd: Network Driver Detection prior to NFS Mount
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
:
Depends On:
Blocks: K12LTSP
  Show dependency treegraph
 
Reported: 2006-09-20 15:12 EDT by Warren Togami
Modified: 2008-02-18 17:31 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-18 17:31:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Warren Togami 2006-09-20 15:12:32 EDT
For many years LTSP has used a single initrd image for all thin clients.  This
generally works very well, especially when you care only about PCI cards.

It would be great if we can implement similar functionality in Stateless to
detect and load the appropriate driver during the initrd stage for any network
card.  LTSP (<= 4.2) has used a tiny binary called scan_pci that has its own PCI
ID list, and loads the appropriate driver before nfs root boot during initrd. 
Ubuntu uses udev during initrd to detect devices and load the appropriate driver.

I'm currently using an ugly hack of many --preload= lines which attempts to load
every ethernet driver prior to nfs mount.  It usually works in the simplest case
(single ethernet card in thin client), but this of course is not an acceptable
solution for the long-term.

Any opinions of how we should implement support for including a list of network
drivers, then detecting and loading the right driver prior to nfs mount?

No time to do this for FC6, targeting to FC7.
Comment 1 Peter Jones 2006-09-25 13:47:59 EDT
Before mkinitrd can reasonably do that, we need a method of querying the modules
to see what we should consider candidates to bring in, rather than having a
static list of all "network modules".  How do you propose to do that?
Comment 2 Jeremy Katz 2007-10-04 11:22:56 EDT
I've got an implementation that will work for doing this based off of mkinitrd's
bash-branch.  We just need to merge those changes over early in F9 and this can
be done.

Doing it for F8 is pretty risky at this stage, though, as it's a pretty big
change to how mkinitrd works.
Comment 3 Warren Togami 2007-11-07 23:24:00 EST
# If we have ide devices and module ide, do the right thing
ide=/proc/ide/ide*
if [ -n "$forceide" -o -n "$ide" -a "x$PROBE" == "xyes" ]; then
    findmodule -ide-disk
fi

This code never did work properly.

1) ide=/proc/ide/ide* makes $ide == "/proc/ide/ide*", it never did probe.
2) As a result of that, -n "$ide" always was true.
3) /proc/ide doesn't even exist now.
4) ide-disk module doesn't exist now either.

Should we just remove this block, --force-ide-probe and PROBE?
Comment 4 Warren Togami 2007-11-08 00:50:16 EST
http://fedorapeople.org/~wtogami/mkinitrd-bash/

commit e78ceca815fd704f8ae1ae692d08c239287e3c74
Author: Warren Togami <wtogami@redhat.com>
Date:   Thu Nov 8 00:44:08 2007 -0500

    if /sbin/busybox exists, copy it in for debugging
    it contains many useful debugging commands like
    openvt, dmesg, lsmod, ifconfig, etc.

commit 065fbf53a83355493021c88e24194fee6992491d
Author: Warren Togami <wtogami@redhat.com>
Date:   Thu Nov 8 00:16:10 2007 -0500

    s/network/nash network/

commit 125b29316b8c830888dc9a98d97b07d9bec20721
Author: Warren Togami <wtogami@redhat.com>
Date:   Thu Nov 8 00:02:14 2007 -0500

    Make this error check actually work as intended.

commit e0bd7adc1b0ba7ee986b2295a476258676fc4319
Author: Warren Togami <wtogami@redhat.com>
Date:   Wed Nov 7 17:05:40 2007 -0500

    seq is needed always, not just during $live
Comment 5 Warren Togami 2007-11-08 00:55:40 EST
DHCPACK from 172.31.100.254
bound to 172.31.100.224 -- renewal in 9674 seconds.
mount: wrong fs type, bad option, bad superblock on 172.31.100.254:/opt/ltsp/i386,
         missing codepage or helper program, or other error
         In some casees useful info is found in syslog - try
         dmesg | tail  or so

qecho Creating root device.
nash mkrootdev -t nfs -o defaults,ro 172.31.100.254:/opt/ltsp5/i386
qecho Mounting root filesystem.
mount /sysroot

The equivalent is working with mkinitrd-6.0.19-4.fc8.  Trying more on this tomorrow.
Comment 6 Warren Togami 2007-11-19 23:05:33 EST
git clone http://fedorapeople.org/~wtogami/mkinitrd/
If you want to try my branch... be sure to build the entire package, because
nash is incompatible with the standard mkinitrd nash.
Comment 7 Warren Togami 2008-01-16 00:10:38 EST
https://bugzilla.redhat.com/show_bug.cgi?id=424591
Proposed patches for upstream mkinitrd is over at this other bug.
Comment 8 Warren Togami 2008-02-18 17:31:56 EST
The original purpose of this bug is now fixed in mkinitrd for F9.  Closing.  The
NBD part continues in Bug #424591.

Note You need to log in before you can comment on or make changes to this bug.