[lxc-users] Container starts on incorrect runlevel

Fajar A. Nugraha list at fajar.net
Thu Oct 15 11:35:11 UTC 2015


On Thu, Oct 15, 2015 at 5:29 PM, Davide Baldini
<baldiniebaldini at gmail.com> wrote:
> Thanks Fajar,
>
> it turned out to be simpler: the guest OS was simply missing e2fsprogs, thus
> sysvinit couldn't switch from runlevel "S" into 2 because of a blocking
> warning message about failed disk check, indicating the culprit was a

That by itself is wrong.

AFAIK in lxc the host does all the mounting, even when the container
is backed by a block device. So there should be no need for the
container to run fsck.

You might be able to get around this by using an empty fstab for the
container. Possibly by mounting a file from the host (e.g.
/var/lib/lxc/c1/mount/fstab) as container's etc/fstab.

> /etc/rcS.d/ script. That's what got me believe the container was preset to
> start in "S". I wasn't aware that "S" scripts are executed even when
> starting in 2. After installing e2fsprogs, the guest successfully switches
> to 2.

Err ... what does the guest do, exactly?

Wouldn't an fsck that runs when an fs is mounted read-write
potentially cause an error to the fs? And again, AFAIK the host would
mount the necessary block device read-write before the container is
started.

-- 
Fajar


More information about the lxc-users mailing list