Bug 44760 - move usb initialization to initrd
move usb initialization to initrd
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-06-16 04:18 EDT by Joerg Dorchain
Modified: 2014-03-16 22:21 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-06 11:59:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joerg Dorchain 2001-06-16 04:18:18 EDT
Description of Problem:
in /etc/rc.d/rc.sysinit around line 155  usb is inititalized with the help
of modprobe.
modules.dep is only created around line 360 by depmod. This gives errors
when booting with a self compiled kernel for the first time.

How Reproducible:
cd /usr/src/linux
rm -rf /lib/modules/*
make modules modules install
reboot

Watchout for a line containing modules.dep
Comment 1 Bill Nottingham 2001-06-17 22:06:18 EDT
modules.dep is done in the %post of redhat kernels.

It's *also* done by 'make modules_install'.
Comment 2 Joerg Dorchain 2001-06-18 04:45:56 EDT
What is executed by make modules_install is
if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.4.5; fi

Imagine you are running an old kernel while compiling a new one. To have a
functional system with only one reboot you do
make modules; make modules_install;make bzlilo; reboot
In this situation no modules.dep is created by the kernel makefile, only by the
initscripts aftere reboot. (BTW, it worked perfectly with RH6)

With your argumentation, I understand that my usual kernel update procedure is
not supported by Redhat. Does this mean only kernel-rpms are possible with a
RH-based system without manually hacking initscripts? (At least, not customer
friendly)
Besides, for the same reason you should drop the whole depmod stuff out of
rc.sysinit "as all there is to do is already done somewhere else"

FYI, I expected an answer like "Thanks, we will move the depmod creation stuff
before the usb initialization", which is IMHO the Right Way(tm) (IMHO it was a
programming policy of Redhat not do any modules stuff before modules.dep was
initialized.)
Comment 3 Bill Nottingham 2001-06-20 16:47:30 EDT
You can't do that; the root FS is read-only when the USB initialization is done.

FWIW, your example will work fine if you build the new kernel *before* running
'make modules', so the system map will be there.
Comment 4 Joerg Dorchain 2001-06-20 17:48:19 EDT
I consider this broken by design. When usb init needs modules, it needs
modules.dep. This is generated by depmod, which in turn needs a writeable /.

For me it follows that you should move usb initialization behing depmod and
think about other solutions for having usb-devices with the /-filesystem (e.g.
linuxrc or initrd magic)
Console etc should be avialable right from the start of rc.sysinit
Comment 5 Bill Nottingham 2001-06-20 17:53:24 EDT
If you move usb initialization, then you don't have a functioning console
if fsck fails.
Comment 6 Joerg Dorchain 2001-06-20 18:06:23 EDT
Thats why I proposed to move usb-console to initrd and linuxrc, just like some
scsi-drivers. This initrd might be build by a runlilo script/package.

Ok, this probably won't make it as an update with 7.1 ;-)
Comment 7 Bill Nottingham 2001-06-20 18:08:52 EDT
Hm... that may be doable. Reopening as an enhancement request. :)
Comment 8 Aleksey Nogin 2001-08-19 16:42:44 EDT
Another related problem is that depmod -a is also needed to create/update
/lib/modules/`uname -r`/modules.usbmap
and if some USB device (for example, printer) is plugged in at boot time, it
would not get initialized properly. This means that with usb solution we might
need to put all usb modules onto initrd or, alternatively, force a second look
at theUSB devices once modules.usbmap is available.
Comment 9 Bill Nottingham 2004-08-06 11:59:30 EDT
Hm, at this point, USB keyboard and mouse are built in, so this should
work ok.

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