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

chroot: failed to run command `telinit': No such file or directory



Hi,


I created a lxc container by running   lxc-create -n test4 -B lvm -t debian

here is the container config

root@lxc:~# cat /var/lib/lxc/test4/config

# Common configuration

# Container specific configuration
lxc.tty = 1
lxc.tty = 2
lxc.mount = /var/lib/lxc/test4/fstab
lxc.utsname = test4
lxc.arch = amd64
lxc.rootfs = /dev/lxc/test4

#lxc.utsname = test4
lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = br0

here is my hosts /etc/fstab

/dev/mapper/root_fs-os    /                         ext4              errors=remount-ro    0       1
/dev/sr0                          /media/cdrom0    udf,iso9660    user,noauto            0       0
none                              /sys/fs/cgroup     cgroup           defaults                  0       0

I started the container lxc-start -d -n test4

#My problem

I cannot shutdown the container using the lxc-shutdown command,

root@lxc:~# lxc-shutdown -n test4
chroot: failed to run command `telinit': No such file or directory

I understand that the problem arrises that some file is missing, so I tried to chroot into the rootfs of the container and try it manually

root@lxc:~# chroot /test4/

root@lxc:/# shutdown -h now
shutdown: /run/initctl: No such file or directory
init: /run/initctl: No such file or directory


root@lxc:/# /sbin/init 0
init: /run/initctl: No such file or directory


Any idea whats missing here from my config?



Reply to: