[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#628374: initramfs-tools: Recent changes to hooks break busybox in initrd



Package: initramfs-tools
Version: 0.99
Severity: normal
Tags: patch


A recent change to /usr/share/initramfs-tools/hooks/busybox has removed the "busybox" link form the resulting initrd /bin. The current version installes busybox as "/bin/sh", but that precludes the usage of other tools for which there is no link created (e.g. "busybox grep" or "busybox basename").

This breaks scripts relying on /bin/busybox to work, as well as reduces the debugging possibilities afforded by the inclusing of busybox in the first place.

A simple patch to revert the change (tested with latest sid) -- note that it does not increase the size of the resulting initrd:
[=====]
-- busybox.orig        2011-05-28 15:47:24.855981628 +0200
+++ /usr/share/initramfs-tools/hooks/busybox    2011-05-28 16:22:49.009156696 +0200
@@ -20,5 +20,6 @@
	. /usr/share/initramfs-tools/hook-functions
        rm -f ${DESTDIR}/bin/sh
        rm -f ${DESTDIR}/bin/busybox
-       copy_exec ${BUSYBOXDIR}/busybox /bin/sh
+       copy_exec ${BUSYBOXDIR}/busybox /bin/busybox
+       ln -s busybox ${DESTDIR}/bin/sh
 fi
[=====]                         

Regards,
Mihnea

-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 11M May 28 16:23 /boot/initrd.img-2.6.38-2-amd64
-rw-r--r-- 1 root root 11M May 28 16:23 /boot/initrd.img-2.6.39-1-amd64
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-2.6.38-2-amd64 root=/dev/mapper/root ro i8042.nomux=1

-- /etc/kernel-img.conf
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = 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
cryptgnupg
cryptkeyctl
cryptopenct
cryptopensc
cryptpassdev
cryptroot
dmsetup
keymap
klibc
lvm2
mdadm
thermal
udev


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (100, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio                          2.11-7     GNU cpio -- a program to manage ar
ii  findutils                     4.5.10-1   utilities for finding files--find,
ii  klibc-utils                   1.5.22-1   small utilities built with klibc f
ii  module-init-tools             3.12-1     tools for managing Linux kernel mo
ii  udev                          170-1      /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii  busybox                       1:1.18.4-2 Tiny utilities for small and embed

Versions of packages initramfs-tools suggests:
ii  bash-completion               1:1.3-1    programmable completion for the ba

-- Configuration Files:
/etc/initramfs-tools/modules changed [not included]

-- no debconf information



Reply to: