Wednesday, July 6, 2011

Issues with Busybox LXC on Debian v6?

I've moved the active 'Linux VServers' I had running over to 'Linux Containers' (LXC).  Have also been doing some experimentation.

Tried setting up a busybox container but had problems.

11:45 - cobweb is i686 system;  why is the container being configured with
the "/lib64" mount?

root@cobweb:/usr/lib/lxc/templates# lxc-start -n bsybx
lxc-start: No such file or directory - failed to mount '/lib64' on '/var/lib/lxc/bsybx/rootfs/lib6
lxc-start: failed to setup the mount entries for 'bsybx'
lxc-start: failed to setup the container
lxc-start: invalid sequence number 1. expected 2
lxc-start: failed to spawn 'bsybx'

    -> commented out the following two lines in the created bsybx config
#lxc.mount.entry=/lib64 /var/lib/lxc/bsybx/rootfs/lib64 none ro,bind 0 0
#lxc.mount.entry=/usr/lib64 /var/lib/lxc/bsybx/rootfs/usr/lib64 none ro,bind 0 0

    -> that allows it to boot but so far it just tries sending out discover:

root@cobweb:~# lxc-start -n bsybx
init started: BusyBox v1.17.1 (Debian 1:1.17.1-8)
starting pid 2, tty '': '/etc/init.d/rcS'
udhcpc (v1.17.1) started
Sending discover...
Sending discover...
Sending discover...

    ->  wouldn't be an issue if the container has a static IP.(still need to
    figure how to do that in an lxc container)

root@cobweb:~# aptitude search udhcpc
p   udhcpc                    - Provides the busybox DHCP client implementation       
root@cobweb:~# aptitude install udhcpc

    - but that may not entirely help as it still needs to be configured for
    actual use? 


12:38 - commented out the "udhcpc" line in etc/rcS

    -> that goes further but there are still problems:
root@cobweb:~# lxc-start -n bsybx
init started: BusyBox v1.17.1 (Debian 1:1.17.1-8)
starting pid 2, tty '': '/etc/init.d/rcS'
starting pid 6, tty '': '/bin/getty -L tty1 115200 vt100'

Please press Enter to activate this console.
starting pid 7, tty '': '/bin/sh'

BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off

-> ran lxc-stop -n bsybx


 lxc-start -n bsybx -d
 lxc-console -n bsybx -d

-> that does come up with a login prompt but it doesn't go anywhere

-> checked & the login cmd shows as being present but found the following
note at

"Unfortunately, the default busybox binary in Debian squeeze is insufficient.
The busybox package doesn't include the "init" command, and the busybox-static  package doesn't have "login".

So will need to do some research on this.

No comments:

Post a Comment