Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 80119 - RFE: module-init-tools forward compatibliity patch
Summary: RFE: module-init-tools forward compatibliity patch
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: mkinitrd
Version: phoebe
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Erik Troan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-20 07:43 UTC by Warren Togami
Modified: 2007-03-27 03:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2003-01-15 02:44:54 UTC

Attachments (Terms of Use)

Description Warren Togami 2002-12-20 07:43:17 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I know module-init-tools wont be supported for a long while, but this trivial
fix should make lives easier for 2.5.x testers while allowing 2.4.x kernel
installation to continue to work properly.

module-init-tools for kernel 2.5.48+ replaces /sbin/insmod-static with its own
version, moving the old modutils version to /sbin/insmod-static.old.  This
creates a problem for mkinitrd and 2.4.x kernels because the new insmod-static
is copied instead of the old.

You see this error message during bootup if you have the new insmod-static with
2.4.x kernels:
Kernel requires old insmod, but couldn't run /bin/insmod.old: No such file or
ERROR: /bin/insmod exited

The following trivial patch to /sbin/mkinitrd fixes this problem by also copying
insmod-static.old if needed.

--- mkinitrd.orig       2002-12-19 20:15:36.000000000 -1000
+++ mkinitrd    2002-12-19 20:37:28.000000000 -1000
@@ -508,6 +508,10 @@

 inst /sbin/nash "$MNTIMAGE/bin/nash"
 inst /sbin/insmod.static "$MNTIMAGE/bin/insmod"
+if [ -a /sbin/insmod.static.old ]; then
+    # In case of module-init-tools hybrid install
+    inst /sbin/insmod.static.old "$MNTIMAGE/bin/insmod.old"
 ln -s /sbin/nash $MNTIMAGE/sbin/modprobe

 for MODULE in $MODULES; do

Comment 1 Bill Nottingham 2002-12-23 20:51:11 UTC
That's *gross*

There should be one insmod binary to handle both kernel types.

Comment 2 Warren Togami 2002-12-23 21:13:20 UTC
I certainly agree this is ugly, but Rusty wrote this and Linus accepted it. =(

In any case, I highly recommend this patch because installation of 2.4.x kernels
is broken if people install module-init-tools.

Comment 3 Erik Troan 2003-01-14 22:40:36 UTC
Get rusty to call in insmod-static-2.4 and we'll support that. .old is just too

Comment 4 R P Herrold 2003-01-14 23:06:27 UTC
As to # 80119 -- I've re-opened -- If I understand the objections, it is to name
of the binary, and cruftyness of the patch

let's just change its name in Warren's first diff: 

    inst /sbin/insmod.static.old "$MNTIMAGE/bin/insmod-static-2.4"

not wait for Rusty, and make it work right in the meantime without the cryptic
error message.

Comment 5 Warren Togami 2003-01-14 23:09:26 UTC
In any case I contacted Rusty.  Hopefully he will agree that "-2.4" is a better
name than ".old" in the long run.

Comment 6 Erik Troan 2003-01-15 02:44:54 UTC
I don't want to do this differently for just Red Hat -- let us know Rusty's
answer. There needs to be a proper way to boot both 2.4 and 2.6 kernels on the
same machine, and insmod-static.old just isn't it.

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