Bug 422421 - mkinitrd after an update builds boot images without modules
mkinitrd after an update builds boot images without modules
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
rawhide
All Linux
low Severity high
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
HotIssue
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-12 15:58 EST by Michal Jaegermann
Modified: 2008-01-14 13:14 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-01-14 13:14:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
an output from 'mkinitrd -v' with mkinitrd-6.0.20-1.fc9 (5.86 KB, text/plain)
2007-12-12 15:58 EST, Michal Jaegermann
no flags Details
add missing mkdir (338 bytes, patch)
2007-12-13 06:48 EST, Bryn M. Reeves
no flags Details | Diff

  None (edit)
Description Michal Jaegermann 2007-12-12 15:58:10 EST
Description of problem:

After an update to mkinitrd-6.0.20-1.fc9 I see the following
with '-v' flag:
.....
/usr/bin/strip: /tmp/initrd.CM3435/lib/jbd.ko: No such file or directory
/usr/bin/strip: /tmp/initrd.CM3435/lib/ext3.ko: No such file or directory
/usr/bin/strip: /tmp/initrd.CM3435/lib/scsi_mod.ko: No such file or directory
/usr/bin/strip: /tmp/initrd.CM3435/lib/sd_mod.ko: No such file or directory
/usr/bin/strip: /tmp/initrd.CM3435/lib/libata.ko: No such file or directory
.....
Full log attached.

So I get no kernel modules on a produced initrd image, hence no
disk access and clearly boot using that image has to fail.

After backing out to mkinitrd-6.0.19-6.fc9 (and nash-6.0.19-6.fc9
and libbdevid-python-6.0.19-6.fc9 due to dependencies) I can
produce initrd image with which I boot just fine.

Version-Release number of selected component (if applicable):
mkinitrd-6.0.20-1.fc9

How reproducible:
on all tries
Comment 1 Michal Jaegermann 2007-12-12 15:58:10 EST
Created attachment 286151 [details]
an output from 'mkinitrd -v' with mkinitrd-6.0.20-1.fc9
Comment 2 Bryn M. Reeves 2007-12-13 06:46:33 EST
Looks like mkinitrd is missing a "mkdir -p $MNTDIR/lib":

    mkdir -p $MNTIMAGE
    mkdir -p $MNTIMAGE/firmware
    mkdir -p $MNTIMAGE/bin
    mkdir -p $MNTIMAGE/etc
    mkdir -p $MNTIMAGE/dev
    mkdir -p $MNTIMAGE/proc
    mkdir -p $MNTIMAGE/sys
    mkdir -p $MNTIMAGE/sysroot
    ln -s bin $MNTIMAGE/sbin

So, when strip tries to write the modules to $MNTIMAGE/lib it fails as the dest
dir does not exist.
Comment 3 Bryn M. Reeves 2007-12-13 06:48:14 EST
Created attachment 287341 [details]
add missing mkdir
Comment 4 Bryn M. Reeves 2007-12-13 07:59:11 EST
Fix already appears to be there:

http://fedora.gitbits.net/?p=mkinitrd;a=commitdiff;h=8a2166e6cb33d6420

Just need to get the updated package pushed out.
Comment 5 Clark Williams 2007-12-14 13:10:08 EST
I updated to mkinitrd-6.0.22-1.fc9 and get this error when building a kernel:

if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 
2.6.23.9-rt13; fi
sh
/home/williams/src/linux-rt/kernel/thinkpad-t60/rt-laptop.git/arch/i386/boot/install.sh
2.6.23.9-rt13 arch/x86_64/boot/bzImage System.map "/boot"
/sbin/mkinitrd: line 541: syntax error near unexpected token `done'
/sbin/mkinitrd: line 541: `    done'
mkinitrd failed
make[1]: *** [install] Error 1
make: *** [install] Error 2

This patch fixed it:

--- mkinitrd.orig	2007-12-14 12:08:38.000000000 -0600
+++ mkinitrd	2007-12-14 12:08:05.000000000 -0600
@@ -527,6 +527,7 @@
             majmin=$(get_numeric_dev dec "/dev/$device")
             sysfs=$(finddevnoinsys $majmin)
             handledm $(echo "$majmin" |cut -d : -f 1) $(echo "$majmin" |cut -d
: -f 2)
+	fi
         if [[ "$device" =~ ^dm- ]]; then
             majmin=$(get_numeric_dev dec "/dev/$device")
             sysfs=$(finddevnoinsys $majmin)


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