dasPaul Apprentice
Joined: 14 Feb 2012 Posts: 243 Location: Dresden
|
Posted: Fri May 10, 2013 10:20 am Post subject: [solved]Access aufs-rw dir after init |
|
|
Hi there
I made my gentoo booting into an aufs-tmpfs-mount. Here is the snipped from my
initramfs:
Code: |
pre stuff ....
# Mount the root filesystem.
mkdir -p /mnt/$ROOT_P
mount -o ro /dev/$ROOT_P /mnt/$ROOT_P ## mount the squashfsimg containing device
mkdir /mnt/tmpfs
mount -t tmpfs -o size=$ROOT_SIZE tmpfs /mnt/tmpfs ## create the the tmpfs
cp -a /mnt/sr0/m4 /mnt/tmpfs ## copy the squashfsimg into tmpfs
umount /dev/$ROOT_P ## remove the device
mkdir /mnt/ro_root ## the readonly mountpoint of the squashfsimg & aufs
mkdir -p /mnt/tmpfs/rw ## the readwrite part of the aufs where changes are stored
mount -o ro /mnt/tmpfs/m4 /mnt/ro_root || rescue_shell ## mount the squashfsimg to readonly
mount -t aufs -o br=/mnt/tmpfs/rw:/mnt/ro_root none /mnt/root ## mount the final aufs to newroot
...
cleaning
switch_root...
|
So far this works, but after gentoo has booted I would like to access the dir containing the changes stored by aufs (should be /mnt/tmpfs/rw). But after login my mounts are only:
Code: |
mount:
rootfs on / type rootfs (rw)
tmpfs on /mnt/tmpfs type tmpfs (rw,relatime,size=1536000k)
/dev/loop0 on /mnt/ro_root type squashfs (ro,relatime)
none on / type aufs (rw,relatime,si=97dd6d33cdfc9433)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=505505,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
cgroup_root on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755)
openrc on /sys/fs/cgroup/openrc type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc)
cpuset on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cpu on /sys/fs/cgroup/cpu type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
cpuacct on /sys/fs/cgroup/cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
freezer on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nodev,noexec,nosuid)
|
my /mnt dir is empty
Is there any way to access the "/mnt/tmpfs/rw" from the init? |
|