Description of Problem:
in /etc/rc.d/rc.sysinit around line 155 usb is inititalized with the help
modules.dep is only created around line 360 by depmod. This gives errors
when booting with a self compiled kernel for the first time.
rm -rf /lib/modules/*
make modules modules install
Watchout for a line containing modules.dep
modules.dep is done in the %post of redhat kernels.
It's *also* done by 'make modules_install'.
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
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
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.
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
If you move usb initialization, then you don't have a functioning console
if fsck fails.
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 ;-)
Hm... that may be doable. Reopening as an enhancement request. :)
Another related problem is that depmod -a is also needed to create/update
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.
Hm, at this point, USB keyboard and mouse are built in, so this should