Inizio  >  Docs  >  Linux  >  Trucchi veloci  >  disk image tricks  
disk image tricksdisk image tricks

Index

mount a specific partition of a disk image

to mount a specific partition of a disk image we use lomount:
sudo lomount -diskimage images/win98.img /mnt/ -partition 1

with losetup we verify which loop device is used:

sudo losetup -a
/dev/loop0: [0804]:13565966 (/home/qemu_img/images/win98.img) offset=32256

to umount the partition:
sudo umount /mnt/

OR

losetup /dev/loop0  disk01.img
losetup -a
ll /dev/loop0
fdisk -l /dev/loop0
kpartx -v -a /dev/loop0
mount -t ntfs /dev/mapper/loop0p1 /mnt/

umount /mnt/
kpartx -v -d /dev/loop0
losetup -d /dev/loop0

 

To top