Package: initramfs-tools Version: 0.92o Severity: normal Tags: patch Hi. I'm trying to get something like LiveFlash working with btrfs as root filesystem. Currently debian versions of blkid(8) and other e2fsprogs binaries don't recognize it. According to initramfs-tools(8) it's possible to specify filesystem type manually at boot time using "rootfstype=my_fs" parameter.
Current version of initramfs-tools waits for root device to appear and checks that filesystem type can be detected: while [ ! -e "${ROOT}" ] \ || ! $(get_fstype "${ROOT}" >/dev/null); do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) [ ${slumber} -gt 0 ] || break done But get_fstype don't understand btrfs, so it just waits for timeout here. My problem is that ROOTFSTYPE is used only _after_ this loop and there is no way to workaround it. I think that we should allow get_fstype to fail if filesystem type was provided manually at boot time. We can just check something like [ -z "${ROOTFSTYPE}" ]. Please take a look to attached patch as a reference fix. Thanks -- Package-specific info: -- /proc/cmdline root=/dev/mapper/laptop-deb_root resume=swap:/dev/mapper/laptop-swap ro -- /proc/filesystems reiserfs fuseblk ext3 -- lsmod Module Size Used by ipt_MASQUERADE 5120 1 iptable_nat 7632 1 nf_nat 21720 2 ipt_MASQUERADE,iptable_nat nf_conntrack_ipv4 17368 3 iptable_nat,nf_nat nf_conntrack 72800 4 ipt_MASQUERADE,iptable_nat,nf_nat,nf_conntrack_ipv4 ipt_REJECT 5312 1 iptable_filter 5184 1 ip_tables 19536 2 iptable_nat,iptable_filter x_tables 23560 4 ipt_MASQUERADE,iptable_nat,ipt_REJECT,ip_tables rfcomm 39584 2 l2cap 22912 9 rfcomm kvm_amd 27724 1 kvm 134512 1 kvm_amd cpufreq_powersave 4160 0 cpufreq_stats 7556 0 cpufreq_userspace 6020 0 cpufreq_ondemand 9552 1 cpufreq_conservative 9480 0 ipv6 294440 20 tun 13572 2 ext3 123984 1 jbd 54056 1 ext3 mbcache 10884 1 ext3 fuse 53056 1 powernow_k8 16844 1 freq_table 6976 3 cpufreq_stats,cpufreq_ondemand,powernow_k8 sbp2 24460 0 loop 17868 0 arc4 4096 2 ecb 5120 2 crypto_blkcipher 19588 1 ecb snd_hda_intel 440380 1 rt61pci 22400 0 crc_itu_t 4352 1 rt61pci snd_pcm_oss 39264 0 snd_mixer_oss 16960 1 snd_pcm_oss rt2x00pci 9600 1 rt61pci rt2x00lib 38720 2 rt61pci,rt2x00pci snd_pcm 79880 2 snd_hda_intel,snd_pcm_oss rfkill 12324 2 rt2x00lib snd_timer 24080 1 snd_pcm snd_page_alloc 10832 2 snd_hda_intel,snd_pcm snd_hwdep 10120 1 snd_hda_intel led_class 6728 1 rt2x00lib snd 62712 8 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_hwdep mac80211 222064 2 rt2x00pci,rt2x00lib psmouse 40988 0 k8temp 7040 0 serio_raw 7876 0 soundcore 10256 1 snd cfg80211 27728 2 rt2x00lib,mac80211 eeprom_93cx6 4736 1 rt61pci pcspkr 4864 0 isp1760 20400 0 yenta_socket 26444 1 rsrc_nonstatic 11712 1 yenta_socket i2c_nforce2 8768 0 i2c_core 26848 1 i2c_nforce2 ac 7368 0 battery 14792 0 video 23700 0 output 5440 1 video button 9760 0 evdev 12816 20 hci_usb 16728 2 usbhid 43856 0 hid 41168 1 usbhid bluetooth 59428 7 rfcomm,l2cap,hci_usb ff_memless 7368 1 usbhid usb_storage 77792 1 dm_mirror 19392 0 dm_log 12036 1 dm_mirror dm_snapshot 18184 0 dm_mod 58336 20 dm_mirror,dm_log,dm_snapshot sg 34640 0 sr_mod 17460 0 cdrom 35944 1 sr_mod ohci_hcd 26460 0 pata_acpi 7040 0 sdhci_pci 10048 0 ohci1394 31156 0 sdhci 18628 1 sdhci_pci ieee1394 91952 2 sbp2,ohci1394 mmc_core 54528 1 sdhci ssb 41796 1 ohci_hcd pcmcia 37400 1 ssb pcmcia_core 38628 4 yenta_socket,rsrc_nonstatic,ssb,pcmcia ehci_hcd 36300 0 pata_amd 15044 0 ata_generic 7940 0 r8169 29828 0 mii 7616 1 r8169 sd_mod 28776 4 thermal 23200 1 processor 49912 2 powernow_k8,thermal fan 7560 1 thermal_sys 15232 4 video,thermal,processor,fan sata_nv 26248 2 libata 169920 4 pata_acpi,pata_amd,ata_generic,sata_nv scsi_mod 160536 6 sbp2,usb_storage,sg,sr_mod,sd_mod,libata dock 11936 1 libata reiserfs 214032 7 -- /etc/kernel-img.conf # Kernel image management overrides # See kernel-img.conf(5) for details do_symlinks = yes 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=list BUSYBOX=y KEYMAP=n BOOT=local DEVICE=eth0 NFSROOT=auto -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (100, 'experimental') Architecture: i386 (x86_64) Kernel: Linux 2.6.27.7 (SMP w/2 CPU cores; PREEMPT) 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.9-14 GNU cpio -- a program to manage ar ii findutils 4.4.0-2 utilities for finding files--find, ii klibc-utils 1.5.12-2 small utilities built with klibc f ii module-init-tools 3.4-1 tools for managing Linux kernel mo ii udev 0.125-7 /dev/ and hotplug management daemo Versions of packages initramfs-tools recommends: ii busybox 1:1.10.2-2 Tiny utilities for small and embed initramfs-tools suggests no packages. -- no debconf information -- WBR, Dmitry
--- initramfs-tools-0.92o.orig/scripts/local 2008-08-13 16:23:44.000000000 +0300 +++ initramfs-tools-0.92o/scripts/local 2009-01-18 12:28:17.541027321 +0200 @@ -50,7 +50,7 @@ slumber=$(( ${slumber} * 10 )) while [ ! -e "${ROOT}" ] \ - || ! $(get_fstype "${ROOT}" >/dev/null); do + || ( [ -z "${ROOTFSTYPE}" ] && ! $(get_fstype "${ROOT}" >/dev/null) ); do /bin/sleep 0.1 slumber=$(( ${slumber} - 1 )) [ ${slumber} -gt 0 ] || break
signature.asc
Description: Digital signature