FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.

» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

LinkBack Thread Tools
Old 11-06-2009, 11:27 PM
Michael Prokop
Default Bug#554873: initramfs-tools: silently ignores errors from modprobe command

Package: initramfs-tools
Version: 0.93.4
Severity: normal

In /usr/share/initramfs-tools/hook-functions there's:

for mam_x in $(modprobe --set-version="${version}" --ignore-install
--show-depends "$1" 2>/dev/null | awk ....

If there doesn't exist an according modules.dep file yet¹ the
initramfs is built without mentioning *any* errors (though modprobe
clearly shows the failure when manually invoking the above
command²), even though essential stuff like filesystem modules might
be missing and the system might not be able to boot at all.

¹ For example because the linux-image in question doesn't execute
"depmod -a $KERNELVERSION" automatically during installation. Then
the original modules.dep might be present but contain stuff like:

kernel/fs/ext3/ext3.ko: kernel/fs/jbd/....

So it references file with relative paths - leading to ².
After manually invoking "depmod -a $KERNELVERSION" it looks like:

/lib/modules/$KERNELVERSION/kernel/fs/ext3/ext3.ko: /lib/modules/....

So the absolute paths are being used and works fine then.

² Example when the working directory is NOT /lib/modules/$KERNELVERSION/:

# modprobe --set-version=$KERNELVERSION --ignore-install --show-depends ext3
WARNING: Could not open 'kernel/fs/mbcache.ko': No such file or directory
WARNING: Could not open 'kernel/fs/jbd/jbd.ko': No such file or directory
FATAL: Could not open 'kernel/fs/ext3/ext3.ko': Noch such file or directory

So clearly an error message, but the 2>/dev/null inside
/usr/share/initramfs-tools/hook-functions just throws that away and
the ext3 + related modules don't become part of the initrd.

Of course when being inside /lib/modules/$KERNELVERSION/ and
executing the command again the correct output is available:

insmod kernel/fs/mbcache.ko
insmod kernel/fs/jbd/jbd.ko
insmod kernel/fs/ext3/ext3.ko

But amusingly update-initramfs then (working directory being
/lib/modules/$KERNELVERSION/) complains with tons of messages like:

ln: creating symbolic link `/tmp/mkinitramfs_HuFGVJ/kernel/....': File exists


To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Thread Tools

All times are GMT. The time now is 07:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org