Patrick wrote: > Patrick schrieb: >> Patrick schrieb: >>> Flemming Madsen schrieb: >>> >>>> Patrick wrote: >>>> >>>>> But isnt there another way? e.g. copying / mount-moving/binding >>>>> real_root to the union or something like that? >>>>> >>>>> >>>> The way i make access to the underlying filesystems is to 'mount -o >>>> move' the underlying >>>> mount point into the union berfore i chroot into it. >>>> >>>> In my setup i have in the flash: >>>> >>>> - A squashfs root filesystem to boot on >>>> - A ram filesyatem to pickup writes >>>> - A /flash to persist things >>>> - The /flash/root directory for patching the squashfs root >>>> >>>> I have these in /mnt and move them into the union to have access to >>>> the >>>> underlying >>>> filesystems after the chroot >>>> >>>> Sketchy: Eg. (with unionfs) >>>> >>>> mount /mnt/ram/ >>>> mount /mnt/flash/ >>>> mount / /mnt/initroot -o bind >>>> >>>> mount -t unionfs unionfs /mnt/union -o >>>> dirs=/mnt/ram:/mnt/flash/root=ro:/mnt/initroot=ro >>>> >>>> mount /mnt/flash /mnt/union/mnt/flash -o move >>>> mount /mnt/ram /mnt/union/mnt/ram -o move >>>> mount /mnt/initroot /mnt/union/mnt/initroot -o move >>>> >>>> cd /mnt/union >>>> chroot . init # Rock & roll >>>> >>> Heh, thats what I exactly tried myself .. but here it doesnt work . >>> none of the mounted filesystems that were moved are accessable / >>> viewable in the union later on. >>> >>> >> heh okay, got that one fixed (added some sleep's and seen it was a >> typo tho.. now my question is .. your /mnt/ram is tmpfs I guess while >> /mnt/flash is where? like where is it actually stored? (only thing I >> can imagine is onto the rootfs) >> > Hmm .. well I think I was wrong with that assumption .. seems as if > your /flash is on another partition/device than the rootfs is .. > otherwise it wouldnt work, would it since the rootfs is mounted ro .. > enlighten me please! > > regards, > Patrick >
Sure :) I have the squashfs in /dev/mtd3 and a writeable jffs2 filesystem in /dev/mtd4: Kernel command line in u-boot, also disables some probing that look nasty at boot time: root=/dev/mtdblock3 rootfstype=squashfs noinitrd load_ramdisk=0 console=ttyS4,115200 mem=32M /etc/fstab: # /etc/fstab: static file system information. # # <file system> <mount pt> <type> <options> <dump> <pass> proc /proc proc defaults,noauto 0 0 devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 tmpfs /mnt/ram tmpfs rw,noauto,size=8m,nr_inodes=2500 0 0 /dev/mtdblock4 /mnt/flash jffs2 rw,noauto 0 0 It shouldnt matter whether the 'mtd' or 'mtdblock' device are used. as jffs2 calls directly into the mtd driver. /Flemming ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV