You should probably save it with a bind mount before cleanup:
   mkdir -p /mnt/root/rw
   mount -o bind /mnt/tmpfs/rw /mnt/root/rw
   then after the switch-root you can look in /rw to find all the modifications
   that have been made

   On Mon, May 13, 2013 at 9:43 AM, <[1]pau...@gmx.net> wrote:

     Â  Â Hi there
     Â   Â Iam  quite  new to aufs but I managed to get my gentoo boot a
     squashfs.img
     Â  Â into aufs-ro and aufs-rw. My system boots successfuly but how can I
     access
     Â  Â the rw-dir I defined in the initramfs after switch_root?
     Â  Â ### init #############
     Â  Â ...pre-stuff
     Â  Â ...
     Â  Â # mount the usb with the squash.img and copy it to tmpfs
     Â  Â mkdir -p /mnt/sdb1
     Â  Â mount /dev/sdb1 /mnt/sdb1
     Â  Â mkdir /mnt/tmpfs
     Â  Â mount -t tmpfs -o size=1500m tmpfs /mnt/tmpfs
     Â  Â cp -a /mnt/sdb1/squash.img /mnt/tmpfs
     Â  Â umount /dev/sdb1
     Â  Â # make aufs ro-rw-newroot
     Â  Â mkdir /mnt/ro_root
     Â  Â mkdir -p /mnt/tmpfs/rw
     Â  Â mount -o ro /mnt/tmpfs/squash.img /mnt/ro_root || rescue_shell
     Â  Â mount -t aufs -o br=/mnt/tmpfs/rw:/mnt/ro_root none /mnt/root
     Â  Â # Clean up.
     Â  Â umount /proc
     Â  Â umount /sys
     Â  Â umount /dev
     Â  Â # Boot the real thing.
     Â  Â exec switch_root /mnt/root /sbin/init || rescue_shell
     Â  Â #######################
     Â  Â my mount after switch_root looks like:
     Â  Â ########################
     Â  Â 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-relea
     se-a
     Â  Â gent.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)
     Â  Â #########################
     --------------------------------------------------------------------------
     ----
     Learn Graph Databases - Download FREE O'Reilly Book
     "Graph Databases" is the definitive new guide to graph databases and
     their applications. This 200-page book is written by three acclaimed
     leaders in the field. The early access version is available now.
     Download your free book today! [2]http://p.sf.net/sfu/neotech_d2d_may

References

   1. mailto:pau...@gmx.net
   2. http://p.sf.net/sfu/neotech_d2d_may
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

Reply via email to