[lxc-devel] [ lxc-Bugs-3165633 ] busybox template doesn't start properly

Rob Landley rlandley at parallels.com
Sat Feb 5 00:57:16 UTC 2011


On 02/01/2011 03:31 PM, SourceForge.net wrote:
> /etc/init.d/rcS do not use full path to syslogd, mount and udhcpc executables.
> As busybox requires /proc mounted if CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" to run these commands without full path, the full path should be used in the startup script as /proc is mounted later in the script.
> 
> It also fails to start the machine if /lib64 does not exist on the host system as there is a mount entry for /lib64 in the config.

I note that there are static versions of busybox defconfig builds for a
bunch of different architectures unde http://busybox.net/downloads/binaries/

And if your build script wgets one of those (try busybox-$(uname -m) and
fall back to i686 if it's not there), then you don't need any of the
host libraries at _all_.

Try something like:

mkdir $NEWWROOT/bin
for i in busybox-$(uname -m) busybox-i686
do
  wget http://busybox.net/downloads/binaries/latest/$i \
    -o $NEWROOT/bin/busybox && break
done
chmod +x $NEWROOT/busybox || exit 1

for i in $($NEWROOT/busybox-x86_64 --list-full | \
           sed 's@[^/]*$@@' | sort -u)
do
  mkdir -p $NEWROOT/$i
done

for i in $(./busybox -x86_64 --list-full)
do
  ln -s /bin/busybox $NEWROOT/$i
done

And the "fail to fall back to $PATH if no /proc/self/exe" thing is a
_bug_ which I believe Denys just fixed upstream, and which should be in
the next bugfix release.

Rob




More information about the lxc-devel mailing list