Hope I'm in the right section - point me in the right direction if not, TIA.
Current setup:
[paul@localhost ~]$ uname -a
Linux localhost.localdomain 2.6.32.8-pclos5.bfs #1 SMP PREEMPT Sat Feb 13 03:56:10 CST 2010 i686 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz GNU/Linux
[paul@localhost ~]$ unionctl -V
unionctl version: $Id: unionctl.c,v 1.1 2006/05/31 02:51:04 dquigley Exp $
Distributed with Unionfs 1.4
<snip>
I'm trying to implement the stuff at
http://www.howtoforge.com/safe_mirror_unionfs_chrootSimplified version of what I'm trying:
export TMPUFS=~/mnt/tmpufs
mkdir -p $TMPUFS $TMPUFS/cache $TMPUFS/union
chmod 777 $TMPUFS/cache
# Create virtual ext2 volume - 16M large, and mount it
dd if=/dev/zero of=$TMPUFS/cache.img bs=16M count=1
mkfs.ext2 $TMPUFS/cache.img -F
sudo mount $TMPUFS/cache.img $TMPUFS/cache -o loop
# Union the volume with / as read only
sudo mount -t unionfs -o dirs=$TMPUFS/cache:/=ro unionfs $TMPUFS/union
ls -l /$TMPUFS/union
My result:
[all but last line of code above omitted]
[paul@localhost mnt]$ ls -l /$TMPUFS/union
ls: cannot access //home/paul/mnt/tmpufs/union/sys: No such file or directory
ls: cannot access //home/paul/mnt/tmpufs/union/proc: No such file or directory
total 180
drwxr-xr-x 1 root root 4096 2010-03-17 09:30 bin/
drwxr-xr-x 1 root root 4096 2010-03-24 14:25 boot/
drwxrwxrwx 1 root root 4096 2010-03-22 12:42 conf/
drwxr-xr-x 1 root root 4180 2010-03-24 14:25 dev/
drwxr-xr-x 1 root root 12288 2010-03-24 16:34 etc/
drwxr-xr-x 1 root root 4096 2010-03-16 10:41 home/
drwxr-xr-x 1 root root 4096 2010-03-12 16:20 initrd/
drwxr-xr-x 1 root root 12288 2010-03-24 11:41 lib/
drwx------ 1 root root 12288 2010-03-24 16:34 lost+found/
drwxr-xr-x 1 root root 4096 2010-03-24 14:24 media/
drwxr-xr-x 1 root root 4096 2010-03-17 12:23 mnt/
-rw-r--r-- 1 root root 75140 2010-03-24 11:40 Module.symvers
drwxr-xr-x 1 root root 4096 2010-03-15 16:30 opt/
d????????? ? ? ? ? ? proc/
drwxr-xr-x 1 root root 4096 2010-03-24 12:31 proc2/
drwxr-xr-x 1 root root 4096 2010-03-24 16:35 root/
drwxr-xr-x 1 root root 12288 2010-03-24 11:40 sbin/
drwxr-xr-x 1 root root 4096 2010-02-22 12:36 swap/
d????????? ? ? ? ? ? sys/
drwxrwxrwt 1 root root 240 2010-03-24 16:27 tmp/
drwxr-xr-x 1 root root 4096 2010-01-28 11:48 usr/
drwxr-xr-x 1 root root 4096 2010-03-12 15:30 var/
[paul@localhost mnt]$ ls -l /$TMPUFS/union/proc
ls: cannot access //home/paul/mnt/tmpufs/union/proc: No such file or directory
[paul@localhost mnt]$
What's up with /proc and /sys?
I can't chroot into this directory and expect anything that relies on ps to work for example.
/tmp and /dev work without the mount tricks referred to in the link up top (with the exception of the softlinks in /dev to stuff in /proc of course, because it ain't there.)
Any pointers appreciated.
I've tried with a couple of 'tiny' distributions in VirtualBox to see if this is something fundamental with unionfs rather than PCLOS, but the unionfs support seems to be rather lacking in them.