2014-05-16 3:13 GMT+08:00 Stephen Zhang <zsrk...@gmail.com>: > 2014-05-16 2:31 GMT+08:00 Fajar A. Nugraha <l...@fajar.net>: > > > On Fri, May 16, 2014 at 1:24 AM, Fajar A. Nugraha <l...@fajar.net> > wrote: > > > > > >> Works for me. Did you do it like I did? > >> > >> root@trusty:~# status tty1 > >> tty1 start/running, process 443 > >> root@trusty:~# status cron > >> cron start/running, process 407 > >> root@trusty:~# status cron > >> root@trusty:~# runlevel > >> N 2 > >> > >> > > for clarity purpuses: the above commands were executed on the maverick > > container. It's just that the hostname of the container is also "trusty" > > (since by default the rootfs created in /var/cache/lxc* has hostname the > > same as the host) > > > > > > > > > >> - (in the container) create /etc/init/lxc-console.conf > >> > >> ### > >> start on stopped rc RUNLEVEL=[2345] and container CONTAINER=lxc > >> > > > > this should be only > > > > start on stopped rc RUNLEVEL=[2345] > > > > container detection only works on newer versions of upstart. > > > > > > > > > > > >> stop on runlevel [!2345] > >> > >> respawn > >> exec /sbin/getty -8 38400 lxc/console > >> ### > >> > >> > > > Aha~~ I am sure that I did everything that you did, including adding > "lxc.include > = /usr/share/lxc/config/ubuntu.common.conf" to the config file and > commented > all lines below except "lxc.aa_profile = unconfined". And just now I > followed what you did. it seems that the 2nd problem has been solved, but > the 1st one still remain. > I started the container, and ran the command "runlevel", to my > surprise, it returned "unknown". But how could I specify the run > level? > > Stephen >
I have fixed all problems that I have found yet. It is just in /etc/init/rc-sysinit.conf that contains "start on filesystem and net-device-up IFACE=lo", but I have removed mount*.conf and network*.conf, so "filesystem" and "net-dev-up" were never to be emitted, as a result, rc-sysinit never started and the runlevel, which should be set in "rc-sysinit", were never set. So,after I changed the rc-sysinit.conf to "start on startup", all things go well! Thank you veeeeeeeeery much for helping a reeeeeeeeally a lot, Fajar. :-) Regards, Stephen
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users