Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 80119

Summary: RFE: module-init-tools forward compatibliity patch
Product: [Retired] Red Hat Public Beta Reporter: Warren Togami <wtogami>
Component: mkinitrdAssignee: Erik Troan <ewt>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: phoebeCC: herrold
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-15 02:44:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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
directory
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"
+fi
 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
gross.

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.