<font color="#666666"><font size="2"><font face="verdana,sans-serif">Daniel,<br><br>   It is working now. It was an issue with the ISO file. <br><br>The symbolic links for the various binaries within the ISO was not <br>retained while creating the ISO, which had caused this issue.<br>
<br>BTW, you had mentioned that mountall fails. Is this from the<br> fstab entries that is passed via lxc.conf?<br><br>I was able to mount a directory onto an empty directory within the mounted ISO(rootfs).<br><br>excerpt from the fstab:<br>
<i>none /lxc/rootfs.raven.iso/dev/pts devpts defaults 0 0<br>none /lxc/rootfs.raven.iso/proc proc defaults 0 0<br>none /lxc/rootfs.raven.iso/sys sysfs defaults 0 0<br>none /lxc/rootfs.raven.iso/var/lock tmpfs defaults 0 0<br>
none /lxc/rootfs.raven.iso/var/run tmpfs defaults 0 0<br>/etc/resolv.conf /lxc/rootfs.raven.iso/etc/resolv.conf none bind 0 0<br>/raven_data /lxc/rootfs.raven.iso/data auto defaults,bind 0 0<br></i><br><br>Thanks for the help.<br>
<br>-Alphonse<br><br><br></font></font></font><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 4:32 PM, Daniel Lezcano <span dir="ltr"><<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 07/25/2011 10:24 PM, Alphonse Hansel Anthony wrote:<br>
> Hi Daniel,<br>
><br>
>   I am using lxc utils (0.7.4.2).<br>
>   In my case, I am trying to mount the rootfs.iso as "/" within the<br>
> Container and it fails with "No such file or directory".<br>
><br>
> I am just wondering if any additional options are required to make the<br>
> mounted ISO visible across pivot_root boundaries, similar to "MS_BIND" mount<br>
> option for files/directories.<br>
><br>
> Can you copy-paste your lxc.conf file? I would like to cross verify with<br>
> options that I had specified.<br>
<br>
</div>lxc.network.type = veth<br>
lxc.network.flags = up<br>
lxc.network.link = br0<br>
lxc.utsname = lucid2<br>
<br>
lxc.tty = 4<br>
lxc.pts = 1024<br>
lxc.rootfs = /var/lib/lxc/lucid2/rootfs.iso<br>
lxc.mount  = /var/lib/lxc/lucid2/fstab<br>
<br>
lxc.cgroup.devices.deny = a<br>
# /dev/null and zero<br>
lxc.cgroup.devices.allow = c 1:3 rwm<br>
lxc.cgroup.devices.allow = c 1:5 rwm<br>
# consoles<br>
lxc.cgroup.devices.allow = c 5:1 rwm<br>
lxc.cgroup.devices.allow = c 5:0 rwm<br>
lxc.cgroup.devices.allow = c 4:0 rwm<br>
lxc.cgroup.devices.allow = c 4:1 rwm<br>
# /dev/{,u}random<br>
lxc.cgroup.devices.allow = c 1:9 rwm<br>
lxc.cgroup.devices.allow = c 1:8 rwm<br>
lxc.cgroup.devices.allow = c 136:* rwm<br>
lxc.cgroup.devices.allow = c 5:2 rwm<br>
# rtc<br>
lxc.cgroup.devices.allow = c 254:0 rwm<br>
<div><div></div><div class="h5"><br>
>     The second case that you had mentioned works for me.<br>
>   My rootfs is a directory on the host ( /root/lxcOne )<br>
>   Mount point for iso with rootfs (/root/lxcOne/mnt)<br>
>   After I add the mount options in fstab, I am able to view the content in<br>
> </root/lxcOne>/mnt<br>
>   directory.<br>
><br>
>   -Alphonse<br>
><br>
><br>
><br>
> On Mon, Jul 25, 2011 at 4:04 PM, Daniel Lezcano <<a href="mailto:daniel.lezcano@free.fr">daniel.lezcano@free.fr</a>>wrote:<br>
><br>
>> On 07/25/2011 08:17 PM, Alphonse Hansel Anthony wrote:<br>
>>>  Hi,<br>
>>>   I am trying to start a LXC, with a ISO image as the rootfs.<br>
>>><br>
>>> the excerpt of the mount options that I use in lxc.conf<br>
>>><br>
>>> lxc.rootfs = rootfs.iso<br>
>>> lxc.rootfs.mount = /lxc/rootfs<br>
>>><br>
>>> The error that I get while I start the LXC<br>
>>><br>
>>> -----<br>
>>> lxc-start: No such file or directory - failed to exec /sbin/init<br>
>>> lxc-start: invalid sequence number 1. expected 2<br>
>>> lxc-start: failed to spawn 'raven'<br>
>>> lxc-start: Device or resource busy - failed to remove cgroup<br>
>> '/cgroup/raven'<br>
>>> ------<br>
>>><br>
>>> on closer look at the lxc-start , I found the following<br>
>>><br>
>>> 1) the iso image is mounted at the specified location<br>
>>> 2) I am also able to stat the /sbin/init file.<br>
>>><br>
>>> I instrumented the code in file ${SRC_FOLDER}/src/lxc/start.c:: static<br>
>>> int start(struct lxc_handler *handler, void* data)<br>
>>> and I am able to stat the file /sbin/init just before execvp, but exec<br>
>>> fails with "No such file or directory".<br>
>>><br>
>>> Any help in this regard would be useful.<br>
>> I created a ISO image and started the container. The container starts as<br>
>> expected (but the mountall fails because the rootfs is RO.)<br>
>> Is it possible the iso image contains an extra directory where the<br>
>> rootfs belongs ? I mean, if you mount the iso image on a directory<br>
>> 'mnt', you should see '/mnt/usr, /mnt/lib, ...' is it the case ?<br>
>><br>
>><br>
<br>
</div></div></blockquote></div><br>