Re: Unionfs in -mm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux