Bug#707040: initramfs-tools: missing busybox package creates unbootable initramfs missing /bin/sh
Package: initramfs-tools
Version: 0.109.1
Severity: serious
Justification: Policy 3.5
Dear Maintainer,
I ran dist-upgrade from squeeze to wheezy. During the upgrade, I was warned
that I was missing firmware-realtek, which was now in non-free. I installed
that package, and updated the 3.2 initrd image. Upon reboot, the 3.2 kernel
panic'd, unable to find /init. I was able to reboot into the 2.6.32 kernel.
I could tell that the usb-storage and other filesystem-related modules were
not being loaded, so I assumed they were not present in the initramfs. I
added several of them to /etc/initramfs-tools/modules and rebuilt *both*
initrd images. Rebuilding the one for 2.6.32 should have been a no-op. And
backup_initramfs=no by default on my system.
Now I was unable to boot *either* initrd image. I was able to pull an old initrd
image from another machine to get it to boot. Then I extracted both this working
image and the one I just created to see what was different. I noticed that the
new one did not have a /bin/sh file (or symlink). Both had /init though.
I simply installed busybox with apt-get. There were no additional packages
required during that install. I rebuilt the initrd images with my
/etc/initramfs-tools/modules overrides removed. Now both /bin/sh and
/bin/busybox were created.
Both kernel versions now boot successfully.
Note: I'm not sure why the 3.2 initrd images do not appear in the list below.
reportbug didn't populate them. The various other 2.6 initrd images were from
attempts at changing the MODULES line in initramfs.conf.
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 9.4M May 7 01:22 /boot/initrd.img-2.6.32-5-amd64
-rw-r--r-- 1 root root 8.8M May 6 04:23 /boot/initrd.img-2.6.32-5-amd64.broken
-rw-r--r-- 1 root root 2.4M May 6 04:53 /boot/initrd.img-2.6.32-5-amd64.dep
-rw-r--r-- 1 root root 9.3M May 6 04:52 /boot/initrd.img-2.6.32-5-amd64.good
-rw-r--r-- 1 root root 3.1M May 6 05:00 /boot/initrd.img-2.6.32-5-amd64.list
-rw-r--r-- 1 root root 8.8M May 6 04:53 /boot/initrd.img-2.6.32-5-amd64.most
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-3.2.0-4-amd64 root=UUID=5f4670a4-81c8-4455-890f-f6f0e4b83445 ro forcefsck
-- /proc/filesystems
ext3
ext4
-- lsmod
Module Size Used by
ext4 350602 1
crc16 12343 1 ext4
jbd2 62065 1 ext4
raid456 48356 1
async_raid6_recov 12574 1 raid456
async_memcpy 12387 2 async_raid6_recov,raid456
async_pq 12605 2 async_raid6_recov,raid456
raid6_pq 82624 2 async_pq,async_raid6_recov
async_xor 12422 3 async_pq,async_raid6_recov,raid456
xor 12605 1 async_xor
async_tx 12604 5 async_xor,async_pq,async_memcpy,async_raid6_recov,raid456
md_mod 87742 2 raid456
snd_hda_codec_realtek 188858 1
snd_hda_intel 26259 0
snd_hda_codec 78031 2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep 13186 1 snd_hda_codec
snd_pcm 68083 2 snd_hda_codec,snd_hda_intel
snd_page_alloc 13003 2 snd_pcm,snd_hda_intel
i915 378417 1
snd_timer 22917 1 snd_pcm
coretemp 12898 0
parport_pc 22364 0
acpi_cpufreq 12935 1
mperf 12453 1 acpi_cpufreq
crc32c_intel 12747 0
ghash_clmulni_intel 13173 0
video 17683 1 i915
cryptd 14517 1 ghash_clmulni_intel
snd 52889 6 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec_realtek,snd_hda_codec,snd_hda_intel
iTCO_wdt 17081 0
parport 31858 1 parport_pc
drm_kms_helper 31370 1 i915
processor 28157 1 acpi_cpufreq
iTCO_vendor_support 12704 1 iTCO_wdt
i2c_i801 16870 0
drm 183952 2 drm_kms_helper,i915
button 12937 1 i915
i2c_algo_bit 12841 1 i915
i2c_core 23876 5 i2c_algo_bit,drm,i2c_i801,drm_kms_helper,i915
soundcore 13065 1 snd
pcspkr 12579 0
evdev 17562 0
ext3 161867 1
mbcache 13114 2 ext3,ext4
jbd 56902 1 ext3
ses 13106 0
enclosure 13306 1 ses
sg 25874 0
sd_mod 36136 6
crc_t10dif 12348 1 sd_mod
usb_storage 43870 1
ata_generic 12479 0
ata_piix 29535 4
r8169 46972 0
mii 12675 1 r8169
e1000e 124918 0
thermal 17383 0
ehci_hcd 40215 0
thermal_sys 18040 3 thermal,processor,video
libata 140630 2 ata_piix,ata_generic
scsi_mod 162269 5 libata,usb_storage,sd_mod,sg,ses
usbcore 128741 3 ehci_hcd,usb_storage
usb_common 12354 1 usbcore
-- /etc/initramfs-tools/modules
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=yes
-- /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md127 : active raid6 sda[0] sdd[3] sdc[2] sdb[1]
3907025920 blocks super 1.2 level 6, 512k chunk, algorithm 2 [4/4] [UUUU]
unused devices: <none>
-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:
/usr/share/initramfs-tools/hooks:
busybox
dmsetup
keymap
klibc
kmod
mdadm
thermal
udev
-- System Information:
Debian Release: 7.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, 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:
pn bash-completion <none>
-- Configuration Files:
/etc/initramfs-tools/update-initramfs.conf changed:
update_initramfs=yes
backup_initramfs=yes
-- no debconf information
Reply to: