View Single Post
Posts: 946 | Thanked: 1,650 times | Joined on Oct 2009 @ Germany
#54
a reverse "optification" could be another solution:

mount eMMC on /emmc
bind mount top directories in / to /emmc/rootfs/*, e.g., mount /usr to /emmc/rootfs/usr
chroot to /emmc (later done during boot process)
create symlinks to /rootfs/*, e.g., symlink /rootfs/usr/bin/* to /usr/bin

this is basically unionfs for free and works fine:

Code:
mkdir -p /home/nroot/rootfs
cd /home/nroot/rootfs
mkdir bin boot cdrom dev etc floppy initrd lib media mnt proc root sbin srv sys syspart tmp usr var
for f in *; do mount -o bind /$f /home/nroot/rootfs/$f; ln -s rootfs/$f ../$f; done
mkdir -p home/user opt
mount -o bind /home/opt opt
mount -o bind /home/user home/user
chroot .
now, instead of symlinking usr we should exclude some directories
for which only the contents should be symlinked as packages might install new files in those
e.g. usr/{bin,lib,share} etc.

Last edited by titan; 2010-02-10 at 13:22. Reason: example
 

The Following 2 Users Say Thank You to titan For This Useful Post: