public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: davidsen@tmr.com
Cc: linux-kernel@vger.kernel.org, rusty@rustcorp.com.au
Subject: Re: [2.5] initrd/mkinitrd still not working
Date: Mon, 20 Jan 2003 15:57:22 +0100 (MET)	[thread overview]
Message-ID: <200301201457.PAA25276@harpo.it.uu.se> (raw)

On Sat, 18 Jan 2003 14:46:53 -0500 (EST), Bill Davidsen wrote:
>Could someone *please* point me to the version of mkinitrd which works
>with the new module code? The mkinitrd from Redhat and Slackware can not
>find scsi modules which are in the module tree and modeles.dep. If I
>build initrd by hand based on what worked for 2.5.47 it starts to load a
>*still* can't find the module.
>...
>sh arch/i386/boot/install.sh 2.5.56 arch/i386/boot/bzImage System.map ""
>No module sym53c8xx found for kernel 2.5.56
>...
>/lib/modules/2.5.56/kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko

Recent 2.5 gives modules a .ko suffix instead of the traditional .o,
and modules are described in /etc/modprobe.conf instead of modules.conf.
The quick-n-dirty patch below to RH8.0's /sbin/mkinitrd might do the trick.

As to why the .o -> .ko name change was necessary, I have no idea.
Rusty?

/Mikael

--- mkinitrd.~1~	2003-01-20 15:39:34.000000000 +0100
+++ mkinitrd	2003-01-20 15:49:48.000000000 +0100
@@ -34,7 +34,7 @@
 img_vers=""
 builtins=""
 pivot=1
-modulefile=/etc/modules.conf
+modulefile=/etc/modprobe.conf
 rc=0
 
 if [ `uname -m` = "ia64" ]; then
@@ -128,7 +128,7 @@
 	modName="sbp2"
     fi
     
-    fmPath=`(cd /lib/modules/$kernel; echo find . -name $modName.o | /sbin/nash --quiet)`
+    fmPath=`(cd /lib/modules/$kernel; echo find . -name $modName.ko | /sbin/nash --quiet)`
 
     if [ ! -f /lib/modules/$kernel/$fmPath ]; then
 	if [ -n "$skiperrors" ]; then
@@ -320,7 +320,7 @@
 fi
 
 if [ -n "$needusb" ]; then
-    drivers=$(awk '/^alias usb-controller[0-9]* / { print $3}' < /etc/modules.conf)
+    drivers=$(awk '/^alias usb-controller[0-9]* / { print $3}' < $modulefile)
     if [ -n "$drivers" ]; then
 	findmodule usbcore
 	for driver in $drivers; do
@@ -461,7 +461,7 @@
 
 dd if=/dev/zero of=$IMAGE bs=1k count=$IMAGESIZE 2> /dev/null || exit 1
 
-LODEV=$(echo findlodev $modName.o | /sbin/nash --quiet)
+LODEV=$(echo findlodev $modName.ko | /sbin/nash --quiet)
 
 if [ -z "$LODEV" ]; then
     rm -rf $MNTPOINT $IMAGE
@@ -536,7 +536,7 @@
 
 for MODULE in $MODULES; do
     text=""
-    module=`echo $MODULE | sed "s|.*/||" | sed "s/.o$//"`
+    module=`echo $MODULE | sed "s|.*/||" | sed "s/.ko$//"`
 
     options=`sed -n -e "s/^options[ 	][ 	]*$module[ 	][ 	]*//p" $modulefile 2>/dev/null`
 
@@ -547,7 +547,7 @@
         echo "Loading module $module$text"
     fi
     echo "echo \"Loading $module module\"" >> $RCFILE
-    echo "insmod /lib/$module.o $options" >> $RCFILE
+    echo "insmod /lib/$module.ko $options" >> $RCFILE
 
     # Hack - we need a delay after loading usb-storage to give things
     #        time to settle down before we start looking a block devices

             reply	other threads:[~2003-01-20 14:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-20 14:57 Mikael Pettersson [this message]
2003-01-20 15:52 ` [2.5] initrd/mkinitrd still not working John Levon
2003-01-20 19:12   ` Sam Ravnborg
2003-01-20 19:19     ` John Levon
2003-01-20 19:35       ` Sam Ravnborg
2003-01-21  2:18         ` Michal Jaegermann
2003-01-21 17:02           ` Bill Davidsen
2003-01-28  1:03 ` Rusty Russell
2003-01-28 17:10   ` Bill Davidsen
2003-01-29  0:48     ` Rusty Russell
2003-01-29  1:56       ` Herbert Xu
2003-01-29  6:21         ` Rusty Russell
2003-02-02 15:28           ` Bill Davidsen
2003-02-03  0:59             ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2003-01-18 19:46 Bill Davidsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301201457.PAA25276@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox