Skip to content

Commit 95eb81f

Browse files
committed
install_aem.md: Add how to find out root disk with LVM+LUKS
Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
1 parent 539988c commit 95eb81f

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

docs/user-docs/install_aem.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,63 @@ Booting on legacy systems requires manual installation of GRUB2 to the MBR
113113
of disk where Qubes OS is stored. In the example below it is `/dev/sda`,
114114
yours may be different.
115115

116-
To check on which partition is your OS installed run:
116+
To check on which partition is your OS installed, if the disk is not encrypted,
117+
run:
117118

118119
```bash
119120
df --output=source /
120121
```
121122

123+
If your disk is encrypted, then the command above will print a filename
124+
like `/dev/mapper/...`. This is an LVM Logical Volume and finding out the
125+
physical disk on which the root partition resides takes a couple steps.
126+
If you are sure where the root partition is located, you can skip the steps to
127+
find it out.
128+
129+
1. Get the Logical Volume (LV) file:
130+
131+
```bash
132+
df --output=source /
133+
```
134+
135+
Example LV file: `/dev/mapper/qubes_dom0-root`
136+
137+
1. Map the Logical Volume (LV) to a Volume Group (VG):
138+
139+
```bash
140+
sudo lvs /dev/mapper/qubes_dom0-root --noheadings -o vg_name
141+
```
142+
143+
Example VG name: `qubes_dom0`
144+
145+
1. Map the Volume Group to a Physical Volume (PV):
146+
147+
```bash
148+
sudo vgs --noheadings -o pv_name qubes_dom0
149+
```
150+
151+
Example PV file: `/dev/mapper/luks-12345678-1234-1234-1234-123456789abc` (GUID)
152+
153+
1. Find the PV name in `lsblk` output and check on which device it is
154+
located.
155+
156+
```bash
157+
lsblk -o NAME
158+
```
159+
160+
Example output:
161+
162+
```text
163+
sda
164+
├─sda1
165+
├─sda2
166+
└─sda3
167+
└─luks-12345678-1234-1234-1234-123456789abc
168+
```
169+
170+
The drive on which the root partition is located in this example is
171+
therefore `/dev/sda`.
172+
122173
Remember that GRUB2 must be installed on disk and
123174
not on partition, so don’t use `sda1`, `nvme0n1p1` etc. This step should be
124175
skipped on UEFI systems.

0 commit comments

Comments
 (0)