Sample Header Ad - 728x90

mount multiple ext4 partitions manually

1 vote
0 answers
528 views
I have rooted android phone running android 10. I have one ext4 partition created using : # dd if=/dev/zero of=/sdcard/ext1.img bs=1M count=1024 # mkfs.ext4 -F /sdcard/ext1.img which I mount using below commands: # mknod /dev/block/loop52 b 7 0 # losetup /dev/block/loop52 /sdcard/ext1.img # mkdir /mnt/ext # mount -t ext4 -o rw,noatime /dev/block/loop52 /mnt/ext ext1.img file gets mounted successfully but when I create another ext4 file and try to mount in /mnt/ext2 using following commands. It gets mounted but the contents of ext1.img are shown in /mnt/ext2. # mknod /dev/block/loop62 b 7 0 # losetup /dev/block/loop62 /sdcard/ext2.img # mkdir /mnt/ext2 # mount -t ext4 -o rw,noatime /dev/block/loop62 /mnt/ext2 What changes do I need to make to mount multiple ext4 files in android ?
Asked by jonny789 (385 rep)
Apr 29, 2021, 07:27 AM