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

Bug#572939: Busybox lacks switch_root command



Package: busybox
Version: 1:1.14.2-2
Severity: normal

Hi,

please add the switch_root command to Debians busybox that the linux
Documentation/filesystems/ramfs-rootfs-initramfs.txt describes.

Since it is impossible to get rid of libc6 in the initramfs I looked
into getting rid of klibc instead. But that also is practically
impossible.

The rootfs used by initramfs does not allow for mount --bind/--move and
therefore the old pivot_root way of switching from initrd to real root
does not work. pivot_root always returns an error. The new way involves
deleting all files in the rootfs and then mounting the real root to /
and exec-ing /sbin/init. Which is basically impossible to do with a
shell script.

The klibc provides a run_init binary to do this but eglibc has no
equivalent. Busybox is supposed to have a switch_root command but under
Debian it does not. So you are left with needing run_init + klibc or
leaving cruft being in the rootfs and wasting the memory it takes up.

MfG
        Goswin


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (499, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31.6-xen-2010.02.18 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages busybox depends on:
ii  libc6                         2.10.2-6   Embedded GNU C Library: Shared lib

busybox recommends no packages.

busybox suggests no packages.

-- no debconf information



Reply to: