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 04-13-2012, 02:13 PM
Vincent Danjean
 
Default Bug#668616: initramfs-tools: for root /boot/rootfs missing /boot/rootfs /sys/block/ entry

Package: initramfs-tools
Version: 0.101
Severity: important
Tags: patch

Hi,

Since my last upgrade on a squeeze with parts of wheezy, update-initramfs
fails to create the initrd.img file with the following error message:

mkinitramfs: for root /boot/rootfs missing /boot/rootfs /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug

The machine is a kvm virtual machine with few space on /boot so the
suggested workaround is not an option for me.


During my last upgrade, initramfs-tools was *not* upgraded. So I tried
to see in details where the problem really come from.

Looking into /usr/share/initramfs-tools/hook-functions, I see:
=====
# find and only copy root relevant modules
dep_add_modules()
{
[...]
# findout root block device + fstype
eval "$( mount | while read dev foo mp foo fs opts rest ; do
[ "$mp" = "/" ] && printf "root=$dev
FSTYPE=$fs"
&& break; done)"

# On failure fallback to /proc/mounts if readable
if [ -z "$root" ] && [ -r /proc/mounts ]; then
eval "$(while read dev mp fs opts rest ; do
[ "$mp" = "/" ] && [ "$fs" != "rootfs" ]
&& printf "root=$dev
FSTYPE=$fs"
&& break; done < /proc/mounts)"
fi
[...]
root="$(readlink -f ${root})"
[...]
# Error out if /sys lack block dev
if [ -z "${block}" ] || [ ! -e /sys/block/${block} ]; then
echo "mkinitramfs: for root ${root} missing ${block} /sys/block/ entry" >&2
echo "mkinitramfs: workaround is MODULES=most" >&2
echo "mkinitramfs: Error please report the bug" >&2
exit 1
fi
[...]
}
====

Note how the output of the 'mount' command is handled differently from
the contents of '/proc/mounts': there is no test ' && [ "$fs" != "rootfs" ]'
in the first case.

And if root=rootfs, then 'root="$(readlink -f ${root})"' set root to /boot/rootfs
as rootfs does not exist and the script is run from the boot directory.

kooot:/boot# mount
rootfs on / type rootfs (rw)
[...]
kooot:/boot# readlink -f rootfs
/boot/rootfs
kooot:/boot#

During my upgrade, sysvinit-utils and initscripts have been upgraded from
2.88dsf-13.1 to 2.88dsf-22.1. I think (I did not check) that this move
/etc/mtab into a symlink to /proc/mounts. So, the result of "mount"
should be handled the same as the contents of /proc/mounts.
And indeed, adding " && [ "$fs" != "rootfs" ]" when handling the
output of mount fixed the problem for me.

Regards,
Vincent

-- Package-specific info:
-- initramfs sizes
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.3.0-trunk-amd64 root=/dev/mapper/eyak-root ro quiet

-- resume
RESUME=UUID=c595b643-7575-4004-9fe8-a8ed8939488f
-- /proc/filesystems
ext4
ext3
fuseblk
vfat
udf
iso9660
hfsplus
hfs
ext2
reiserfs
xfs
jfs
omfs

-- lsmod
Module Size Used by
tun 18340 2
nls_iso8859_1 12461 0
omfs 18216 0
jfs 137479 0
xfs 590971 0
reiserfs 192397 0
ext2 59252 0
hfs 45882 0
hfsplus 71608 0
isofs 35185 0
udf 68066 0
crc_itu_t 12347 2 udf,omfs
nls_utf8 12456 0
nls_cp437 16553 0
vfat 17315 0
fat 45701 1 vfat
aesni_intel 50708 0
cryptd 14517 1 aesni_intel
aes_x86_64 16796 1 aesni_intel
aes_generic 33026 2 aes_x86_64,aesni_intel
ip6table_filter 12540 0
ip6_tables 22175 1 ip6table_filter
iptable_filter 12536 0
ip_tables 22042 1 iptable_filter
ebtable_nat 12580 0
ebtables 26274 1 ebtable_nat
x_tables 19073 5 ebtables,ip_tables,iptable_filter,ip6_tables,ip6ta ble_filter
mperf 12453 0
cpufreq_stats 12866 0
cpufreq_userspace 12576 0
cpufreq_conservative 13147 0
ppdev 12763 0
lp 17149 0
cpufreq_powersave 12454 0
rfcomm 33671 8
bnep 17577 2
binfmt_misc 12957 1
uinput 17440 1
fuse 62117 1
nfsd 220730 2
nfs 313029 0
nfs_acl 12511 2 nfs,nfsd
auth_rpcgss 37189 2 nfs,nfsd
fscache 36807 1 nfs
lockd 67454 2 nfs,nfsd
sunrpc 173816 6 lockd,auth_rpcgss,nfs_acl,nfs,nfsd
kvm_intel 122008 0
kvm 293782 1 kvm_intel
ext3 161959 1
jbd 57131 1 ext3
coretemp 12898 0
loop 22641 0
snd_hda_codec_hdmi 30783 1
snd_hda_codec_idt 53822 1
arc4 12458 2
snd_hda_intel 26345 8
nouveau 575705 0
snd_seq_midi 12848 0
snd_hda_codec 82625 3 snd_hda_intel,snd_hda_codec_idt,snd_hda_codec_hdmi
iwlwifi 171306 0
snd_seq_midi_event 13316 1 snd_seq_midi
snd_rawmidi 23060 1 snd_seq_midi
snd_hwdep 13186 1 snd_hda_codec
mac80211 320642 1 iwlwifi
mxm_wmi 12473 1 nouveau
snd_pcm_oss 41107 0
joydev 17266 0
uvcvideo 62253 0
ttm 58093 1 nouveau
snd_mixer_oss 17916 3 snd_pcm_oss
dell_wmi 12477 0
videobuf2_vmalloc 12664 1 uvcvideo
i915 361885 4
snd_seq 45130 2 snd_seq_midi_event,snd_seq_midi
videobuf2_memops 12526 1 videobuf2_vmalloc
sparse_keymap 12760 1 dell_wmi
videobuf2_core 25974 1 uvcvideo
snd_pcm 63998 4 snd_pcm_oss,snd_hda_codec,snd_hda_intel,snd_hda_co dec_hdmi
cfg80211 142333 2 mac80211,iwlwifi
videodev 70909 1 uvcvideo
snd_seq_device 13176 3 snd_seq,snd_rawmidi,snd_seq_midi
drm_kms_helper 27273 2 i915,nouveau
psmouse 64997 0
dell_laptop 17120 0
snd_page_alloc 13003 2 snd_pcm,snd_hda_intel
iTCO_wdt 17081 0
parport_pc 22364 1
v4l2_compat_ioctl32 16655 1 videodev
media 18148 2 videodev,uvcvideo
btusb 17509 2
bluetooth 129614 23 btusb,bnep,rfcomm
dcdbas 13307 1 dell_laptop
evdev 17562 26
serio_raw 12976 0
pcspkr 12595 0
i2c_i801 16870 0
snd_timer 22917 2 snd_pcm,snd_seq
iTCO_vendor_support 12704 1 iTCO_wdt
rfkill 19012 4 bluetooth,dell_laptop,cfg80211
i2c_algo_bit 12841 1 i915
snd 52982 24 snd_timer,snd_seq_device,snd_pcm,snd_seq,snd_mixer _oss,snd_pcm_oss,snd_hwdep,snd_rawmidi,snd_hda_cod ec,snd_hda_intel,snd_hda_codec_idt,snd_hda_codec_h dmi
parport 31858 3 parport_pc,lp,ppdev
wmi 13243 3 dell_wmi,mxm_wmi,nouveau
drm 183832 7 drm_kms_helper,i915,ttm,nouveau
video 17628 2 i915,nouveau
battery 13109 0
i2c_core 23876 7 drm,i2c_algo_bit,i2c_i801,drm_kms_helper,videodev, i915,nouveau
soundcore 13065 3 snd
button 12937 2 i915,nouveau
ac 12624 0
processor 28212 0
usb_storage 43902 0
uas 13234 0
ext4 351132 3
crc16 12343 2 ext4,bluetooth
jbd2 62291 1 ext4
mbcache 13065 3 ext4,ext2,ext3
usbhid 40559 0
hid 81480 1 usbhid
power_supply 13519 4 hid,ac,battery,dell_laptop
dm_mod 63574 13
sd_mod 36136 4
crc_t10dif 12348 1 sd_mod
ahci 24997 3
libahci 22820 1 ahci
libata 141011 2 libahci,ahci
ehci_hcd 40215 0
sdhci_pci 17852 0
scsi_mod 162487 4 libata,sd_mod,uas,usb_storage
sdhci 26993 1 sdhci_pci
usbcore 128753 7 ehci_hcd,usbhid,uas,usb_storage,btusb,uvcvideo
mmc_core 77131 2 sdhci,sdhci_pci
e1000e 129016 0
usb_common 12354 1 usbcore
thermal 17383 0
thermal_sys 18048 3 thermal,processor,video

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=local
DEVICE=
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
busybox
dmsetup
fuse
keymap
klibc
kmod
lvm2
ntfs_3g
thermal
udev
uswsusp


-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.3.0-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii cpio 2.11-7
ii klibc-utils 2.0~rc3-1
ii module-init-tools 6-2
ii udev 175-3.1

Versions of packages initramfs-tools recommends:
ii busybox 1:1.19.3-5

Versions of packages initramfs-tools suggests:
ii bash-completion 1:1.99-3

-- no debconf information



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120413141318.30609.13940.reportbug@eyak.imag.fr" >http://lists.debian.org/20120413141318.30609.13940.reportbug@eyak.imag.fr
 

Thread Tools




All times are GMT. The time now is 01:28 PM.

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