[pkg-cryptsetup-devel] Bug#783297: breaks initramfs if BUSYBOX=n

Michael Biebl biebl at debian.org
Sat Apr 25 23:35:19 UTC 2015


On Sat, 25 Apr 2015 16:22:13 +0200 Michael Biebl <biebl at debian.org> wrote:
> Package: cryptsetup
> Version: 2:1.6.6-5
> Severity: grave
> 
> Hi,
> 
> if the cryptsetup package is installed, it also installed a
> initramfs-tools hook.
> 
> I use BUSYBOX=no in initramfs.conf, but the  cryptroot hook copies
> /bin/busybox to the initramfs nonetheless.
> 
> As a result, the initramfs is unable to boot the system
> 
> I'm getting
> Begin: Running /scripts/init-bottom ... done
> /init: exec: line 338: switch_root: not found
> ...Kernel panic -n not syncing: Attempted to kill init
> 
> 
> To reproduce the bug, make sure you have the "busybox" package installed
> (which it is, by default), set BUSYBOX=n in
> /etc/initramfs-tools/initramfs.conf and run "update-initramfs -u" and
> reboot.
> 


I looked into this in more detail, and the culprit seems to be
/usr/share/initramfs-tools/conf-hooks.d/cryptsetup
which forcefully set's
BUSYBOX=y.

/usr/share/initramfs-tools/hooks/busybox will see the BUSYBOX=y setting
and copy the busybox binary.

/usr/share/initramfs-tools/hooks/zz-busybox sources
/etc/initramfs-tools/initramfs.conf, therefor BUSYBOX=n will be set
again, and the symlinks are not created.

The result is a broken initramfs.


I'm not sure, what is supposed to take precedence in such a case: The
configuration in /etc/initramfs-tools/initramfs.conf or
/usr/share/initramfs-tools/conf-hooks.d/cryptsetup and if it's a bug in
cryptsetup which forcefully overrides BUSYBOX= or if it's a bug in
busybox, which sources /etc/initramfs-tools/initramfs.conf in
/usr/share/initramfs-tools/hooks/zz-busybox and therefor doesn't respect
the settings which are set via conf-hooks.d.


I've CCed the initramfs-tools and busybox maintainers for their input.


If cryptsetup really requires busybox and forcefully sets BUSYBOX=y, why
does the cryptsetup package not depend on busybox?

I see several possible fixes here

a/ /usr/share/initramfs-tools/hooks/zz-busybox doesn't source
/etc/initramfs-tools/initramfs.conf directly and as a result respects
settings from hooks directories.

b/ /usr/share/initramfs-tools/conf-hooks.d/cryptsetup drops the
BUSYBOX=y line. And if this is not an option, because cryptsetup
requires busybox, then this should be reflected in the package
dependencies accordingly by making the Recommends a Depends.






-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/attachments/20150426/3b149167/attachment.sig>


More information about the pkg-cryptsetup-devel mailing list