Mount the partition of a disk image
As root:
losetup /dev/loop0 /path_to_my_imagefile.img
kpartx -a /dev/loop0
This will create loopback: /dev/mapper/loop0p1 (for partition 1).
you can then mount the partition:
mount -t ex3 /dev/mapper/loop0p1 /mnt/my_mount_dir
Once your modifications are done on the partition, undo everything:
umount /mnt/my_mount_dir
kpartx -d /dev/loop0
losetup -d /path_to_my_imagefile.img
Written by Olivier Sallou
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Partition
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#