12/13/2015

Mount QCOW2 image

QCOW_IMG=$1
NBD_DEV=/dev/nbd0

modprobe nbd
qemu-nbd -c $NBD_DEV $QCOW_IMG

#Find start byte (offset) of a partition
parted $NBD_DEV -s unit B print

#Associate that offset with a loop dev
losetup -o 525336576 -f /dev/nbd0
#Mount loop device to a directory

No comments:

Post a Comment