On Sat, Jan 13, 2007 at 01:48:04AM -0500, Josef Sipek wrote:
> > The root filesystem is a union of a ro squashfs and a rw tmpfs.
> > The initramfs sets it up something like this:
> > 
> > mkdir /os
> > mount -r -t squashfs /dev/ram0 /os
> > 
> > mkdir /cow
> > mount -t tmpfs -o mode=0755 tmpfs /cow
> > 
> > mount -w -o dirs=/cow=rw:/os=ro -t unionfs unionfs /root
>  
> From the names of the mountpoint I assume you chroot, pivot_root, etc.
> Right?

yes. I'm using debian etch initramfs-tools. After the above mount
sequence, the unionfs becomes root via:

        mkdir ${rootmnt}/cow ${rootmnt}/os
        mount -n -o move /cow ${rootmnt}/cow
        mount -n -o move /os ${rootmnt}/os

        mount -n -o move /dev $rootmnt/dev
        mount -n -o move /sys ${rootmnt}/sys
        mount -n -o move /proc ${rootmnt}/proc

followed by using klibc's run-init, which does the pivot_root/chroot/etc
in C:

        exec run-init ${rootmnt} ${init} "$@" <${rootmnt}/dev/console 
>${rootmnt}/dev/console

> Does the problem manifest itself when you mount proc on /root/proc?

well, it _is_ mounted there. Do you mean mounting it there without using
-o move? I'd have to modify the non-templated part of mkinitramfs to do
that but I could try it.

> Thanks for trying the code,

thanks for writing it. fyi, I've had better results with aufs - you
may want to check that out. I'll keep an eye on unionfs as well.

Jason
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to