sfdisk -l -uS disk_image.raw
# look for the start sector of the partition, e.g. 2
mount -o loop,offset=$((2 * 512)) disk_image.raw /mnt
#mount the partition to /mnt (replace 2 with the output from sfdisk)
You could of course also use kpartx to create special device files for the partitions.
This comment has been removed by a blog administrator.
ReplyDeleteI had a hard time figuring this out but thanks to you I managed to pull it off, thanks, now I can migrate my VMs to LVM
ReplyDeleteglad I could help :)
ReplyDelete