From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Lunz Subject: Re: Unionfs in -mm Date: Tue, 16 Jan 2007 18:03:28 -0500 Message-ID: <20070116230327.GA3826@knob.reflex> References: <20070109004456.GA7954@filer.fsl.cs.sunysb.edu> <20070109200857.GA28443@knob.reflex> <20070113064804.GA24389@filer.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: unionfs@fsl.cs.sunysb.edu, linux-fsdevel@vger.kernel.org Return-path: Received: from crown.reflexsecurity.com ([72.54.139.163]:56506 "EHLO crown.reflexsecurity.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751759AbXAPXDb (ORCPT ); Tue, 16 Jan 2007 18:03:31 -0500 To: Josef Sipek Content-Disposition: inline In-Reply-To: <20070113064804.GA24389@filer.fsl.cs.sunysb.edu> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org 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