Bug 44760 - move usb initialization to initrd
Summary: move usb initialization to initrd
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-06-16 08:18 UTC by Joerg Dorchain
Modified: 2014-03-17 02:21 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-06 15:59:30 UTC
Embargoed:


Attachments (Terms of Use)

Description Joerg Dorchain 2001-06-16 08:18:18 UTC
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-18 02:06:18 UTC
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 08:45:56 UTC
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 20:47:30 UTC
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 21:48:19 UTC
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 21:53:24 UTC
If you move usb initialization, then you don't have a functioning console
if fsck fails.

Comment 6 Joerg Dorchain 2001-06-20 22:06:23 UTC
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 22:08:52 UTC
Hm... that may be doable. Reopening as an enhancement request. :)

Comment 8 Aleksey Nogin 2001-08-19 20:42:44 UTC
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 15:59:30 UTC
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.