mirror of
https://github.com/QubesOS/qubes-doc.git
synced 2025-06-02 21:42:23 -04:00
Update and rename mount-hvm-disk.md to mount-lvm-image.md
This commit is contained in:
parent
4cc13a768a
commit
79c63539c4
2 changed files with 50 additions and 43 deletions
|
@ -1,43 +0,0 @@
|
||||||
---
|
|
||||||
layout: doc
|
|
||||||
title: Mount LVM image
|
|
||||||
permalink: /doc/mount-lvm-image/
|
|
||||||
---
|
|
||||||
|
|
||||||
# How to mount LVM image
|
|
||||||
|
|
||||||
You want to read your LVM image (ex: you did some errors and can't start the VM ).
|
|
||||||
|
|
||||||
1: make the image available for qubesdb. (dom0)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Example: /dev/qubes_dom0/vm-debian-9-tmp-root
|
|
||||||
dev=$(basename $(readlink /dev/YOUR_LVM_VG/YOUR_LVM_IMAGE))
|
|
||||||
qubesdb-write /qubes-block-devices/$dev/desc "YOUR_LVM_IMAGE"
|
|
||||||
```
|
|
||||||
|
|
||||||
2: Create a new disposable VM (dom0)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
qvm-run -v --dispvm=YOUR_DVM_TEMPLATE --service qubes.StartApp+xterm &
|
|
||||||
```
|
|
||||||
|
|
||||||
3: Mount the partition you want to, and do what you want with it (disp)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
mount /dev/xvdiX /mnt/
|
|
||||||
```
|
|
||||||
|
|
||||||
4: Umount and kill the VM (disp)
|
|
||||||
```
|
|
||||||
umount /mnt/
|
|
||||||
```
|
|
||||||
|
|
||||||
5: Remove the image from qubesdb (dom0)
|
|
||||||
```
|
|
||||||
qubesdb-rm /qubes-block-devices/$dev/
|
|
||||||
```
|
|
||||||
|
|
||||||
# References
|
|
||||||
|
|
||||||
https://github.com/QubesOS/qubes-issues/issues/4687#issuecomment-451626625
|
|
50
debugging/mount-lvm-image.md
Normal file
50
debugging/mount-lvm-image.md
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
---
|
||||||
|
layout: doc
|
||||||
|
title: Mount LVM image
|
||||||
|
permalink: /doc/mount-lvm-image/
|
||||||
|
---
|
||||||
|
|
||||||
|
# How to mount LVM image
|
||||||
|
|
||||||
|
You want to read your LVM image (ex: you did some errors and can't start the VM ).
|
||||||
|
|
||||||
|
1: make the image available for qubesdb.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Example: /dev/qubes_dom0/vm-debian-9-tmp-root
|
||||||
|
[user@dom0]$ dev=$(basename $(readlink /dev/YOUR_LVM_VG/YOUR_LVM_IMAGE))
|
||||||
|
[user@dom0]$ qubesdb-write /qubes-block-devices/$dev/desc "YOUR_LVM_IMAGE"
|
||||||
|
```
|
||||||
|
|
||||||
|
2: Create a new disposable VM
|
||||||
|
|
||||||
|
```bash
|
||||||
|
[user@dom0]$ qvm-run -v --dispvm=YOUR_DVM_TEMPLATE --service qubes.StartApp+xterm &
|
||||||
|
```
|
||||||
|
|
||||||
|
3: Attach the device to your newly created disp VM
|
||||||
|
|
||||||
|
From the GUI, or from the command line:
|
||||||
|
```bash
|
||||||
|
[user@dom0]$ qvm-block attach NEWLY_CREATED_DISPVM dom0:$dev
|
||||||
|
```
|
||||||
|
|
||||||
|
4: Mount the partition you want to, and do what you want with it
|
||||||
|
|
||||||
|
```bash
|
||||||
|
[user@dispXXXX]$ mount /dev/xvdiX /mnt/
|
||||||
|
```
|
||||||
|
|
||||||
|
5: Umount and kill the VM
|
||||||
|
```
|
||||||
|
[user@dispXXXX]$ umount /mnt/
|
||||||
|
```
|
||||||
|
|
||||||
|
6: Remove the image from qubesdb
|
||||||
|
```
|
||||||
|
[user@dom0]$ qubesdb-rm /qubes-block-devices/$dev/
|
||||||
|
```
|
||||||
|
|
||||||
|
# References
|
||||||
|
|
||||||
|
https://github.com/QubesOS/qubes-issues/issues/4687#issuecomment-451626625
|
Loading…
Add table
Add a link
Reference in a new issue