Bug 422421 - mkinitrd after an update builds boot images without modules
Summary: mkinitrd after an update builds boot images without modules
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: HotIssue
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-12-12 20:58 UTC by Michal Jaegermann
Modified: 2008-01-14 18:14 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-01-14 18:14:02 UTC
Type: ---
Embargoed:


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

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)




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