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

Bug#736521: busybox-static: 1:1.22.0-1 makes initrd.img unbootable



24.01.2014 18:41, HIGUCHI Daisuke (VDR dai) пишет:
> Package: busybox-static
> Version: 1:1.22.0-1
> Severity: important
> 
> busybox-static 1:1.22.0-1 makes initrd.img unbootable.
> boot stopped with below message.
> 
> -----
> /init: exec: line 331: switch_root: not found
> -----

This is because in order to use busybox applets, you have to call it either
`busybox $applet_name', or to have a link with $applet_name to busybox
binary.

I deliberately removed the behind-the-scenes calling of busybox applets
internally, when busybox executes itself without searching in $PATH as
usual.  Because this way, you can't control which implementation to
invoke (busybox or external), and there are many alternatives.

It is more, -- quite often when you use busybox together with another
util, you may see surprizes.  For example:

 busybox nc <host> <port> -e dd of=filename oflag=direct

-- this fails, because busybox runs its own dd, which does not have
`oflag' option at all.  Ditto for tar and other utils.

In order to fix the initrd issue with busybox.static, we need to
use initramfs hook similar to what non-static version provides.

Actually I'm not sure what to do here.  I didn't think about using
_static_ version of busybox in initramfs, it is not really intended
for that purpose, but rather for some system repair work.

So while I provided necessary setup for regular build to ensure
initramfs works, I never thought about busubox-static in this
context.

But busybox and busybox-static conflicts and replaces one another,
and initramfs-tools uses busybox by default if it is installed.
So this breaks every system where busybox-static is installed,
which is not good...

So I think I'll just copy the same initramfs hook script to
static package, at least for now, to fix this issue.

Thank you!

/mjt


Reply to: