I've been trying to get a looped filesystem to work but it doesn't work properly.
After installing SSRLS7 to the SD card i thought i'd try to create a couple of loop files, mount them and copy the contents of the partitions to those respective files. So i did that.
Then i put them on the sdcard (on an ext2 partition, partition no2) and changed the init.rc to like this:
# mount mtd partitions
mount ext2 /dev/block/mmcblk0p2 /mnt/mb
losetup /dev/loop0 /mnt/mb/multiboot/snow/system
losetup /dev/loop1 /mnt/mb/multiboot/snow/data
mount ext2 /dev/loop0 /system
# Mount /system rw first to give the filesystem a chance to save a checkpoint
# mount ext2 /dev/block/mmcblk0p4 /system
# Mount /system ro as stricter security settings required, ZTE_BOOT_LIWEI_20110307
# Move To "on post-fs" part to leave a chance to modify /system in "on fs" part, ZTE_BOOT_LIWEI_20110331
# mount yaffs2 mtd@system /system ro remount
mount ext2 /dev/loop1 /data
# mount ext2 /dev/block/mmcblk0p3 /data nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev
# ZTE_JCD_CTSCONFIG, 2011.05.03, BEGIN
mkdir /system/lost+found 0770
chmod 0770 /system/lost+found
# ZTE_JCD_CTSCONFIG 2011.05.03, END
# once system is setup, no need to modify /system , ZTE_BOOT_LIWEI_20110331
mount ext2 /dev/loop0 /system ro remount
# mount ext2 /dev/block/mmcblk0p4 /system ro remount
It doesn't work though and i don't know why.
The problem has to be in the init.rc script because i've checked everything several times, i've tried mounting the files on linux and that works just fine, i've ensured that they are in the correct folder on the sdcard and that the partition is mmcblk0p2.
If anyone can spot the problem, please tell me.