This worked like a charm. Thank you very much :)

   Gesendet: Montag, 13. Mai 2013 um 11:07 Uhr
   Von: "Sam Liddicott" <s...@liddicott.com>
   An: pau...@gmx.net
   Cc: aufs-users <aufs-users@lists.sourceforge.net>
   Betreff: Re: (initramfs) How to access rw-part after switch_root ?
   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-release
     -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. file://localhost/tmp/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