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,
6+ please refer to documentation for developers instead.
77
8- ## Installation
8+ ## Preparing the installation
99
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.
10+ Before you begin, it would save installation time by clearing the TPM of your device
11+ before proceeding, otherwise you will need to reboot your computer
12+ at [ the provisioning] ( ##Provisioning ) step below. 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 part of
15+ a key that was used to sign RPM packages, download and install the appropriate packages,
16+ configure a new ` .bin ` file in the ` /boot/ ` directory and then configure AEM.
17+
18+ The entire process should take roughly 20 minutes to complete.
1219
1320### Adding AEM repository
1421
@@ -24,7 +31,7 @@ gpgkey = https://dl.3mdeb.com/rpm/QubesOS/r4.2/current/dom0/fc37/RPM-GPG-KEY-tb-
2431enabled = 1
2532```
2633
27- The key specified in the file must be downloaded and imported to RPM:
34+ The specified key must be downloaded and imported to RPM:
2835
2936``` bash
3037qvm-run --pass-io sys-net \
@@ -33,16 +40,17 @@ qvm-run --pass-io sys-net \
3340sudo rpm --import RPM-GPG-KEY-tb-aem
3441```
3542
36- Now it should be possible to download and install packages from AEM repository.
37-
3843### Intel systems dependencies
3944
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/ ` .
45+ If your device has an Intel CPU, download [ the official package from Intel] ( https://cdrdv2.intel.com/v1/dl/getContent/630744 ) .
46+ Select the correct ACM .bin corresponding to your CPU (using the .PDF included in the zip as a guide)
47+ and move the ` .bin ` into the dom0 ` /boot/ ` directory.
4248
43- ### Installing prerequisite packages
49+ Helpful commands:
50+ ` unzip <zip.acrhive.name> ` - to unzip the Intel .zip archive.
51+ ` mv <ACM.bin> /boot/ ` - to move the correct ACM to ` /boot ` .
4452
45- #### Qubes repository dependencies
53+ ### Installing prerequisite packages
4654
4755Start by installing prerequisite packages. Those are not part of newly added
4856repository, but ` qubes-dom0-current-testing ` :
@@ -59,7 +67,8 @@ sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing \
5967
6068#### Prepare a list of AEM packages
6169
62- For convenience, the packages can be saved to an environment variable:
70+ For convenience, the packages can be saved to an environment variable,
71+ by simply typing into the dom0 terminal, or copying a text file from a disposable qube:
6372
6473``` shell
6574packages=(
@@ -112,14 +121,19 @@ packages+=(
112121#### Installing
113122
114123Install 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):
124+ same version numbers exist in official Qubes repositories, second one only
125+ adds new packages). If the first command fails, it means that there are no
126+ conflicting packages with the same version number in official Qubes repositories:
117127
118128``` shell
119- qubes-dom0-update --disablerepo=" *" --enablerepo=aem --action=reinstall -y ${packages[@]}
120- qubes-dom0-update --disablerepo=" *" --enablerepo=aem --action=install -y ${packages[@]}
129+ sudo qubes-dom0-update --disablerepo=" *" --enablerepo=aem --action=reinstall -y ${packages[@]}
130+ sudo qubes-dom0-update --disablerepo=" *" --enablerepo=aem --action=install -y ${packages[@]}
121131```
122132
133+ At this point, if you are installing on an UEFI system,
134+ you may skip to [ Installing main AEM package] ( ###Installing-main-AEM-package )
135+
136+
123137#### Updating GRUB on legacy systems
124138
125139Booting on legacy systems requires manual installation of GRUB2 to the MBR
@@ -194,28 +208,32 @@ sudo qubes-dom0-update --disablerepo="*" --enablerepo=aem \
194208
195209# # Provisioning
196210
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:
211+ All packages are now installed.
212+
213+ Before we can proceed with provisioning AEM, the TPM must be cleared in the BIOS (i.e. TPM Authentication Reset).
214+ Some platforms may require disabling Intel Trusted Execution Technology (TXT) in order to clear the TPM.
215+
216+ If you failed to clear the TPM as noted at the beginning of the guide,
217+ you will be shown a message like this:
218+
219+ ! [](../img/qubes_aem_setup_fail.png)
220+
221+ In that case, try clearing the TPM in your BIOS and run the command again.
222+ After you clear the TPM, remember to enable Intel TXT back, otherwise AEM will not work.
223+
224+ Once the TPM is cleared, perform the TPM setup:
202225
203226` ` ` bash
204227sudo anti-evil-maid-tpm-setup
205228` ` `
206229
207230! [](../img/qubes_aem_setup.png)
208231
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:
232+ You will be prompted to set the SRK password. The SRK password enables access the TPM’s
233+ nonvolatile storage where the AEM secrets will be sealed.
212234
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
235+ Now all that' s left is proper installation of AEM. (Note: There are different options,
236+ refer to `anti-evil-maid-install -h` for examples.) In the simplest case, AEM is
219237installed on boot partition (not disk, i.e. `sda1` instead of `sda` etc.) of
220238Qubes OS. Run this command to find out where your boot partition is installed:
221239
@@ -234,11 +252,12 @@ sudo anti-evil-maid-install /dev/sda1
234252
235253After that, reboot the platform. On first boot you will be asked for the SRK
236254password, followed by another question for disk encryption password, after which
237- a screen mentioning absent secret file will be shown:
255+ a screen mentioning an absent secret file will be shown:
238256
239257
240258
241259This is expected on the first boot after installation or an update to one or
242260more of measured components (GRUB, Xen, dom0 kernel and initramfs).
261+
243262After rebooting for the second time, the Anti Evil Maid should be up
244263and running.
0 commit comments