[lxc-users] Ubuntu (maverick) container hangs at init

Stephen Zhang zsrkmyn at gmail.com
Fri May 16 03:29:08 UTC 2014


2014-05-16 3:13 GMT+08:00 Stephen Zhang <zsrkmyn at gmail.com>:

> 2014-05-16 2:31 GMT+08:00 Fajar A. Nugraha <list at fajar.net>:
>
> > On Fri, May 16, 2014 at 1:24 AM, Fajar A. Nugraha <list at fajar.net>
> wrote:
> >
> >
> >> Works for me. Did you do it like I did?
> >>
> >> root at trusty:~# status tty1
> >> tty1 start/running, process 443
> >> root at trusty:~# status cron
> >> cron start/running, process 407
> >> root at trusty:~# status cron
> >> root at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140516/b6b678b9/attachment.html>


More information about the lxc-users mailing list