Bug 80119 - RFE: module-init-tools forward compatibliity patch
RFE: module-init-tools forward compatibliity patch
Product: Red Hat Public Beta
Classification: Retired
Component: mkinitrd (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Erik Troan
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2002-12-20 02:43 EST by Warren Togami
Modified: 2007-03-26 23:59 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-14 21:44:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Warren Togami 2002-12-20 02:43:17 EST
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 15:51:11 EST
That's *gross*

There should be one insmod binary to handle both kernel types.
Comment 2 Warren Togami 2002-12-23 16:13:20 EST
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 17:40:36 EST
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 18:06:27 EST
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 18:09:26 EST
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-14 21:44:54 EST
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.