public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [2.5] initrd/mkinitrd still not working
@ 2003-01-20 14:57 Mikael Pettersson
  2003-01-20 15:52 ` John Levon
  2003-01-28  1:03 ` Rusty Russell
  0 siblings, 2 replies; 15+ messages in thread
From: Mikael Pettersson @ 2003-01-20 14:57 UTC (permalink / raw)
  To: davidsen; +Cc: linux-kernel, rusty

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

^ permalink raw reply	[flat|nested] 15+ messages in thread
* [2.5] initrd/mkinitrd still not working
@ 2003-01-18 19:46 Bill Davidsen
  0 siblings, 0 replies; 15+ messages in thread
From: Bill Davidsen @ 2003-01-18 19:46 UTC (permalink / raw)
  To: Linux-Kernel

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.

If this functionality is among the capabilities which were removed
during the module loading functionality downgrade, could someone just
say so?

Make output:

make -j2 -f scripts/Makefile.build obj=net/sunrpc
make -j2 -f scripts/Makefile.build obj=net/unix
make -j2 -f scripts/Makefile.build obj=lib
make -j2 -f scripts/Makefile.build obj=arch/i386/lib
make -j2 -f scripts/Makefile.build obj=arch/i386/boot BOOTIMAGE=arch/i386/boot/bzImage install
make -j2 -f scripts/Makefile.build obj=arch/i386/boot/compressed \
				IMAGE_OFFSET=0x100000 arch/i386/boot/compressed/vmlinux
Kernel: arch/i386/boot/bzImage is ready
sh arch/i386/boot/install.sh 2.5.56 arch/i386/boot/bzImage System.map ""
No module sym53c8xx found for kernel 2.5.56

real	0m10.521s
user	0m13.490s
sys	0m1.460s

Module is present and found by depmod:

bilbo:root> find /lib/modules/2.5.56 -name 'sym53*'
/lib/modules/2.5.56/kernel/drivers/scsi/sym53c8xx_2
/lib/modules/2.5.56/kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko
bilbo:root> grep sym53 /lib/modules/2.5.56/modules.dep
/lib/modules/2.5.56/kernel/drivers/scsi/sym53c8xx_2/sym53c8xx.ko:
bilbo:root> exit

Note: tried it in every kernel from 2.5.48-58, this is not just a 2.5.56
bug, I was just trying to get another feature working, without a root
filesystem it's not productive to test :-(

-- 
bill davidsen, CTO TMR Associates, Inc <davidsen@tmr.com>
  Having the feature freeze for Linux 2.5 on Hallow'een is appropriate,
since using 2.5 kernels includes a lot of things jumping out of dark
corners to scare you.



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-02-03  2:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 14:57 [2.5] initrd/mkinitrd still not working Mikael Pettersson
2003-01-20 15:52 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox