I've created a gentoo-live system which should be booted from a CF-card. The whole file-system is in a squashfs. I've created a custom initrd which first mounts the CF-card and from there the squashed filesystem into what will become
/etc to be writable so I've copied it to the CF-card added a bind. This however does not seem to work. The system boots but /etc is not mounted.
I'd like to know if my approach is right and what I can do to fix it or if not what would be the right way to achieve this.
init-script from my
#!/bin/busybox sh mount -t proc none /proc mount -t sysfs none /sys mount /dev/sda1 /mnt/flash mount -o loop /mnt/flash/filesystem.squashfs /mnt/root mount -B /mnt/flash/etc /mnt/root/etc mount -o remount,rw /mnt/root/etc umount /proc umount /sys exec switch_root /mnt/root /sbin/init
This is the shortened output of
rootfs / rootfs rw 0 0 /dev/sda1 /mnt/flash ext2 rw,relatime,errors=continue,user_xattr,acl 0 0 /dev/loop0 / squashfs ro,relatime 0 0 ...