Skip to content

Instantly share code, notes, and snippets.

@tankmek
Created August 22, 2018 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tankmek/992052698b407d859be255c0446ce05e to your computer and use it in GitHub Desktop.
Save tankmek/992052698b407d859be255c0446ce05e to your computer and use it in GitHub Desktop.
How to mount a qcow image for inspection
sudo modprobe nbd max_part=8
sudo qemu-nbd --connect=/dev/nbd0 image.qcow2
# identify each partition
sudo fdisk /dev/nbd0 -l
# create mount location and then mount
sudo mkdir /mnt/disk1
sudo mount /dev/nbd0p1 /mnt/disk1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment