Bug#590744: Fails to boot if /sbin/init is a symlink
Package: initramfs-tools
Version: 0.97.2
Severity: normal
Hi,
for testing purposes, I installed the upstart binary as /sbin/upstart and
created a symlink /sbin/init → /sbin/upstart
This causes a boot failure, due to this check in /usr/share/initramfs-
tools/init
# Check init bootarg
if [ -n "${init}" ] && [ ! -x "${rootmnt}${init}" ]; then
echo "Target filesystem doesn't have ${init}."
init=
fi
To quote Mithrandir (from irc):
<Mithrandir> -x follows symlinks
<Mithrandir> but that means it'll look for symlinks in the initramfs, so the
check is buggy.
-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 6.2M Jul 25 00:10 /boot/initrd.img-2.6.32-5-686
-- /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-2.6.32-5-686 root=UUID=9a6d2bd2-58d1-4a75-baff-166b8637e3cc ro init=/bin/systemd systemd.log_target=kmsg systemd.crash_shell=1 systemd.crash_chvt=1 systemd.log_level=info quiet
-- resume
RESUME=LABEL=Swap
-- /proc/filesystems
ext4
fuseblk
-- lsmod
Module Size Used by
michael_mic 1506 4
arc4 974 2
ecb 1405 2
lib80211_crypt_tkip 6709 1
aes_i586 6816 1
aes_generic 25738 1 aes_i586
lib80211_crypt_ccmp 3643 1
sco 5857 2
acpi_cpufreq 4943 0
bridge 32987 0
stp 996 1 bridge
bnep 7444 2
cpufreq_userspace 1480 0
rfcomm 25167 8
l2cap 21705 16 bnep,rfcomm
cpufreq_stats 1940 0
cpufreq_powersave 602 0
cpufreq_conservative 4018 0
ppdev 4058 0
lp 5570 0
vboxnetadp 5118 0
vboxnetflt 12555 0
vboxdrv 126550 2 vboxnetadp,vboxnetflt
fuse 43758 3
binfmt_misc 4907 1
dm_crypt 9127 0
dm_mod 46082 1 dm_crypt
joydev 6771 0
snd_intel8x0m 8100 0
pcmcia 17442 0
snd_intel8x0 19523 1
snd_ac97_codec 79148 2 snd_intel8x0m,snd_intel8x0
ac97_bus 710 1 snd_ac97_codec
snd_pcm_oss 28671 0
snd_mixer_oss 10461 1 snd_pcm_oss
btusb 7997 2
snd_pcm 47214 4 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_midi 3576 0
bluetooth 36327 9 sco,bnep,rfcomm,l2cap,btusb
rfkill 10264 3 bluetooth
snd_rawmidi 12505 1 snd_seq_midi
sg 15968 0
snd_seq_midi_event 3684 1 snd_seq_midi
snd_seq 35463 2 snd_seq_midi,snd_seq_midi_event
smsc_ircc2 8891 0
firewire_ohci 16509 0
8139too 14949 0
ipw2200 108368 0
yenta_socket 16403 1
irda 75920 1 smsc_ircc2
parport_pc 15799 1
sr_mod 10770 0
firewire_core 31187 1 firewire_ohci
8139cp 13421 0
libipw 18439 1 ipw2200
rsrc_nonstatic 7057 1 yenta_socket
snd_timer 12258 2 snd_pcm,snd_seq
snd_seq_device 3673 3 snd_seq_midi,snd_rawmidi,snd_seq
pcmcia_core 20450 3 pcmcia,yenta_socket,rsrc_nonstatic
lib80211 2870 4 lib80211_crypt_tkip,lib80211_crypt_ccmp,ipw2200,libipw
snd 34363 12 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
mii 2714 2 8139too,8139cp
crc_itu_t 1035 1 firewire_core
uhci_hcd 16057 0
cdrom 26487 1 sr_mod
container 1833 0
wbsd 8650 0
crc_ccitt 1039 1 irda
parport 22554 3 ppdev,lp,parport_pc
ac 1640 0
battery 3782 0
mmc_core 38503 1 wbsd
soundcore 3450 1 snd
processor 26599 2 acpi_cpufreq
pcspkr 1207 0
serio_raw 2916 0
psmouse 44657 0
evdev 5609 16
snd_page_alloc 5045 3 snd_intel8x0m,snd_intel8x0,snd_pcm
i2c_i801 6462 0
shpchp 21220 0
rng_core 2178 0
ehci_hcd 27851 0
pci_hotplug 18065 1 shpchp
usbcore 98402 4 btusb,uhci_hcd,ehci_hcd
nls_base 4541 1 usbcore
autofs4 16667 6
ext4 254973 2
mbcache 3762 1 ext4
jbd2 56091 1 ext4
crc16 1027 2 l2cap,ext4
radeon 509090 2
sd_mod 25869 5
crc_t10dif 1012 1 sd_mod
ttm 33378 1 radeon
ata_generic 2019 0
drm_kms_helper 18305 1 radeon
ata_piix 17640 4
drm 112020 4 radeon,ttm,drm_kms_helper
i2c_algo_bit 3497 1 radeon
video 14605 0
thermal 9206 0
libata 115721 2 ata_generic,ata_piix
output 1204 1 video
i2c_core 12696 5 i2c_i801,radeon,drm_kms_helper,drm,i2c_algo_bit
thermal_sys 9378 3 processor,video,thermal
button 3598 0
scsi_mod 101401 4 sg,sr_mod,sd_mod,libata
-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = no
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
postinst_hook = update-grub
postrm_hook = update-grub
-- /etc/initramfs-tools/initramfs.conf
MODULES=dep
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=local
DEVICE=
NFSROOT=auto
-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no
-- /etc/crypttab
# <target name> <source device> <key file> <options>
-- /sys/block
sda
sr0
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initramfs-tools depends on:
ii cpio 2.11-4 GNU cpio -- a program to manage ar
ii findutils 4.4.2-1 utilities for finding files--find,
ii klibc-utils 1.5.18-1 small utilities built with klibc f
ii module-init-tools 3.12-1 tools for managing Linux kernel mo
ii udev 160-1 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
ii busybox 1:1.15.3-1 Tiny utilities for small and embed
Versions of packages initramfs-tools suggests:
ii bash-completion 1:1.2-2 programmable completion for the ba
-- Configuration Files:
/etc/initramfs-tools/initramfs.conf changed [not included]
-- no debconf information
Reply to: