--- Begin Message ---
Package: initramfs-tools
Version: 0.109.1
Severity: normal
File: /usr/sbin/mkinitramfs
Dear Maintainer,
on a system with the rootfs living inside LUKS on an SD card,
mkinitramfs (and thus update-initramfs) fails with:
=== Begin ===
root@mimosa:/boot# update-initramfs -k 3.0.19-mimosa-8-01603-g1b85fba -c
update-initramfs: Generating /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba
mkinitramfs: for root /dev/dm-0 missing mmcblk /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug
update-initramfs: failed for /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba with 1.
=== End ===
Older versions displayed a warning (which I ignored since everything
needed for boot is built-in to the custom kernel anyway), but didn't
abort initramfs generation.
It looks like hook-functions is a bit overzealous in stripping down
the partition name to a device name, resulting in "mmcblk" rather than
"mmcblk0". There's existing special casing in dep_add_modules for
device mapper (LVM/LUKS) on top of cciss or ida and for root on cciss,
ida, mmc and a few more in place already, but not for device mapper on
top of mmc. Maybe a recursive function would be a better fit for
determining the modules needed for the rootfs?
For reference, this is a trace of mkinitramfs:
=== Begin trace ===
+ CONFDIR=/etc/initramfs-tools
+ verbose=n
+ test -e /bin/busybox
+ BUSYBOXDIR=/bin
+ test -e /usr/lib/initramfs-tools/bin/busybox
+ export BUSYBOXDIR
++ getopt -o c:d:ko:r:v -n mkinitramfs -- -o /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new 3.0.19-mimosa-8-01603-g1b85fba
+ OPTIONS=' -o '\''/boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new'\'' -- '\''3.0.19-mimosa-8-01603-g1b85fba'\'''
+ '[' 0 '!=' 0 ']'
+ eval set -- ' -o '\''/boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new'\'' -- '\''3.0.19-mimosa-8-01603-g1b85fba'\'''
++ set -- -o /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new -- 3.0.19-mimosa-8-01603-g1b85fba
+ true
+ case "$1" in
+ outfile=/boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new
+ shift 2
+ true
+ case "$1" in
+ shift
+ break
+ . /usr/share/initramfs-tools/scripts/functions
+ . /usr/share/initramfs-tools/hook-functions
+ . /etc/initramfs-tools/initramfs.conf
++ MODULES=dep
++ BUSYBOX=y
++ KEYMAP=n
++ COMPRESS=gzip
++ DEVICE=
++ NFSROOT=auto
+ EXTRA_CONF=
+ for i in '/usr/share/initramfs-tools/conf.d/*' '${CONFDIR}/conf.d/*'
+ '[' -e '/usr/share/initramfs-tools/conf.d/*' ']'
+ for i in '/usr/share/initramfs-tools/conf.d/*' '${CONFDIR}/conf.d/*'
+ '[' -e '/etc/initramfs-tools/conf.d/*' ']'
+ for i in '/usr/share/initramfs-tools/conf-hooks.d/*'
+ '[' -d /usr/share/initramfs-tools/conf-hooks.d/cryptsetup ']'
+ '[' -e /usr/share/initramfs-tools/conf-hooks.d/cryptsetup ']'
+ . /usr/share/initramfs-tools/conf-hooks.d/cryptsetup
++ KEYMAP=y
++ BUSYBOX=y
++ FRAMEBUFFER=y
+ '[' -n '' ']'
+ '[' -z /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new ']'
+ touch /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new
++ readlink -f /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new
+ outfile=/boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new
+ '[' 1 -ne 1 ']'
+ version=3.0.19-mimosa-8-01603-g1b85fba
+ case "${version}" in
+ case "${version}" in
+ '[' -z '' ']'
+ compress=gzip
+ command -v gzip
+ dpkg --compare-versions 3.0.19-mimosa-8-01603-g1b85fba lt 2.6.38
+ '[' gzip = lzop ']'
+ '[' gzip = xz ']'
+ '[' -d /boot/initrd.img-3.0.19-mimosa-8-01603-g1b85fba.new ']'
+ MODULESDIR=/lib/modules/3.0.19-mimosa-8-01603-g1b85fba
+ '[' '!' -e /lib/modules/3.0.19-mimosa-8-01603-g1b85fba ']'
+ '[' '!' -e /lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.dep ']'
+ '[' -n '' ']'
++ mktemp -d /var/tmp/mkinitramfs_XXXXXX
+ DESTDIR=/var/tmp/mkinitramfs_K8XasF
+ chmod 755 /var/tmp/mkinitramfs_K8XasF
+ NOEXEC=
++ tail -1
++ awk '{print $6}'
++ df -P /var/tmp/mkinitramfs_K8XasF
+ fs=/
+ '[' -n / ']'
+ grep -q 'on / .*noexec'
+ mount
++ mktemp /var/tmp/mkinitramfs-OL_XXXXXX
+ __TMPCPIOGZ=/var/tmp/mkinitramfs-OL_OuJNFs
++ dpkg --print-architecture
+ DPKG_ARCH=armel
+ export MODULESDIR
+ export version
+ export CONFDIR
+ export DESTDIR
+ export DPKG_ARCH
+ export verbose
+ export KEYMAP
+ export MODULES
+ export BUSYBOX
+ export __TMPCPIOGZ
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/bin
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/conf/conf.d
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/etc
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/lib/modules
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/run
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/sbin
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF/scripts
+ for d in bin conf/conf.d etc lib/modules run sbin scripts '${MODULESDIR}'
+ mkdir -p /var/tmp/mkinitramfs_K8XasF//lib/modules/3.0.19-mimosa-8-01603-g1b85fba
+ for x in modules.builtin modules.order
+ '[' -f /lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.builtin ']'
+ cp -p /lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.builtin /var/tmp/mkinitramfs_K8XasF/lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.builtin
+ for x in modules.builtin modules.order
+ '[' -f /lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.order ']'
+ cp -p /lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.order /var/tmp/mkinitramfs_K8XasF/lib/modules/3.0.19-mimosa-8-01603-g1b85fba/modules.order
+ for x in '"${CONFDIR}/modules"' '/usr/share/initramfs-tools/modules.d/*'
+ '[' -f /etc/initramfs-tools/modules ']'
+ add_modules_from_file /etc/initramfs-tools/modules
+ '[' '!' -e /etc/initramfs-tools/modules ']'
+ read module args
+ grep '^[^#]' /etc/initramfs-tools/modules
+ for x in '"${CONFDIR}/modules"' '/usr/share/initramfs-tools/modules.d/*'
+ '[' -f '/usr/share/initramfs-tools/modules.d/*' ']'
+ case "${MODULES}" in
+ dep_add_modules
+ local block minor root FSTYPE root_dev_path
+ local modules=
+ '[' '!' -d /sys/devices/ ']'
++ read dev foo mp foo fs opts rest
++ mount
++ '[' /sys = / ']'
++ read dev foo mp foo fs opts rest
++ '[' /proc = / ']'
++ read dev foo mp foo fs opts rest
++ '[' /dev = / ']'
++ read dev foo mp foo fs opts rest
++ '[' /dev/pts = / ']'
++ read dev foo mp foo fs opts rest
++ '[' /run = / ']'
++ read dev foo mp foo fs opts rest
++ '[' / = / ']'
++ '[' ext4 '!=' rootfs ']'
++ printf 'root=/dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1\nFSTYPE=ext4'
++ break
+ eval 'root=/dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1
FSTYPE=ext4'
++ root=/dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1
++ FSTYPE=ext4
+ '[' -z /dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1 ']'
+ '[' -z /dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1 ']'
+ '[' ext4 = ubifs ']'
+ '[' /dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1 = /dev/root ']'
++ readlink -f /dev/disk/by-uuid/64db461f-0fe8-4ebe-b778-59e4f83a71e1
+ root=/dev/dm-0
++ /usr/lib/klibc/bin/fstype /dev/dm-0
+ eval 'FSTYPE=ext4
FSSIZE=78913732608'
++ FSTYPE=ext4
++ FSSIZE=78913732608
+ '[' ext4 = unknown ']'
+ modules=' ext4'
+ '[' /dev/dm-0 '!=' /dev/dm-0 ']'
+ '[' 0 '!=' /dev/dm-0 ']'
++ stat --format %T /dev/dm-0
+ minor=0
++ head -n 1
++ ls -1 /sys/block/dm-0/slaves
+ block=mmcblk0p6
+ '[' mmcblk0p6 '!=' mmcblk0p6 ']'
+ '[' mmcblk0p6 '!=' mmcblk0p6 ']'
+ '[' mmcblk0p6 '!=' mmcblk0p6 ']'
+ '[' mmcblk0p6 '!=' mmcblk0p6 ']'
+ block=mmcblk
+ '[' -z mmcblk ']'
+ '[' '!' -e /sys/block/mmcblk ']'
+ echo 'mkinitramfs: for root /dev/dm-0 missing mmcblk /sys/block/ entry'
mkinitramfs: for root /dev/dm-0 missing mmcblk /sys/block/ entry
+ echo 'mkinitramfs: workaround is MODULES=most'
mkinitramfs: workaround is MODULES=most
+ echo 'mkinitramfs: Error please report the bug'
mkinitramfs: Error please report the bug
+ exit 1
=== End trace ===
For this system, I've solved the problem by switching to
MODULES=list. As mentioned above, I don't need any module to be loaded
from within initramfs anyway.
-- Package-specific info:
-- initramfs sizes
-- /proc/cmdline
fbcon=font:SUN12x22 coherent_pool=76M ro root=UUID=64db461f-0fe8-4ebe-b778-59e4f83a71e1 rootwait rootfstype=ext4 ttyS2 console=ttyS2,115200 console=tty0 mmc_core.removable=0
-- /proc/filesystems
ext3
ext2
ext4
cramfs
vfat
msdos
fuseblk
-- lsmod
Module Size Used by
tun 12949 2
uinput 6087 1
rfcomm 48378 2
bnep 11396 2
bluetooth 166770 8 bnep,rfcomm
siv120d 7819 0
libertas_sdio 14588 0
libertas 89023 1 libertas_sdio
ov7670 7596 1
mmp_camera 15015 0
videobuf2_dma_sg 2869 1 mmp_camera
videobuf2_memops 1828 1 videobuf2_dma_sg
videobuf2_core 14599 1 mmp_camera
-- /etc/initramfs-tools/modules
-- /etc/initramfs-tools/initramfs.conf
MODULES=dep
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- /etc/crypttab
# <target name> <source device> <key file> <options>
dmcrypt-root /dev/disk/by-id/memstick-SU128_0xd00455b0-part6 none luks,discard
dmcrypt-swap /dev/disk/by-id/memstick-SU128_0xd00455b0-part5 /dev/urandom swap,cipher=aes-cbc-essiv:md5
#dmcrypt-swap /dev/disk/by-id/memstick-SD32G_0x0fdce5a8-part2 /dev/urandom swap,cipher=aes-cbc-essiv:md5
-- /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
unused devices: <none>
-- /sys/block
dm-0
dm-1
mmcblk0
mmcblk1
mmcblk1boot0
mmcblk1boot1
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
busybox
cryptgnupg
cryptkeyctl
cryptopenct
cryptopensc
cryptpassdev
cryptroot
dmsetup
fuse
keymap
klibc
kmod
lvm2
ntfs_3g
thermal
udev
-- System Information:
Debian Release: 7.5
APT prefers stable
APT policy: (500, 'stable'), (1, 'experimental')
Architecture: armel (armv7l)
Kernel: Linux 3.0.19-mimosa-8-01601-g884ba31 (PREEMPT)
Locale: LANG=en_GB, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initramfs-tools depends on:
ii cpio 2.11+dfsg-0.1
ii klibc-utils 2.0.1-3.1
ii kmod 9-3
ii module-init-tools 9-3
ii udev 175-7.2
Versions of packages initramfs-tools recommends:
ii busybox 1:1.20.0-7
Versions of packages initramfs-tools suggests:
ii bash-completion 1:2.0-1
-- Configuration Files:
/etc/initramfs-tools/initramfs.conf changed:
MODULES=dep
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
-- no debconf information
--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.120+deb8u1
We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 747871@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Ben Hutchings <ben@decadent.org.uk> (supplier of updated initramfs-tools package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 20 Feb 2016 15:48:17 +0000
Source: initramfs-tools
Binary: initramfs-tools
Architecture: all source
Version: 0.120+deb8u1
Distribution: jessie
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <ben@decadent.org.uk>
Closes: 602331 633582 747871 781239 782641 783291 783410 783620 785147 792557 795839 810808
Description:
initramfs-tools - generic modular initramfs generator
Changes:
initramfs-tools (0.120+deb8u1) jessie; urgency=medium
.
[ Ben Hutchings ]
* [c367d7d] scripts/functions: Use shell to create stamp file instead of
'touch' (Closes: #783291)
* [d22b95b] update-initramfs: Run 'sync' after writing the initramfs
(Closes: #783620)
* [c22cefe] hook-functions: Add support for nvme devices with MODULES=dep
(Closes: #785147)
* [e0b23a1] hook-functions: Add support for LVM/LUKS on mmcblk and nvme
devices with MODULES=dep (Closes: #747871, #810808)
* [0e905aa] scripts/functions: Fix fsck display options (Closes: #781239)
.
[ Laurent Bigonville ]
* [3c4b38a] Support fsck.mode= and fsck.repair= parameters as known by
systemd-fsck (Closes: #783410, #792557)
* [dcb0f0c] Run new panic scripts just before dropping to a shell
(Closes: #602331)
.
[ Boris Egorov ]
* [2c82cf4] mkinitramfs: fix bashism in script (Closes: #633582)
.
[ Andy Whitcroft ]
* [97b664e] When adding i8042 also add psmouse as some keyboards are behind
the mouse (Closes: #795839)
.
[ Salvatore Bonaccorso ]
* [71e5b62] scripts/nfs: Check return value from nfs_mount_root_impl
(Closes: #782641)
Checksums-Sha1:
c8a03ba2194f6018497f3692d4f73fdb63e2d050 1737 initramfs-tools_0.120+deb8u1.dsc
cd44bf2f65c06c1b584c6b046152247aa93bb282 80796 initramfs-tools_0.120+deb8u1.tar.xz
29f3057044c89cda194a1eeeb5870a02cf44de73 96230 initramfs-tools_0.120+deb8u1_all.deb
Checksums-Sha256:
8b65c0ec514cdba3f185c082b59611b85c7ef6702b54accb349e710910576d32 1737 initramfs-tools_0.120+deb8u1.dsc
e9854b2a7d6effb94a40c8bff518b04cfe6eaed63725d95bcf36adf93df49d5b 80796 initramfs-tools_0.120+deb8u1.tar.xz
ae92dbe2fa71f5fc4343f6e8e79ded6c7e4682490c846074dda15c84c26fda2e 96230 initramfs-tools_0.120+deb8u1_all.deb
Files:
2aacdc3f120356865e9d5355ee951ce9 1737 utils optional initramfs-tools_0.120+deb8u1.dsc
c69e54ba096e63c28513a343c99a1f21 80796 utils optional initramfs-tools_0.120+deb8u1.tar.xz
d12b70c15ad8ad6ce0476d5cb7a0b565 96230 utils optional initramfs-tools_0.120+deb8u1_all.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIVAwUBVsiNxee/yOyVhhEJAQpoXxAAl591JNDogazcJsB46yCh08j+/flLo7zN
CxLdzELB4AINRE2Dku4LJGx0TNLy2E1fSlEpPzj/srVTq5g88vrXBihimBOCdaz5
wSyiKaiOR15rQchngt/KHtfyYGi1nzQtZl2mGvaXgaGHucZT9/CYhhMTM5vycQAM
FE8whUkhNvzjBe+wXryIAQq0Lcpk3eD23lhO+T7rHsAbXqDjMZ5I9n2R6NlANCzH
ZjaKve/z41TdVPebUc+fd3Dnb3UqdhBqXAUL+hTzKRKPGJVmGGVS4SAS+tU7GKNn
NY87dz1IG4FAeQOOb1r1mRo8Osrvh3iMYxMKxgQEDcvtlDsvXGbu+/uKv5u1s222
7q1DMnHoJQPXZpX9h6znwLfqgQOi6SlglSWKrglQ3AqV5e4nfCM/6b9BRoVY8sTJ
223SkvhVadaT9VipI+LjqHC9wPFxdw9ogzu7/6wDcQilpLsoCqExJ7GASiRfeRw5
w6VVJe9jpo+2jR8aQghm0bJX9Ljf1zZGsAJvdRXV2JReW0b+iZoP0u96qU7uyWbU
XX7ndFLys/FLpo9ADSD+jWv6Og8lSTd/OSahjDeKkZeNNM9oWcH2nIxsZVMo8B8v
Lov71Fugt9yx4IPpqXiXjcKoh1rDrBRsyFDip1pomCkAR7mKBY16sVMCzBXtHOzT
Hl03DbjNeXo=
=8oDS
-----END PGP SIGNATURE-----
--- End Message ---