1
1
# Installing TrenchBoot AEM in Qubes OS
2
2
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.
7
6
8
- ## Installation
7
+ ## Preparing the installation
9
8
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.
12
20
13
21
### Adding AEM repository
14
22
@@ -24,7 +32,7 @@ gpgkey = https://dl.3mdeb.com/rpm/QubesOS/r4.2/current/dom0/fc37/RPM-GPG-KEY-tb-
24
32
enabled = 1
25
33
```
26
34
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:
28
36
29
37
``` bash
30
38
qvm-run --pass-io sys-net \
@@ -33,16 +41,17 @@ qvm-run --pass-io sys-net \
33
41
sudo rpm --import RPM-GPG-KEY-tb-aem
34
42
```
35
43
36
- Now it should be possible to download and install packages from AEM repository.
37
-
38
44
### Intel systems dependencies
39
45
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.
42
49
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 ` .
44
53
45
- #### Qubes repository dependencies
54
+ ### Installing prerequisite packages
46
55
47
56
Start by installing prerequisite packages. Those are not part of newly added
48
57
repository, but ` qubes-dom0-current-testing ` :
@@ -59,7 +68,9 @@ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing \
59
68
60
69
#### Prepare a list of AEM packages
61
70
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:
63
74
64
75
``` shell
65
76
packages=(
@@ -112,14 +123,18 @@ packages+=(
112
123
#### Installing
113
124
114
125
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:
117
129
118
130
``` 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[@]}
121
133
```
122
134
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
+
123
138
#### Updating GRUB on legacy systems
124
139
125
140
Booting on legacy systems requires manual installation of GRUB2 to the MBR
@@ -194,28 +209,34 @@ sudo qubes-dom0-update --disablerepo="*" --enablerepo=aem \
194
209
195
210
# # Provisioning
196
211
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
+ 
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:
202
228
203
229
```bash
204
230
sudo anti-evil-maid-tpm-setup
205
231
```
206
232
207
233

208
234
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.
212
237
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
219
240
installed on boot partition (not disk, i.e. ` sda1` instead of ` sda` etc.) of
220
241
Qubes OS. Run this command to find out where your boot partition is installed:
221
242
@@ -234,11 +255,12 @@ sudo anti-evil-maid-install /dev/sda1
234
255
235
256
After that, reboot the platform. On first boot you will be asked for the SRK
236
257
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:
238
259
239
260
! [](../img/qubes_aem_1st_boot.png)
240
261
241
262
This is expected on the first boot after installation or an update to one or
242
263
more of measured components (GRUB, Xen, dom0 kernel and initramfs).
264
+
243
265
After rebooting for the second time, the Anti Evil Maid should be up
244
266
and running.
0 commit comments