Skip to content

Commit 38fcc8a

Browse files
committed
Updates install instructions for UEFI AEM
1 parent d2e034f commit 38fcc8a

File tree

1 file changed

+56
-34
lines changed

1 file changed

+56
-34
lines changed

docs/user-docs/install_aem.md

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
11
# Installing TrenchBoot AEM in Qubes OS
22

3-
This document shows how to install Anti Evil Maid from packages produced by
4-
3mdeb as part of [TrenchBoot as Anti Evil Maid project](https://docs.dasharo.com/projects/trenchboot-aem-v2/).
5-
If you wish to build the components yourself, please refer to documentation for
6-
developers instead.
3+
This document shows how to install Anti Evil Maid from packages produced by 3mdeb
4+
as part of [TrenchBoot as Anti Evil Maid project](https://docs.dasharo.com/projects/trenchboot-aem-v2/).
5+
If you wish to build the components yourself, please refer instead to developer documentation.
76

8-
## Installation
7+
## Preparing the installation
98

10-
To install, you have to first add a new repository and import a public part of
11-
a key that was used to sign RPM packages.
9+
Before you begin, it would save installation time by clearing the TPM of your device
10+
before proceeding, otherwise you will need to reboot your computer
11+
at [the provisioning](##Provisioning) step below.
12+
Remember: enable Intel TXT after resetting your TPM.
13+
14+
To install TrenchBoot AME you will need to add a new repository, import a public
15+
part of a key that was used to sign RPM packages, download and install
16+
the appropriate packages, configure a new `.bin` file in the `/boot/`
17+
directory and then configure AEM.
18+
19+
The entire process should take roughly 20 minutes to complete.
1220

1321
### Adding AEM repository
1422

@@ -24,7 +32,7 @@ gpgkey = https://dl.3mdeb.com/rpm/QubesOS/r4.2/current/dom0/fc37/RPM-GPG-KEY-tb-
2432
enabled = 1
2533
```
2634

27-
The key specified in the file must be downloaded and imported to RPM:
35+
The specified key must be downloaded and imported to RPM:
2836

2937
```bash
3038
qvm-run --pass-io sys-net \
@@ -33,16 +41,17 @@ qvm-run --pass-io sys-net \
3341
sudo rpm --import RPM-GPG-KEY-tb-aem
3442
```
3543

36-
Now it should be possible to download and install packages from AEM repository.
37-
3844
### Intel systems dependencies
3945

40-
If your device has an Intel CPU, download [official package from Intel](https://cdrdv2.intel.com/v1/dl/getContent/630744)
41-
and extract ACM appropriate for your platform to `/boot/`.
46+
If your device has an Intel CPU, download [the official package from Intel](https://cdrdv2.intel.com/v1/dl/getContent/630744).
47+
Select the correct ACM .bin corresponding to your CPU (using the .PDF
48+
included in the zip as a guide) and move the `.bin` into the dom0 `/boot/` directory.
4249

43-
### Installing prerequisite packages
50+
Helpful commands:
51+
`unzip <zip.acrhive.name>`- to unzip the Intel .zip archive.
52+
`mv <ACM.bin> /boot/` - to move the correct ACM to `/boot`.
4453

45-
#### Qubes repository dependencies
54+
### Installing prerequisite packages
4655

4756
Start by installing prerequisite packages. Those are not part of newly added
4857
repository, but `qubes-dom0-current-testing`:
@@ -59,7 +68,9 @@ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing \
5968

6069
#### Prepare a list of AEM packages
6170

62-
For convenience, the packages can be saved to an environment variable:
71+
For convenience, the packages can be saved to an environment variable,
72+
by simply typing into the dom0 terminal, or copying a text file
73+
from a disposable qube:
6374

6475
```shell
6576
packages=(
@@ -112,14 +123,18 @@ packages+=(
112123
#### Installing
113124

114125
Install the packages (first command reinstalls existing packages in case the
115-
same version numbers exist on official Qubes repositories, second one only
116-
adds new packages):
126+
same version numbers exist in official Qubes repositories, second one only
127+
adds new packages). If the first command fails, it means that there are no
128+
conflicting packages with the same version number in official Qubes repositories:
117129

118130
```shell
119-
qubes-dom0-update --disablerepo="*" --enablerepo=aem --action=reinstall -y ${packages[@]}
120-
qubes-dom0-update --disablerepo="*" --enablerepo=aem --action=install -y ${packages[@]}
131+
sudo qubes-dom0-update --disablerepo="*" --enablerepo=aem --action=reinstall -y ${packages[@]}
132+
sudo qubes-dom0-update --disablerepo="*" --enablerepo=aem --action=install -y ${packages[@]}
121133
```
122134

135+
At this point, if you are installing on an UEFI system,
136+
you may skip to [Installing main AEM package](###Installing-main-AEM-package)
137+
123138
#### Updating GRUB on legacy systems
124139

125140
Booting on legacy systems requires manual installation of GRUB2 to the MBR
@@ -194,28 +209,34 @@ sudo qubes-dom0-update --disablerepo="*" --enablerepo=aem \
194209

195210
## Provisioning
196211

197-
All packages are in place. Before we can proceed with provisioning AEM, the TPM
198-
must be cleared in the BIOS. Some platforms may require disabling Intel Trusted
199-
Execution Technology (TXT) in order to clear TPM. After you clear the TPM,
200-
remember to enable Intel TXT back, otherwise AEM will not work. Once TPM is
201-
cleared, perform the TPM setup:
212+
All packages are now installed.
213+
214+
Before we can proceed with provisioning AEM, the TPM must be cleared in the BIOS
215+
(i.e. TPM Authentication Reset).Some platforms may require disabling Intel's
216+
Trusted Execution Technology (TXT) in order to clear the TPM.
217+
218+
If you failed to clear the TPM as noted at the beginning of the guide,
219+
you will be shown a message like this:
220+
221+
![](../img/qubes_aem_setup_fail.png)
222+
223+
In that case, try clearing the TPM in your BIOS and run the command again.
224+
After you clear the TPM, remember to enable Intel TXT back,
225+
otherwise AEM will not work.
226+
227+
Once the TPM is cleared, perform the TPM setup:
202228
203229
```bash
204230
sudo anti-evil-maid-tpm-setup
205231
```
206232
207233
![](../img/qubes_aem_setup.png)
208234
209-
You will be prompted to set the SRK password, it is a password to access TPM’s
210-
nonvolatile storage where the AEM secrets will be sealed. If you failed to
211-
clear the TPM, you will be shown a message like this:
235+
You will be prompted to set the SRK password. The SRK password enables access
236+
the TPM’s nonvolatile storage where the AEM secrets will be sealed.
212237
213-
![](../img/qubes_aem_setup_fail.png)
214-
215-
In that case, try clearing the TPM in your BIOS and run the command again.
216-
217-
Now all that's left is proper installation of AEM. There are different options,
218-
refer to `anti-evil-maid-install -h` for examples. In the simplest case, AEM is
238+
Now all that's left is proper installation of AEM. (Note: There are different options,
239+
refer to `anti-evil-maid-install -h` for examples.) In the simplest case, AEM is
219240
installed on boot partition (not disk, i.e. `sda1` instead of `sda` etc.) of
220241
Qubes OS. Run this command to find out where your boot partition is installed:
221242

@@ -234,11 +255,12 @@ sudo anti-evil-maid-install /dev/sda1
234255

235256
After that, reboot the platform. On first boot you will be asked for the SRK
236257
password, followed by another question for disk encryption password, after which
237-
a screen mentioning absent secret file will be shown:
258+
a screen mentioning an absent secret file will be shown:
238259

239260
![](../img/qubes_aem_1st_boot.png)
240261

241262
This is expected on the first boot after installation or an update to one or
242263
more of measured components (GRUB, Xen, dom0 kernel and initramfs).
264+
243265
After rebooting for the second time, the Anti Evil Maid should be up
244266
and running.

0 commit comments

Comments
 (0)