Answer the question
In order to leave comments, you need to log in
How to unpack all files from qcow2?
Installed qemu, I can't figure out how to unpack all files from qcow2
Answer the question
In order to leave comments, you need to log in
qcow2 is a block device representation format, it has no files, it can have a filesystem or partitions with filesystems. You can turn qcow2 into a regular raw image with qemu-img : qemu-img dd -O raw if=file.qcow2 of=file.raw
.
The resulting raw image can be analyzed by standard means. If there is one file system, you can simply mount it via loop: mkdir fs ; sudo mount file.raw fs
. If there is a partition table, you can use some kpartx to create devices for each of the partitions and mount the ones you need:
$ mkdir fs ; sudo kpartx -av file.raw
add map loop0p1 (254:4): 0 65536 linear 7:0 2048
add map loop0p2 (254:5): 0 2029568 linear 7:0 67584
$ sudo mount /dev/mapper/loop0p2 fs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question