Bug 422421

Summary: mkinitrd after an update builds boot images without modules
Product: [Fedora] Fedora Reporter: Michal Jaegermann <michal>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: rawhideCC: dcantrell, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: HotIssue
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-14 18:14:02 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:
Attachments:
Description Flags
an output from 'mkinitrd -v' with mkinitrd-6.0.20-1.fc9
none
add missing mkdir none

Description Michal Jaegermann 2007-12-12 20:58:10 UTC
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 20:58:10 UTC
Created attachment 286151 [details]
an output from 'mkinitrd -v' with mkinitrd-6.0.20-1.fc9

Comment 2 Bryn M. Reeves 2007-12-13 11:46:33 UTC
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 11:48:14 UTC
Created attachment 287341 [details]
add missing mkdir

Comment 4 Bryn M. Reeves 2007-12-13 12:59:11 UTC
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 18:10:08 UTC
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)