From e844d081db10ff3e920c698f8a0c6ece57a9883c Mon Sep 17 00:00:00 2001 From: Yukikoo Date: Tue, 9 Apr 2019 22:13:17 +0200 Subject: [PATCH] Create mount-hvm-disk.md How to mount a HVM disk. Not directly related to Qubes OS ( related to LVM only) But useful to know --- debugging/mount-hvm-disk.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 debugging/mount-hvm-disk.md diff --git a/debugging/mount-hvm-disk.md b/debugging/mount-hvm-disk.md new file mode 100644 index 00000000..b486c97d --- /dev/null +++ b/debugging/mount-hvm-disk.md @@ -0,0 +1,35 @@ +--- +layout: doc +title: Mount HVM disk +permalink: /doc/mount-hvm-disk/ +--- + +# How to mount HVM disk + +You want to read your HVM disk (ex: you did some errors and can't start the HVM ). + +First, read the partition table: + +```bash +sudo parted /dev/YOUR_VG/YOUR_VM unit B print +``` + +Example: + +``` +$:sudo parted /dev/windows-vg/vg-game-root unit B print +Model: Linux device-mapper (thin) (dm) +Disk /dev/dm-138: 314572800000B +Sector size(logical/physical): 512B/512B +Partition Table: msdos +Disk Flags: +Number Start End Size Type File system Flags +1 1048576B 105906175B 104857600B primary ntfs boot +2 105906176B 314571751423B 314465845248B primary ntfs +``` + +Then mount the partition you want: + +```bash +sudo mount -o loop,offset=105906176 -t ntfs /dev/windows-vg/vg-game-root /mnt/ +```