├── .github
└── FUNDING.yml
├── .gitignore
├── About
├── FAQ.md
├── Heads-threat-model.md
├── Keys.md
└── Vendors_resellers.md
├── CNAME
├── Community.md
├── Development
├── Consultation-services.md
├── Contributing-to-Heads-Wiki.md
├── Distributions.md
├── Emulating-Heads.md
├── Porting.md
├── index.md
└── make-details.md
├── Installing-and-Configuring
├── BootOptions.md
├── Building-Heads
│ ├── general.md
│ ├── index.md
│ ├── p8z77-m_pro-tpm1.maximized.md
│ └── x230-maximized.md
├── Downloading.md
├── Flashing-Guides
│ ├── Clean-the-ME-firmware.md
│ ├── T420-maximized.md
│ ├── T430-maximized.md
│ ├── T480-maximized.md
│ ├── index.md
│ └── x230-maximized.md
├── GPG.md
├── Prerequisites.md
├── RecoveryShell.md
├── Upgrading.md
├── configuring-keys.md
├── index.md
└── install-os.md
├── PDFs
├── COMSEC_beyond_encryption.pdf
├── Recon_2014_Skochinsky.pdf
├── Rootkit_in_your_laptop.pdf
├── state_harmful.pdf
└── x86_harmful.pdf
├── README.md
├── _config.yml
├── favicon.ico
├── images
├── 33c3.jpg
├── Bootguard_fuses.jpg
├── Disk_encryption_recovery_key.jpg
├── Files_scheme.png
├── Flash_chips.jpg
├── Flashing_Heads_on_an_x230_at_HOPE.jpg
├── Flashing_an_x230_bootrom.jpg
├── Flashing_x230_SPI_flash.jpg
├── Flashrom.jpg
├── Hard_disk_drive.jpg
├── Heads_booting_on_an_x230.jpg
├── Heads_splash_screen.jpg
├── Keyboard_tilted_up.jpg
├── Mount_and_flash.jpg
├── Porting_cycle.png
├── Qubes_partitioning.jpg
├── Recovery_shell.jpg
├── Ribbon_cable.jpg
├── Signing_Qubes_binaries_in__boot.jpg
├── T420_SPI_chip.jpg
├── T480
│ ├── 1_screws.jpg
│ ├── 2_battery.jpg
│ ├── 3_chips.jpg
│ ├── 4_bios_chip_orientation.jpg
│ ├── 5_chip_name.jpg
│ ├── 6_lenovo_bios.jpg
│ ├── 7_lenovo_bios_1.jpg
│ ├── 8_sha256.jpg
│ └── 9_flash.jpg
├── TPM.jpg
├── TPMTOTP_QR_code.jpg
├── TPMTOTP_in_use.jpg
├── TPMTOTP_output.jpg
├── TPM_TOTP_QR.jpg
├── TPM_TOTP_in_action.jpg
├── Threat_model.jpg
├── Thunderstrike_presentation.jpg
├── Underside_of_the_x230.jpg
├── Yubikey.jpg
├── boot_missing.jpg
├── bootguard.jpg
├── gpg_management.jpg
├── gpg_missing.jpg
├── insmod.jpg
├── mjg59_presenting_tpmtotp_at_32c3.jpg
├── otp_error.jpg
├── t430
│ ├── 10_spi_flash_chips.jpg
│ ├── 11_spi_chips_closed_view.jpg
│ ├── 12_flash_4mb_spi_chip.jpg
│ ├── 13_ubuntu_output_4mb.jpg
│ ├── 14_programmer_flashing.jpg
│ ├── 15_successful_output_top.jpg
│ ├── 16_flash_8mb_chip.jpg
│ ├── 17_ubuntu_output_8mb.jpg
│ ├── 1_1_back_view_removed_battery.jpg
│ ├── 1_2_back_view_remove_last3_screws.jpg
│ ├── 3_keyboard_shift.jpg
│ ├── 4_keyboard_disconnected.jpg
│ ├── 5_palmrest_screws.jpg
│ ├── 6_palmrest_removed.jpg
│ ├── 7_remove_cpu_cooler_screen.jpg
│ ├── 8_back_view.jpg
│ └── 9_flipped_again.jpg
└── wocintechchat_25721068170.jpg
├── index.md
└── local_config.yml
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: tlaurion
4 | open_collective: insurgo
5 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .jekyll-cache
2 | _site
3 |
--------------------------------------------------------------------------------
/About/FAQ.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: FAQ
4 | permalink: /FAQ/
5 | nav_order: 4
6 | parent: About
7 | ---
8 |
9 | FAQ
10 | {: .fs-8 .m-0 }
11 |
12 | Heads is an open source firmware, OS configuration and hardware hardening guide
13 | for building slightly more secure systems. Installing Heads requires opening
14 | the machine and extensive warranty voiding, so this document tries to answer
15 | some of the questions about it.
16 |
17 |
18 |
19 |
20 | Table of contents
21 |
22 | {: .text-delta }
23 | 1. TOC
24 | {:toc}
25 |
26 |
27 |
28 |
29 |
30 | Why replace UEFI with coreboot
31 | ----
32 |
33 | While Intel's edk2 tree that is the base of UEFI firmware is open source, the
34 | firmware that vendors install on their machines is proprietary and closed
35 | source. Updates for bugs fixes or security vulnerabilities are at the vendor's
36 | convenience; user specific enhancements are likely not possible; and the code
37 | is not auditable.
38 |
39 | UEFI is much more complex than the BIOS that it replaced. It consists of
40 | millions of lines of code and is an entire operating system, with network
41 | device drivers, graphics, USB, TCP, https, etc, etc, etc. All of these features
42 | represents increased "surface area" for attacks, as well as unnecessary
43 | complexity in the boot process.
44 |
45 | coreboot is open source and focuses on just the code necessary to bring the
46 | system up from reset. This minimal code base has a much smaller surface area
47 | and is possible to audit. Additionally, self-help is possible if custom
48 | features are required or if a security vulnerability needs to be patched.
49 |
50 | What's wrong with UEFI Secure Boot
51 | ----
52 |
53 | Can't audit it, signing keys are controlled by vendors, doesn't handle hand off
54 | in all cases, depends on possible leaked keys.
55 |
56 | Why use Linux instead of vboot2
57 | ----
58 |
59 | vboot2 is part of the coreboot tree and is used by Google in the Chromebook
60 | system to provide boot time security by verifying the hashes on the coreboot
61 | payload. This works well for the specialized Chrome OS on the Chromebook, but
62 | is not as flexible as a measured boot solution.
63 | By moving the verification into the boot scripts we're able to have a much
64 | flexible verification system and use more common tools like PGP to sign
65 | firmware stages.
66 |
67 | What about Trusted GRUB
68 | ----
69 |
70 | The mainline grub doesn't have support for TPM and signed kernels, but there is
71 | a Trusted grub fork that does. Due to philosophical differences the code might
72 | not be merged into the mainline. And due to problems with secure boot (which
73 | Trusted Grub builds on), many distributions have signed insecure kernels
74 | that bypass all of the protections secure boot promised.
75 | Additionally, grub is closer to UEFI in that it must have device drivers for
76 | all the different boot devices, as well as filesystems. This duplicates the
77 | code that exists in the Linux kernel and has its own attack surface.
78 |
79 | Using coreboot and Linux as a boot loader allows us to restrict the signature
80 | validation to keys that we control. We also have one code base for the device
81 | drivers in the Linux-as-a-boot-loader as well as Linux in the operating system.
82 |
83 | What is the concern with the Intel Management Engine
84 | ----
85 |
86 | * ["Rootkit in your laptop" (PDF)]({{ site.baseurl }}/PDFs/Rootkit_in_your_laptop.pdf)
87 | by Igor Skochinsky of Hex-Rays, Breakpoint 2012 Melbourne
88 | * ["Intel ME Secrets" (PDF)]({{ site.baseurl }}/PDFs/Recon_2014_Skochinsky.pdf) by
89 | Igor Skochinsky of Hex-Rays, RECON 2014 Montreal
90 | * ["x86 considered harmful" (PDF)]({{ site.baseurl }}/PDFs/x86_harmful.pdf) by
91 | Joanna Rutkowska, October 2015
92 |
93 | How about the other embedded devices in the system
94 | ----
95 |
96 | * ["Hardening hardware and choosing a #goodBIOS"](https://media.ccc.de/v/30C3_-_5529_-_en_-_saal_2_-_201312271830_-_hardening_hardware_and_choosing_a_goodbios_-_peter_stuge#t=2372)
97 | by Peter Stuge, 2013
98 | * [Funtenna uses software to make embedded devices broadcast data on radio frequencies](http://www.slate.com/blogs/future_tense/2015/08/05/_funtenna_uses_software_to_make_embedded_devices_broadcast_data_on_radio.html)
99 | by Ang Cui 2015
100 |
101 | Should we be concerned about the binary blobs
102 | ----
103 |
104 | Maybe. x230 has very few (MRC) since it has native vga init.
105 |
106 | Why use ancient Thinkpads instead of modern Macbooks
107 | ----
108 |
109 | The x230 Thinkpad has coreboot support, TPM, nice keyboards and are very cheap
110 | to experiment on. Newer
111 | [Thinkpads contain Bootguard](https://mjg59.dreamwidth.org/33981.html), a
112 | closed source security function implemented by Intel to prevent unsigned custom
113 | firmware, such as coreboot and heads, from being installed.
114 |
115 | How likely are physical presence attacks vs remote software attacks
116 | ----
117 |
118 | Who knows.
119 |
120 | Defense in depth vs single layers
121 | ----
122 |
123 | Yes.
124 |
125 | is it worth doing the hardware modifications
126 | ----
127 |
128 | Depends on your threat model.
129 |
130 | Should I validate the TPMTOTP on every boot
131 | ----
132 |
133 | Probably. I want to make it also do it at S3. [See Heads issue #69](https://github.com/osresearch/heads/issues/69)
134 |
135 | suspend vs shutdown
136 | ----
137 |
138 | S3 is subject to cold boot attacks, although they are harder to pull off on a
139 | Heads system since the boot devices are constrained.
140 |
141 | However, without tpmtotp in s3 it is hard to know if the system is in a safe
142 | state when the xscreensaver lock screen comes up. Is it a fake to deceive you
143 | and steal your login password? Maybe! It wouldn't get your disk password,
144 | which is perhaps an improvement.
145 |
146 | Disk key in TPM or user passphrase
147 | ----
148 |
149 | Depends on your threat model. With the disk key in the TPM an attacker would
150 | need to have the entire machine (or a backdoor in the TPM) to get the key and
151 | their attempts to unlock it can be rate limited by the TPM hardware.
152 | However, this ties the disk to that one machine (without having to recover and
153 | type in the master key), which might be an unacceptable risk for some users.
154 |
155 | Why is it called Heads
156 | ----
157 |
158 | *The flip side of [Tails](https://tails.boum.org/).*
159 |
160 | Unlike [Tails](https://tails.boum.org/), which aims to be a stateless OS that
161 | leaves no trace on the computer of its presence, Heads is intended for the
162 | case where you need to store data and state on the computer.
163 |
164 | HOTP vs TOTP
165 | ----
166 |
167 | HOTP (HMAC-based One-time Password algorithm) generates a password
168 | using hash-based message authentication codes (HMAC) that can be used only for
169 | the one authentication attempt. Uniqueness is based on a counter which is
170 | incremented each authentication attempt.
171 |
172 | TOTP (Time-based One-time Password algorithm) is an extension of HOTP but
173 | replaces the counter with time. Because of latency, both network and human,
174 | and unsynchronised clocks, the one-time password must validate over a range of
175 | times between the authenticator and the user. Here, time is
176 | downsampled into larger durations (e.g., 30 seconds) to allow for validity
177 | between the parties.
178 |
179 | Secuirty wise, HOTP is more susceptible to brute force attacks without
180 | throttling or limiting the number of failed attempted while TOTP is susceptible
181 | to phishing attacks and requires a user to enter the code within a given time
182 | period.
183 |
184 | coreboot vs Linuxboot
185 | ----
186 |
187 | TO BE WRITTEN
188 |
189 | What happens if I lose/break my security key
190 | ----
191 |
192 | TO BE WRITTEN
193 |
--------------------------------------------------------------------------------
/About/Keys.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Keys and passwords in Heads
4 | permalink: /Keys/
5 | nav_order: 4
6 | parent: About
7 | ---
8 |
9 | ## Keys and passwords in Heads
10 |
11 | There are "too many secrets" involved in booting a Heads system. Luckily most
12 | of them are stored in hardware and only a few need to be memorized by the
13 | users. This page documents their usage and the risks if an attacker can
14 | compromise the different keys.
15 |
16 |
17 |
18 |
19 | Table of contents
20 |
21 | {: .text-delta }
22 | 1. TOC
23 | {:toc}
24 |
25 |
26 |
27 | ## Management Engine and Bootguard ACM fuses
28 |
29 | 
30 |
31 | The very first key used in the system is Intel's public key that signs the
32 | Management Engine firmware partition table in the SPI flash. This key is
33 | stored in the on-die ROM of the ME and the ME will not start up if this
34 | signature does not match. An attacker who controls this key (which is highly
35 | unlikely) can subvert the Bootguard checks as well as the measured boot
36 | process.
37 |
38 | The [Bootguard fuses](https://trmm.net/Bootguard) fuses provide protection
39 | against most "evil maid" attacks against the firmware. The hash of the ACM
40 | signing key is set in write-once fuses in the CPU chipset and during the CPU
41 | bringup phase the ME and the CPU microcode cooperate in some undocumented way
42 | to validate the "Startup ACM" in the SPI flash. Since this key is fused into
43 | hardware, an evil maid attack would need to replace the CPU to install
44 | malicious firmware into the SPI flash. The x230 Thinkpads do not support
45 | bootguard and only the Librem laptops ship with unfused keys.
46 |
47 | An attacker who controls this key can flash new firmware via hardware means
48 | (and possibly remotely via software, unless other steps are taken).
49 |
50 | ## TPM Owner password
51 |
52 | As part of setting up Heads, the TPM is "owned" by the user and the owner
53 | password is set. This clears all existing NVRAM and spaces.
54 |
55 | An attacker who controls this key can reseal TPMTOTP shared secret.
56 |
57 | ## TPMTOTP shared secret
58 |
59 | 
60 |
61 | Since humans have trouble doing RSA public key cryptography in their brains,
62 | Heads uses [TPM TOTP](https://trmm.net/Tpmtotp) to let the system attest to the
63 | user that the firmware is unmodified. During setup, a random 20-byte value is
64 | generated and shared (via QR code) to the user's phone and sealed with the
65 | correct TPM PCR values into the TPM NVRAM. On subsequent boots, the TPM will
66 | unseal the secret if the PCRs match, and the computer generates a one-time
67 | password based on the current clock time, which the user can compare to the
68 | value displayed on their phone. A new secret must be generated each time the
69 | firmware is updated since this will change the PCRs.
70 |
71 | If an attacker can control this shared secret (such as by directly sending PCR
72 | values into the TPM), they can install malicious firmware in the SPI flash and
73 | generate valid TOTP codes.
74 |
75 | ## TPM counter key
76 |
77 | The TPM's increment-only counters can be used to prevent roll-back attacks on
78 | the signed kernel and initramfs configurations. An attacker who controls this
79 | key can increment the counter, causing a denial of service attack against the
80 | system, but it does not provide access to encrypted data nor any way to roll
81 | back to an old version.
82 |
83 | ## TPM Disk Unlock key
84 |
85 | The TPM NVRAM stores one of the disk encryption keys, which is encrypted with
86 | the user's Disk Unlock Key passphrase and sealed with the TPM PCR values for
87 | the firmware and the LUKS headers of the disk. On every boot, the user types in
88 | their TPM Disk Unlock Key passphrase and the TPM will unseal and decrypt the
89 | disk encryption key if the firmware is unmodified and the passphrase matches.
90 | Since the TPMTOTP one-time code matched, the user can have confidence that the
91 | firmware is unmodified before they enter their TPM Disk Unlock Key passphrase.
92 | If the system is booted in recovery mode, the PCRs will not match and this key
93 | is not accessible to the user.
94 |
95 | The Heads firmware inserts this key into the Qubes `initramfs.cpio` as
96 | `/secret.key`, which is listed in the `/etc/crypttab` file as the decryption
97 | key for the various partitions. The dracut/systemd startup scripts will read
98 | the `/etc/crypttab` file and use it to decrypt the drives without further user
99 | intervention.
100 |
101 | The sealed blob is not secret since it is both encrypted and sealed, but if an
102 | attacker can extract this unsealed and decrypted key, they can decrypt the data
103 | on the disk. If they extract the TPM, they can set the PCRs to the correct
104 | values and attempt to brute force the unlock code, although the TPM should
105 | provide some rate limiting. TODO: Can the TPM also flush the keys if too many
106 | attempts are made?
107 |
108 | ## Disk Recovery Key
109 |
110 | During initial system setup, the disk is encrypted with a user-chosen
111 | passphrase. When a TPM Disk Unlock Key is set up, this key is only entered if
112 | the TPM PCRs have changed, such as following a firmware update, or if the disk
113 | has been moved to a new machine and the user needs to back up the code. If the
114 | system is booted into recovery mode, the TPM PCRs will not match the TPM sealed
115 | Disk Unlock Key, so the user will need to enter the recovery key to decrypt the
116 | drives.
117 |
118 | If an attacker gains control of this recovery key, they can decrypt the disk to
119 | access the data, but not necessarily the system configuration if dm-verity is
120 | configured. They can also add additional disk decryption keys, although this
121 | will be detected by the TPM measurement of the LUKS headers.
122 |
123 | ## LUKS Keys and Passphrases
124 |
125 | The TPM Disk Unlock and user's Disk Recovery passphrases are not the actual
126 | encryption keys for the disk. These passphrases are processed through
127 | [PBKDF2](https://en.wikipedia.org/wiki/PBKDF2) (LUKS1) or [Argon2]
128 | (https://en.wikipedia.org/wiki/Argon2) (LUKS2) to derive a key. This derived
129 | key then decrypts the actual disk encryption key stored in the LUKS header.
130 |
131 | The disk encryption key itself remains hidden from users, serving only as an
132 | implementation detail for the encryption process.
133 |
134 | ## Owner's GPG key
135 |
136 | 
137 |
138 | The owner of the machine generates a GPG key pair as part of installing Heads.
139 | Ideally, the private key does not live on the machine, but instead is in a
140 | Yubikey or other USB Security dongle.
141 |
142 | The security dongle may be used in the disk decryption process. Some of the
143 | [Linux distros](https://docs.puri.sm/Librem_Key/Getting_Started/User_Manual.html#decrypt-luks-encrypted-drives-with-librem-key)
144 | have incorporated this using /etc/crypttab with a keyscript option.
145 |
146 | An attacker who controls this private key can replace executables in `/boot`
147 | and if they also control the disk encryption key, they can tamper with files in
148 | a dm-verity protected root filesystem.
149 |
150 | ## User login password
151 |
152 | The user's login password is used to control access to the system once it has
153 | booted.
154 |
155 | An attacker who controls this key can access the system and the decrypted disks
156 | if they gain physical access to the system while it is running or asleep. This
157 | provides access to the data on the drive, but not necessarily the ability to
158 | modify a dm-verity protected root filesystem.
159 |
160 | ## Root password
161 |
162 | The root password is not enabled by default on Qubes, so it is functionally
163 | equivalent to the login password. Other operating systems might differ.
164 |
165 | ## TPM PCRs
166 |
167 | 
168 |
169 | 0: Nothing for the moment (Populated by binary blobs where applicable for
170 | [SRTM](https://doc.coreboot.org/security/vboot/measured_boot.html#ibb-crtm))
171 |
172 | 1: Nothing for the moment
173 |
174 | 2: coreboot's Boot block, ROM stage, RAM stage, Payload (Heads linux kernel and
175 | initrd)
176 |
177 | 3: Nothing for the moment
178 |
179 | 4: Boot mode (0 during `/init`, then `recovery` or `normal-boot`)
180 |
181 | 5: Heads Linux kernel modules
182 |
183 | 6: Drive LUKS headers
184 |
185 | 7: Heads user-specific files stored in CBFS (config.user, GPG keyring, etc).
186 |
187 | (16): Used for TPM futurecalc of LUKS header when setting up a TPM disk
188 | encryption key
189 |
190 | ### Some history
191 | Heads relied on coreboot patches until coreboot 4.8.1 for measured boot
192 | implementation, since coreboot had none. Heads measured boot scheme
193 | [changed](https://github.com/osresearch/heads/pull/793) to match coreboot
194 | 4.12's, which for the first time included separated measured boot
195 | implementation from vboot implementation.
196 |
197 | Since coreboot 4.12, Heads stopped patching coreboot to implement measured
198 | boot. coreboot measured boot implementation is the one filling PCR2, above.
199 |
200 | Heads since then solely extends PCRs of its own (PCRs 4-5-6-7 above) which are
201 | used when sealing/unsealing.
202 |
203 | As you can see above, coreboot measures itself from bootblock then other boot
204 | phases up to its payload in PCR2, in conformity of their
205 | [SRTM](https://doc.coreboot.org/security/vboot/measured_boot.html#srtm-mode)
206 | measured boot policy. An example is given from [coreboot
207 | docs](https://doc.coreboot.org/security/vboot/measured_boot.html#platform-configuration-register).
208 |
209 | ### TPM_Unseal errors
210 | Consequently, if either coreboot phases, boot mode, kernel modules, LUKS
211 | headers or CBFS files are different then when those measurements were used to
212 | seal secrets, unseal operations will fail. HOTP/TOTP/TPM Disk Unlock Key
213 | passphrase should give errors in case of tampering.
214 |
215 | The TPM Disk Unlock Key passphrase would fail with a different error then:
216 | `Error Authentication failed (Incorrect Password) from TPM_Unseal` when a user
217 | types a [TPM Disk Unlock key passphrase](/Keys/#disk-unlock-key-passphrase-prompt-output).
218 |
219 | Indeed, the PCRs measurements used to seal the Disk Unlock Key in TPM NV memory
220 | cannot unseal that secret, even with a good TPM Disk Unlock Key passphrase,
221 | while HOTP/TOTP should not be able to unseal either.
222 |
223 | ### TCPA Event log
224 | From the [Recovery Shell](/Recovery), it is possible to review PCR2 [TCPA event
225 | log](https://doc.coreboot.org/security/vboot/measured_boot.html#tcpa-eventlog)
226 | by typing: `cbmem -L`
227 |
228 | ### Disk Unlock Key passphrase prompt output
229 | 
231 |
232 | Here you can see that "Boot block, ROM stage, RAM stage, Heads payload", "Drive
233 | LUKS headers" and "Heads user-specific config files" have filled the registers
234 | PCR-02, PCR-06 and PCR-07 respectively. You can also see the TPM returning the
235 | error "Error Authentication failed (Incorrect Password)" which is an invitation
236 | to try again, this time typing more slowly. Measurements are consistent to what
237 | was sealed, but the passphrase is bad. This is good news.
238 |
239 | After 3 unsuccessful attempts releasing TPM Disk Unlock Key, Heads will propose
240 | you to decrypt with your Disk Recovery Key passphrase, directly from the OS,
241 | bypassing Heads protection. Still good news.
242 |
243 | If Disk Unlock Key passphrase throws a different error, it would be a good idea
244 | to meditate on your threat model and what happened to your computer since your
245 | last normal default boot.
246 |
247 | The Disk Unlock Key is sealed in TPM NV memory with PCRs-2-4-5-6-7, which
248 | includes external content from the firmware, like your LUKS header measurements.
249 |
--------------------------------------------------------------------------------
/About/Vendors_resellers.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Heads Vendors and Resellers
4 | permalink: /Vendors/
5 | nav_order: 1
6 | parent: About
7 | ---
8 |
9 | # Heads Vendors and Resellers
10 |
11 | For those who prefer not to manually flash Heads firmware on their devices,
12 | several vendors and resellers offer laptops, workstations, and servers with
13 | Heads preinstalled. These vendors provide a range of secure and privacy-focused
14 | devices, making it easier for potential users to get started with Heads without
15 | the hassle of searching for options online. By choosing one of these vendors or
16 | resellers, users who don't want to open their devices and flash manually can
17 | easily get a device with Heads preinstalled. This provides a straightforward
18 | solution for those who would benefit from Heads' secure firmware but need a more
19 | accessible option. Additionally, many of these vendors offer customization
20 | options, preinstallation of various operating systems, and anti-interdiction
21 | mechanisms to ensure the security and integrity of the devices.
22 |
23 | The vendors are listed alphabetically.
24 |
25 | ## Vendors and Resellers
26 |
27 | ### HardenedVault (VaultBoot)
28 | HardenedVault provides VaultBoot (a variant of Heads) preinstalled on their
29 | devices.
30 |
31 | - **Website:** [HardenedVault](https://hardenedvault.net)
32 | - **Products:** Servers
33 |
34 | ### Nitrokey (Heads)
35 | Nitrokey offers Heads preinstalled on some of their devices. They also sell
36 | older refurbished laptop models with Intel ME neutralized and Nitrokey USB
37 | security dongles. Additionally, Nitrokey resells some of NovaCustom's laptops.
38 |
39 | - **Website:** [Nitrokey](https://www.nitrokey.com)
40 | - **Products:** Laptops, phones, servers, workstations, mini-PCs, USB security
41 | dongles, and older refurbished laptop models with ME neutralized
42 |
43 | ### NovaCustom (Heads)
44 | NovaCustom offers devices with Heads preinstalled. They focus on providing
45 | customizable and secure devices for their customers. NovaCustom buys Clevo
46 | laptops in bulk, ensuring BootGuard keys are not fused at the last manufacturing
47 | steps. They also resell Nitrokey 3 USB security dongles bundled with their
48 | Heads-based firmware devices.
49 |
50 | - **Website:** [NovaCustom](https://novacustom.com)
51 | - **Products:** Laptops and USB security dongles
52 |
53 | ### Purism (PureBoot Heads distribution)
54 | Purism offers laptops, tablets, mini PCs, and servers with PureBoot (a
55 | distribution of Heads) preinstalled. BootGuard is unfused to ensure firmware
56 | remains user-controlled. Purism makes and sells the Librem Key, which is a clone
57 | of the Nitrokey Pro 2. The Librem Key is made in the USA.
58 |
59 | - **Website:** [Purism](https://puri.sm)
60 | - **Products:** Laptops, phones, tablets, mini PCs, servers, and USB security
61 | dongles
62 |
63 | ## General Information
64 |
65 | Many of these vendors offer additional services and features, including:
66 |
67 | - **OS Preinstallation Options:** Vendors may offer preinstallation of various
68 | operating systems, including QubesOS, PureOS, and others.
69 | - **Anti-Interdiction Mechanisms:** Vendors provide anti-interdiction services
70 | to ensure the security and integrity of the devices during shipping.
71 | - **QubesOS Certification:** Some devices may be QubesOS certified, ensuring
72 | compatibility and security.
73 | - **CSME/ME Status:** Some vendors offer options to neutralize or disable Intel
74 | CSME/ME. "Neutralized" means most parts of the ME are removed, while
75 | "disabled" means the ME is deactivated. Users should verify these options on
76 | the respective vendor websites. For more information, refer to Purism's blog
77 | post on this topic: [Deep Dive into Intel ME Disablement](https://puri.sm/posts/deep-dive-into-intel-me-disablement/).
78 | - **Blob Status:** The newer the platform, the more it relies on proprietary
79 | blobs. Users should consider their threat model when choosing a device. For
80 | more information, refer to the [threat modeling page](/Heads-threat-model/).
81 | - **HOTP Security Dongles:** Purism and Nitrokey are makers of HOTP-compatible
82 | security dongles. USB security dongles are used for both remote attestation
83 | and to authenticate and sign boot content. Heads relies on HOTP for tamper
84 | evidence. Users should verify the specific offerings on the respective vendor
85 | websites.
86 |
87 | Please verify the specific offerings and services on the respective vendor
88 | websites.
--------------------------------------------------------------------------------
/CNAME:
--------------------------------------------------------------------------------
1 | osresearch.net
--------------------------------------------------------------------------------
/Community.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Community
4 | permalink: /community/
5 | nav_order: 99
6 | ---
7 |
8 | Official Heads is over Matrix
9 | ===
10 |
11 | * [Heads channel: official community channel, once bridged to Slack Heads OSFW room](https://matrix.to/#/#OSFW-Heads:matrix.org)
12 | * [Heads-Changes channel: All github changes as a changelog channel](https://matrix.to/#/#Heads-verbose:matrix.org)
13 |
14 | You can lurk the channels by not installing any client, use web browser as client if you register but full experience is through recommended Element client.
15 |
16 | Matrix is a federated network: choose your home server
17 | ====
18 | * [Join Matrix page](https://servers.joinmatrix.org/)
19 | * [Hello Matrix page](https://www.hello-matrix.net/public_servers.php)
20 |
21 | EG: Tested (No e-mail required at registration, tor friendly) home server:
22 | * [the-apothecary.club](https://the-apothecary.club/)
23 |
24 | Official Matrix documentation
25 | ====
26 | * [Element feature-rich multi-platform client](https://element.io/help)
27 |
28 | Matrix<->Slack bridge update
29 | ====
30 |
31 | ## Current Status
32 |
33 | The Matrix<->Slack bridge for the Heads OSFW channel is currently non-functional. This situation arose due to the Slack channel transitioning from a paid to a free tier, which has limited functionality and retains only 90 days of chat history.
34 |
35 | - The Matrix channel remains fully operational with complete chat history.
36 | - The Slack channel has limited functionality and reduced message retention.
37 | - The bridge between Matrix and Slack is inactive.
38 |
39 | ## Community Communication
40 |
41 | **The community primarily communicates via Matrix and GitHub.**
42 |
43 | - For optimal communication and full access to chat history, please use the Matrix channel (#heads:matrix.org) via Element or any compatible open-source client.
44 | - GitHub remains an essential platform for project collaboration and issue tracking.
45 |
46 | ## Next Steps
47 |
48 | We are working with the Slack channel administrators to resolve this issue. The bridge can be reactivated once necessary adjustments are made on the Slack side.
49 |
50 | To restore the bridge functionality, action is required from Slack channel administrators.
51 |
52 | ## Contact
53 |
54 | If you have any questions or concerns, please reach out through the Matrix channel or by opening an issue on the Heads-wiki GitHub repository.
55 |
56 | Once the issue is resolved, please open an issue on the Heads-wiki to update this notice accordingly.
57 |
58 | We appreciate your understanding and continued support as we work to improve our community communication infrastructure.
59 |
60 | Thierry Laurion
61 |
62 |
63 | Found a bug under Heads/How to Contribute
64 | ===
65 |
66 | 1. Refer to [Contributing guidelines](https://github.com/linuxboot/heads/blob/master/CONTRIBUTING.md)
67 |
68 | (Please reapply same logic principles for [Heads-wiki](https://github.com/linuxboot/heads-wiki/issues/)!)
69 |
70 | Some specifics:
71 | * [Issues tagged with "Help Wanted"](https://github.com/osresearch/heads/labels/help%20wanted)
72 | * [Issues tagged with "Bounty"](https://github.com/osresearch/heads/labels/Bounty)
73 | * [Contributing to the Heads wiki](/Contributing-to-Heads-wiki/)
74 |
--------------------------------------------------------------------------------
/Development/Consultation-services.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Consultation Services
4 | permalink: /Consultation-Services/
5 | nav_order: 1
6 | parent: Development
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 |
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 |
21 | ## Consulting Services for Heads
22 |
23 | ### Promoting Secure and Open Source Firmware Solutions
24 |
25 | Heads is a pioneering open-source firmware project focused on security and
26 | transparency. Consulting services are designed to assist hardware vendors,
27 | OEMs, ODMs, and silicon suppliers in integrating and optimizing Heads for
28 | their unique needs.
29 |
30 | ### Instructions for Experts
31 |
32 | This page provides a platform for Heads experts to advertise their
33 | availability and describe their expertise to companies interested in
34 | contracting services. This includes, but is not limited to, custom boot
35 | solutions, firmware optimization, and secure firmware environment setups.
36 |
37 | Experts are encouraged to list their information below so that interested
38 | companies can contact them directly.
39 |
40 | ### Instructions for Employers
41 |
42 | If you need specialized services, please contact the experts listed below.
43 | This list is not intended for free support inquiries.
44 |
45 | ### Consulting Services
46 |
47 | | Expert Name | Expertise | Contact Information |
48 | | --------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
49 | | Thierry Laurion | Custom boot solutions, firmware optimization, secure firmware environment setups. Current main maintainer of Heads. | [email](mailto:insurgo@riseup.net) |
50 |
51 | For more information or to schedule a consultation, please contact the
52 | experts listed above. Let's work together to create secure, efficient, and
53 | reusable solutions for your projects.
54 |
--------------------------------------------------------------------------------
/Development/Contributing-to-Heads-Wiki.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Contributing to the Heads wiki
4 | permalink: /Contributing-to-Heads-wiki/
5 | nav_order: 99
6 | parent: Development
7 | ---
8 |
9 | Contributing to the Heads Wiki
10 | {: .fs-8 .m-0 }
11 |
12 | The Heads wiki is open source and encourages contributions both big and small.
13 | It is written in Markdown ([Markdown Cheat sheet](https://www.markdownguide.org/cheat-sheet/))
14 | , built using [Jekyll](https://jekyllrb.com/) and themed using
15 | [Just the Docs](https://pmarsceill.github.io/just-the-docs/).
16 |
17 |
18 |
19 |
20 |
21 |
22 | Table of contents
23 |
24 | {: .text-delta }
25 | 1. TOC
26 | {:toc}
27 |
28 |
29 |
30 |
31 | Small Changes (On GitHub)
32 | ---
33 | The simplest way to make a small change to existing pages is directly on GitHub
34 | as it requires no software to be installed.
35 |
36 | * Start by login into GitHub and forking
37 | [linuxboot/heads-wiki](https://github.com/linuxboot/heads-wiki).
38 | * Find the desired page on [osresearch.net](http://osresearch.net/). Click on
39 | the link at the bottom of the page saying *"Edit this page on GitHub."*
40 | * This will bring you to an editor on GitHub and should mention that you do not
41 | have write access to the `osresearch/heads-wiki` repo and that changes will be
42 | made in your fork.
43 | * After making the desired edits, add a summary of the changes to the comment
44 | box and click the "Propose changes" button.
45 | * Now on the "Comparing changes" will be a "diff" of these changes to review
46 | before submitting. If the changes are correct, press the "Create Pull Request"
47 | button at the top of the page.
48 |
49 |
50 | Large Changes (Local Files)
51 | ---
52 |
53 | ### Prerequisites
54 |
55 | For larger changes, multiple changes and that may require adding new pages, it
56 | is strongly suggested to set up a local Jekyll instance. Please refer to
57 | [Jekyll's installation documentation](https://jekyllrb.com/docs/) to setup it
58 | up on your system. You will need to install ruby and gems.
59 |
60 | Additionally, the theme will also need to be installed as the remote theme does
61 | not seem to work with locally severed Jekyll instances. Instructions for
62 | installing the *Just the Docs* theme can be
63 | [found here](https://pmarsceill.github.io/just-the-docs/).
64 |
65 | ex. gem install just-the-docs
66 |
67 | ### Running Locally
68 |
69 | After installing Jekyll and the Just the Docs theme you may run the wiki on your local system for faster testing and development.
70 | * log in to GitHub and fork
71 | [linuxboot/heads-wiki](https://github.com/linuxboot/heads-wiki). Then clone
72 | your fork locally.
73 | * Now start Jekyll with:
74 | ```bash
75 | $> jekyll serve --config local_config.yml
76 | ```
77 | This will start the Jekyll development web server and should be viewable in a
78 | web browser at `http://localhost:4000/`
79 |
80 | * create a branch in git for your changes
81 | * Make the desired changes, commit them. **BE SURE NOT TO ADD `_config.yml` or `local_config.yml`**
82 | to your changes.
83 | * Push the changes to your forked repo on github
84 |
85 | ### Testing Changes on Github
86 |
87 | You may use github to render the changes for review by others. To do this, go to your fork of the heads-wiki on
88 | GitHub.com and click *Settings*. This should default you to the *Options* tab,
89 | scroll down to the section "GitHub Pages" and change the source branch to the
90 | name of the branch your changes are on. After a minute or so it should be
91 | available at `https://YOUR_USERNAME_HERE.github.io/heads-wiki/`
92 | replacing `YOUR_USERNAME_HERE` with your GitHub username.
93 |
94 | ** NOTE:** the email account associated with your GitHub account may receive an
95 | error regarding the `CNAME`. Please ignore this.
96 |
97 | Please note that the URL is similar but NOT the same as the wiki pages feature in your fork in github.
98 |
99 | ### Verifying broken links
100 | Please verify `https://YOUR_USERNAME_HERE.github.io/heads-wiki/` with `https://validator.w3.org/checklink` prior of pushing your changes.
101 |
102 | ### Pushing Changes Upstream
103 |
104 | Create a pull request in the linuxboot/heads-wiki project that points to your changes to request review and contribute back to the parent project.
105 |
--------------------------------------------------------------------------------
/Development/Distributions.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Distributions
4 | permalink: /Distributions/
5 | nav_order: 4
6 | parent: Development
7 | ---
8 |
9 | Distributions
10 | ===
11 |
12 | Distributions can brand and customize Heads to suit their needs. Examples of
13 | distributions are:
14 |
15 | * [Nitrokey](https://github.com/Nitrokey/heads/)
16 | * [PureBoot](https://source.puri.sm/firmware/pureboot)
17 | * [Dasharo](https://github.com/Dasharo/heads)
18 |
19 | Configuration
20 | ===
21 |
22 | Set brand-specific configuration in `site-local/config`. For example, to use
23 | text-based whiptail on all boards and export a brand-specific configuration value:
24 |
25 | ```sh
26 | # Export a brand-specific configuration value
27 | export CONFIG_ACME_HELLO=welcome
28 | # Use text-based whiptail on all devices (enable it and disable fbwhiptail)
29 | CONFIG_SLANG=y
30 | CONFIG_NEWT=y
31 | CONFIG_CAIRO=n
32 | CONFIG_FBWHIPTAIL=n
33 | ```
34 |
35 | The `site-local` directory is for downstream files included at strategic points
36 | in Heads to simplify carrying patches downstream. The `site-local` directory
37 | never appears upstream.
38 |
39 | Branding
40 | ===
41 |
42 | The `BRAND_NAME` variable determines the brand used in builds. The value:
43 |
44 | * is used in the user interface ("AcmeBoot Boot Menu")
45 | * is used in ROM build artifacts (`acmeboot--.rom`)
46 | * names the directory for branded assets (bootsplash)
47 |
48 | Add `BRAND_NAME` to `site-local/config`:
49 |
50 | ```sh
51 | BRAND_NAME=AcmeBoot
52 | ```
53 |
54 | Create a bootsplash.jpg file for bootsplash at `$BRAND_NAME/bootsplash.jpg`,
55 | for example `AcmeBoot/bootsplash.jpg`.
56 |
--------------------------------------------------------------------------------
/Development/Emulating-Heads.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Emulating Heads
4 | permalink: /Emulating-Heads/
5 | nav_order: 2
6 | parent: Development
7 | ---
8 |
9 | Available Targets
10 | ===
11 |
12 | Multiple qemu targets are provided for Heads.
13 |
14 | | Target | Interface | Configuration |
15 | |--|--|--|--|
16 | | `qemu-coreboot-whiptail-tpm1` | Text | TPM1 |
17 | | `qemu-coreboot-whiptail-tpm1-hotp` | Text | TPM1, with HOTP |
18 | | `qemu-coreboot-fbwhiptail-tpm1-hotp` | Graphical | TPM1, with HOTP |
19 | | `qemu-coreboot-fbwhiptail-tpm2-hotp` | Graphical | TPM2, with HOTP |
20 | | ... | ... | Other permutations |
21 |
22 | Basic build/boot tests
23 | ===
24 |
25 | Generate the ROM:
26 |
27 | ```Makefile
28 | make BOARD=qemu-coreboot-fbwhiptail-tpm1-hotp
29 | ```
30 |
31 | Boot it in qemu:
32 |
33 | ```Shell
34 | make BOARD=qemu-coreboot-fbwhiptail-tpm1-hotp run
35 | ```
36 |
37 | Comprehensive test
38 | ===
39 |
40 | Most functionality of Heads can be tested in these ROMs with some manual steps
41 | in initial setup.
42 |
43 | For more information and setup instructions, refer to the [qemu documentation](https://github.com/linuxboot/heads/blob/master/targets/qemu.md).
44 |
45 | Flashing firmware is not currently possible in QEMU - a GPG key must be injected
46 | at build time, config changes / firmware upgrades cannot be tested, etc.
47 |
--------------------------------------------------------------------------------
/Development/Porting.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Porting Heads
4 | permalink: /Porting/
5 | nav_order: 3
6 | parent: Development
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 | Prerequisites for porting Heads
21 | ===
22 | Prerequisites:
23 | 1. coreboot port: since Heads is a coreboot payload, the board must have fully completed and actively maintained coreboot support. Any known issues should be acceptable to end users. Exceptions include the Purism and Dasharo coreboot forks, where coreboot is used from their respective forks.
24 | 2. TPM module: Measured boot and the usable security features are at the core of what Heads is about. These features depend on the TPM. Therefore, the board must have a TPM module. If it uses fTPM and you plan to neuter the Intel Management Engine (ME), the fTPM must remain functional under coreboot even after neutering ME. Otherwise, a dTPM is required for this board.
25 | 3. The final flash layout must have enough space for the Heads payload. Concretely, the size of the flash chip(s) must be at least be 12MB and the size of the BIOS region must be large enough to take the Heads payload. Usually, this means shrinking another region, the ME, and reallocating the freed space to the BIOS region. However, changing the ME blob or flash layout is not always possible as Intel Bootguard prevents booting with such modifications in most modern boards unless the board vendor chose otherwise.
26 | 4. Technical skills: the person porting the board must have basic knowledge of coreboot, Linux, Bash, Git, and Python to complete the port. While the community is committed to helping, an alternative option is a financial contribution for [consultancy services](https://osresearch.net/Consultation-Services/).
27 | 5. External programmer: an external programmer is required to flash Heads and, if necessary, to recover from a brick.
28 | 6. Users and Board-testers: There should be multiple users and testers interested in using the board, as this makes maintenance and testing easier and benefits the entire ecosystem. You may, of course, port it for yourself first and allow others to join later. However, you must commit to testing—especially after coreboot version bumps or Linux kernel updates. If testing is not done in a timely manner, the board will be moved to an "unmaintained, untested" status. This would be unfortunate, potentially a waste of time, and disappointing for everyone involved.
29 | 7. GPU: dGPUs are problematic in Heads for various reasons. While successful ports on older machines with dGPUs existed (e.g. [t530 and w530](https://github.com/linuxboot/heads/commit/a854144e2dbf14700491e3f1cb6f88e12d22197b)), security may be affected, and there is currently no clear solution for that. In case you are curious, please read a longer discussion on the Matrix coreboot channel starting with this [post](https://matrix.to/#/!EhaGFZyYcbyhdSgStq:matrix.org/$4OuJ9tPr8a_U6pwWgmjQxL0hnmpBzTATAHVl9gMvnfQ?via=matrix.org&via=tchncs.de&via=dodoid.com).
30 |
31 | The scheme depicts a port cycle.
32 | 
33 |
34 | Files needed to be created/modified are depicted on the scheme.
35 | 
36 |
37 | Prerequisites for building the ROM
38 | ===
39 | The goal is to build a ROM before the code review. `NEW_BOARD` refers to the name of your board (e.g., `t480`). It is recommended to clone the Heads GitHub repository and create a new branch:
40 | ```shell
41 | git clone https://github.com/linuxboot/heads.git
42 | git checkout -b Poc_NEW_BOARD
43 | ```
44 |
45 | modules/coreboot:
46 | ---
47 | coreboot fork that will be used should be added under `heads/modules/coreboot`. This will be the version you reference from the board config files. You should aim for building the board with an existing coreboot version, usually the main version that most boards use. If you need a different coreboot version, consider patching an existing version without breaking any other boards depending on it, of course. However, if you need to add a new coreboot fork, it should be done here. This is not ideal and not recommended, as there are already 2 different coreboot forks. It often leads to maintenance and resources burden.
48 |
49 | binary blobs:
50 | ---
51 | Check the coreboot configuration for the ported board. This will indicate which binary blobs are required and where they are expected to be located. Heads expects architecture-/board-specific scripts under `blobs/*` which do the magic, called by the main makefile that handles everything in Heads. These scripts must create reproducible binary blobs when invoked. The blobs should be placed in the `blobs/NEW_BOARD/`. Make sure the coreboot config file references the correct path for each blob and the blobs are added to `.gitignore` so that they are not accidentally committed to git.
52 | Generally, three binary blobs are required: Management Engine (ME), Intel Flash Descriptor Region (IFD), and Gigabit Ethernet (GBE). The IFD and GBE can be extracted from a donor board using coreboot’s ifdtool. For more details, refer to the [upstream documentation](https://doc.coreboot.org/util/ifdtool/layout.html). On some boards it may be necessary to provide more blobs to coreboot, for instance an MRC blob for RAM initialization if coreboot cannot distribute the blob itself for legal reasons.
53 |
54 | Please note, if the ME is neutered, the IFD, coreboot CBFS region, and ME neutering space should be adjusted accordingly. Rationale: the ME region defined under IFD must fit. With the IFD ME region reduced, the BIOS region can grow with the freed ME space. With the BIOS region augmented, the CBFS region of the coreboot configuration must be increased to fit the ["maximized" space](https://osresearch.net/Prerequisites#legacy-vs-maximized-boards).
55 |
56 | Please note the GBE MAC address should be forged to: `00:DE:AD:C0:FF:EE MAC`. It can be done with [nvmutil](https://libreboot.org/docs/install/nvmutil.html). Due to licensing restrictions, the ME firmware cannot be uploaded to the GitHub. However, scripts can be used to build it locally and within CircleCI (a gray area legally, but still possible). GBE and IFD blobs can be uploaded directly to GitHub. Please explain how they were obtained in the commit message.
57 | * Note: When calling scripts in Nix-based environments, Python must be invoked explicitly, as Nix does not allow executing Python scripts directly from files. One can use last clean example for t480: `python ./finalimage.py` will work and just `./finalimage.py` will not work.
58 | The blobs folder should have a script.sh which handles downloading, deactivating ME etc. It should also contain a README.md file briefly explaining the process. Hashes of the blobs should be stored either in `README.md` or in `hashes.txt file`. Furthermore, the script must ensure the integrity of the blobs it produced by comparing a SHA256 hash.
59 |
60 | NEW_BOARD.mk:
61 | ---
62 | Create a new `heads/targets/NEW_BOARD.mk` file which deals with calling blobs/script.sh*, download and extraction, and placing the blobs in correct location. This will be used by the main makefile and defines the board specific targets and dependencies, such as the binary blobs. For additional details, please see [Makefiles]({{ site.baseurl }}/Development/make-details.md).
63 |
64 | board.config:
65 | ---
66 | There should be a file `NEW_BOARD-hotp-maximized.config`, which inherits all the parameters from `NEW_BOARD-maximized.config` and adds HOTP verification. Those files should be located in the folder `heads/boards/NEW_BOARD-hotp-maximized` and `heads/boards/NEW_BOARD-maximized`, respectively. This is Heads specific configuration and should be adapted from a similar platform. The top of the board config files is also a good place to put some technical board-specific documentation, known issues etc.
67 | You should point in `NEW_BOARD-hotp-maximized` and `NEW_BOARD-maximized` to the coreboot version e.g. `export CONFIG_COREBOOT_VERSION=X.Y.Z.`- that was modified under `modules/coreboot` (see corresponding section above). Additionally, the configurations should reference the appropriate coreboot and linux configs created below:
68 | ```
69 | CONFIG_COREBOOT_CONFIG=config/coreboot-NEW_BOARD.config
70 | CONFIG_LINUX_CONFIG=config/linux-NEW_BOARD.config
71 | ```
72 | * For early testing, enabling debug mode is a good idea. However, these options should be removed before merging:
73 | ```
74 | export CONFIG_DEBUG_OUTPUT=y
75 | export CONFIG_ENABLE_FUNCTION_TRACING_OUTPUT=y
76 | ```
77 | Note: This may cause glitches where the screen output appears overwritten until an arrow key is pressed. This is normal for DEBUG mode, as the additional tracing output uses the same console as fbwhiptail. The issue will disappear once debug options are removed from the board configs.
78 | * It is important to define the correct TPM configuration (TPM 1.2 vs. TPM 2.0), ensuring they are mutually exclusive, similar to the coreboot configuration (described in coreboot config below). The selected option misses `#`:
79 | ```
80 | #TPM2 requirements
81 | export CONFIG_TPM2_TOOLS=y
82 | export CONFIG_PRIMARY_KEY_TYPE=ecc
83 | ```
84 | ```
85 | #TPM1 requirements
86 | #export CONFIG_TPM=y
87 | ```
88 | In the configuration, the binary blobs must be specified as build targets, as coreboot depends on these blobs. It is the line at the bottom of the board config `BOARD_TARGETS := NEW_BOARD`. It ensures that the main Heads makefile builds the targets specified in the `NEW_BOARD.mk` file.
89 |
90 | coreboot.config:
91 | ---
92 | You need a coreboot configuration for the new board. Ideally, this config should be adapted from the closest possible platform. You can inspect existing configurations for boards in the master branch and select one with a similar architecture, if available. Next, you can create a coreboot config by copying it from the closest platform and adapt it accordingly. You may use coreboot's `make menuconfig` for `NEW_BOARD`:
93 | ```shell
94 | cp config/coreboot-CLOSEST_PLATFORM.config config/coreboot-NEW_BOARD.config
95 | ./docker_repro.sh make coreboot.modify_and_save_oldconfig_in_place
96 | ```
97 | Note, the configuration needs to define the correct path references to all binary blobs, that are not provided by coreboot, on most architectures this includes at least `IFD`, `ME` and `GBE` (see above). The configuration file path should be: `heads/config/coreboot-NEW_BOARD.config`.
98 | * Note:
99 | TPM measured boot (```CONFIG_TPM_MEASURED_BOOT=y```) and verified boot (```CONFIG_VBOOT_LIB=y```) should be enabled. Ensure that you select CONFIG_TPM_MEASURED_BOOT and CONFIG_VBOOT_LIB in Kconfig. Furthermore, enable the TPM and pick the correct TPM version for the board.
100 | Other parameters depend on the board. It is up to you to determine the correct settings, as not all community members will have access to your board. `git diff` between `coreboot-CLOSEST_PLATFORM.config` and `coreboot-NEW_BOARD.config` may help.
101 |
102 | linux.config:
103 | ---
104 | This should be adapted from a similar board. The file path should be `heads/config/linux-NEW_BOARD.config`.
105 |
106 | CircleCI:
107 | ---
108 | Modify `heads/.circleci/config.yml` to add support for the `NEW_BOARD`. Initially, configure it to depend directly on musl-cross-make. At this stage, do not reuse caches—this simplifies debugging and ensures a clean build process.
109 | ```
110 | # NEW_BOARD is based on `X.Y.Z`. coreboot release, not sharing any buildstack from now, depend on muscl-cross cache
111 | - build:
112 | name: NEW_BOARD-hotp-maximized
113 | target: NEW_BOARD-hotp-maximized
114 | subcommand: ""
115 | requires:
116 | - x86-musl-cross-make
117 | ```
118 | CircleCI creates reproducible builds, allowing users to verify that the "flashable" roms were indeed produced by the given source code. In the development/debugging phase, it helps to ensure that you talk about the same build. It optimizes the collaboration between peers-board owners. Moreover, CI builds are significantly faster than local builds, reducing overall development time. As circleCI always builds all boards it makes it easier to find regressions early.
119 |
120 | * Optional: local builds.
121 | If you need to build locally (e.g. to ensure that some features work) pay attention to the helper functions at the end of the Makefiles. It is strongly recommended that local builders review the end of the Makefiles (including modules/*files), as these helper functions were designed to facilitate coreboot and Linux version bumps.
122 | For a completely clean build (the most radical approach), either clone the Heads repository again or remove all build artifacts using:
123 | ```bash
124 | ./docker_repro.sh BOARD=NEW_BOARD real.clean
125 | ```
126 | Building all tools needed will take a while depending on the number of cores and RAM available on your machine. For a less radical approach, run:
127 | ```shell
128 | ./docker_repro.sh BOARD=NEW_BOARD real.remove_canary_files-extract_patch_rebuild_what_changed
129 | ```
130 | Then, inject any changes into the coreboot fork canary file so that the build system refetches, repatches, and rebuilds the coreboot fork:
131 | ```shell
132 | echo "bogus" | sudo tee build/x86/coreboot-t480/.canary
133 | ```
134 | Note, patches that attempt to create files that are not expected to exist but exist will fail, showing at console what files already existed that couldn't be created. In this case, you need to remove them manually `rm -rf`, and restart the build with `./docker_repro.sh BOARD=NEW_BOARD` which will progress until each modules/* required per board config is successfully built.
135 |
136 | Testing
137 | ===
138 | For thorough testing—especially for a new board—using the following template (tasks to check) may be beneficial. Copy and paste this template into the GitHub message window when reporting test results. Mark completed tasks with an `x` inside the brackets [ ]. Replace `X.Y.Z` with the relevant information. It is recommended also to upload relevant screenshots For additional safety, you may wish to remove the metadata from these files.
139 | ```
140 | - [ ] Successful external flash link to circleci: https://X.Y.Z. from commit `X.Y.Z.` using external programmer model `X.Y.Z.` on `X.Y.Z.` Voltage mode
141 | - [ ] Boots successfully after the flashing:
142 | - [ ] Setting clock prompt on first reboot: ok if triggered correctly after initial flashing and CMOS battery disconnected
143 | - [ ] Clean boot detected (no keyring, nothing installed on disk): usb boot proposed and followed
144 | - [ ] Boots on usb
145 | - [ ] OS `X.Y.Z.` install and reboot
146 | - [ ] Heads functionality- no pubkey detected, but OS detected -> OEM-Factory-reset proposed. Done with `X.Y.Z.` hardwarekey e.g. nk3
147 | - [ ] On reboot after re-ownership: generate new HOTP/TOTP
148 | - [ ] wifi works based on OS `X.Y.Z.`
149 | - [ ] PR0
150 | - [ ] flashprog -p internal (not locked)
151 | - [ ] lock_chip (locks the platform with PR0, if PR0 patch applied in fork or under `patches/coreboot-X.Y.Z.` and coreboot config contain proper preparation of the platform)
152 | - [ ] flashprog -p internal (reports locked)
153 | ```
154 |
155 | Debugging
156 | ===
157 | Future debugging from Heads: enter recovery console, with a formatted USB thumb drive (fat32/exfat/ext3/ext4) and then
158 | ```shell
159 | mount-usb --mode rw
160 | cp /tmp/debug.log /media
161 | cbmem -L > /media/coreboot_measured_boot.txt
162 | cbmem -1 > /media/coreboot_cbmem_console.txt
163 | cbmem -t > /media/coreboot_cbmem_stages_timestamps.txt
164 | umount /media
165 | ```
166 | And then provide log files in a subsequent comment. That would be really helpful if something is still wrong. Of course, this should be modified based on the problem faced.
167 |
168 | Pull Request (PR)
169 | ===
170 | Create an initial PR, with commits relative roughly to the steps above. 1 commit should correspond to 1 major bullet point. Note that Heads is all about reproducibility. Therefore, your commit messages should explain why you made the change and _how_ you got there. For instance, explain how to create a certain binary blob or better write a script that can be run by everyone.
171 |
172 | Then lets collaborate in the PR. Create a heads fork in your own repository, follow the [contribution guide](https://github.com/linuxboot/heads/blob/master/CONTRIBUTING.md) as you go, make sure you sign and sign-off commits and don't stress too much if this seems a lot. Get a PR started and we will collaborate there.
173 |
174 | Remove debugging mode:
175 | ===
176 | One of last commits should remove the debugging mode, functions tracing and use quiet mode instead.
177 |
178 | Write a flashing/disassembling guide
179 | ===
180 | Take pictures as you disassemble your board and flash the Heads ROM. You can use them later to write a guide. This will help less technical community members using the board. Your effort will improve the ecosystem.
181 | If you cannot manage to finish writing the guide but talented enough to finish the port just create an issue on the GitHub and drop pictures. We will try to find time to help.
182 | The guide is essential part of the port.
183 |
184 | Contribute to maintenance
185 | ===
186 | Refer to [Contributing on GitHub page](https://github.com/linuxboot/heads/blob/master/CONTRIBUTING.md)
187 |
188 | Heads is free as free beer.
189 | In the spirit of open-source software, free knowledge, and communal goodwill, support the Heads and the open source development [Insurgo Initiative - Open Collective](https://opencollective.com/insurgo).
190 | The supply of free beer cannot be infinite. If everyone takes without giving back, at some point, the keg runs dry, and so does the goodwill.
191 | If you enjoy free beer, contribute in some form—whether by bringing code, docs, or financial support. The cycle must be maintained to keep the ecosystem alive. No one wants to be the last guest realizing the fridge is empty and no one restocked it. Together, it is possible to keep the free beer spirit alive—open, shared, and always refreshing. Cheers!
192 |
193 | You may examine all [github PRs with the label 'port'](https://github.com/linuxboot/heads/issues?q=label%3Aport+) to gather additional information. Good luck!
194 |
--------------------------------------------------------------------------------
/Development/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Development
4 | permalink: /Development
5 | nav_order: 9
6 | has_children: yes
7 | has_toc: false
8 | ---
9 |
10 | Contributing
11 | ====
12 |
13 | * [Issues tagged with "Help Wanted"](https://github.com/osresearch/heads/labels/help%20wanted)
14 | * [Issues tagged with "Bounty"](https://github.com/osresearch/heads/labels/Bounty)
15 | * [Contributing to the Heads wiki](/Contributing-to-Heads-wiki/)
16 |
--------------------------------------------------------------------------------
/Development/make-details.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Makefile
4 | permalink: /Makefile/
5 | nav_order: 2
6 | parent: Development
7 | ---
8 |
9 | Makefile
10 | ===
11 |
12 | Helpful targets and options
13 | ---
14 |
15 | Verbose build (otherwise all log output goes into `build/x86/logs/$(submodule).log`):
16 |
17 | ```shell
18 | make V=1
19 | ```
20 |
21 | Produce just the build of a single sub-module invoking its name as the target:
22 |
23 | ```shell
24 | make gpg
25 | ```
26 |
27 | Clean a single submodule or all (?) volatile submodules:
28 |
29 | ```shell
30 | make gpg.clean
31 | make modules.clean
32 | ```
33 |
34 | Clean all volatile submodules except crosscompiler (clean build):
35 |
36 | ```shell
37 | make real.clean
38 | ```
39 |
40 | The Heads `Makefile`
41 | ===
42 |
43 | All of the organization of the Heads build is handled in the top level
44 | `Makefile` with the goal of producing a reproducible `initrd.cpio` containing
45 | the Heads runtime and kernel modules, the Head's Linux `bzImage` kernel, and
46 | the `coreboot.rom` tailored for the target platform initialization.
47 |
48 | Build configuration
49 | ---
50 |
51 | Platform configuration are stored in the `board/$BOARD.config`
52 | ([list of boards can be found here](/Install-and-Configure#supported-devices))
53 | as well as the sub-modules necessary for the system.
54 | The main difference between these use cases is the init scripts that
55 | are installed in the inird, the Linux kernel configuration and the
56 | coreboot or edk2 configuration.
57 | An example configuration is [`board/x230.config`](https://github.com/osresearch/heads/blob/master/boards/x230/x230.config)
58 |
59 | Sub-modules
60 | ---
61 |
62 | Sub-modules are defined in the `modules` directory and each one defines a
63 | dependency to be fetched, verified, configured, built and installed. The top
64 | level `Makefile` includes all of the `modules/*` files and the ones that are
65 | configured to `y` in the board's configuration will be built and installed into
66 | the initrd. Since the Heads runtime is built with a `musl-libc` cross
67 | compiler, there are frequently hacks necessary to convince the `configure`
68 | scripts or submodule Makefiles to build correctly, and since we only want the
69 | bare minimum of output for the initrd we don't use the actual `make install`
70 | target to create the ramdisk.
71 |
72 | An example submodule file is for the `cryptsetup` command, used to mount
73 | encrypted volumes from the recovery shell:
74 |
75 | ```Makefile
76 | modules-$(CONFIG_CRYPTSETUP) += cryptsetup
77 |
78 | cryptsetup_depends := util-linux popt lvm2 $(musl_dep)
79 |
80 | cryptsetup_version := 1.7.3
81 | cryptsetup_dir := cryptsetup-$(cryptsetup_version)
82 | cryptsetup_tar := cryptsetup-$(cryptsetup_version).tar.xz
83 | cryptsetup_url := https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/cryptsetup-$(cryptsetup_version).tar.xz
84 | cryptsetup_hash := af2b04e8475cf40b8d9ffd97a1acfa73aa787c890430afd89804fb544d6adc02
85 |
86 | # Use an empty prefix so that the executables will not include the
87 | # build path.
88 | cryptsetup_configure := ./configure \
89 | CC="$(heads_cc)" \
90 | --host $(MUSL_ARCH)-elf-linux \
91 | --prefix "" \
92 | --disable-gcrypt-pbkdf2 \
93 | --with-crypto_backend=kernel \
94 |
95 | # but after building, replace prefix so that they will be installed
96 | # in the correct directory.
97 | cryptsetup_target := \
98 | $(MAKE_JOBS) \
99 | && $(MAKE) \
100 | -C $(build)/$(cryptsetup_dir) \
101 | prefix="$(INSTALL)" \
102 | install
103 |
104 | cryptsetup_output := \
105 | src/.libs/cryptsetup \
106 | src/.libs/veritysetup \
107 |
108 | cryptsetup_libraries := \
109 | lib/.libs/libcryptsetup.so.4 \
110 | ```
111 |
112 | The main components that every submodule must define are:
113 |
114 | * Give itself a name and add itself to the modules list, if configured:
115 | `modules-$(CONFIG_CRYPTSETUP) += cryptsetup`
116 | * Enumerate its depdencies by their submodule names:
117 | `cryptsetup_depends := util-linux popt lvm2 $(musl_dep)`
118 | * Define a version `cryptsetup_version := 1.73`
119 | * Specify the name of the directory that the tar file will unpack into `cryptsetup_dir`
120 | * Name the tar file that will be fetched `cryptsetup_tar`
121 | * Specify the URL from which this file will be fetched `cryptsetup_url`
122 | * Provide the sha256 hash of the file to verify its correctness `cryptsetup_hash`
123 | * Define the command that will be run in the unpacked diretory to configure it
124 | after unpacking and patching (see below) `cryptsetup_configure`
125 | ** Note that we provide the compiler `CC="$(heads_cc)"` in quotes, since there
126 | might be spaces in the variable
127 | * `--host $(MUSL_ARCH)-elf-linux` is used to indicate that this is a cross compile
128 | * `--prefix` avoids writing path names into the executable
129 | * plus some additional submodule specific stuff
130 | * The target to be called by make in this directory to generate the output
131 | * The `$(MAKE_JOBS)` will have the number of parallel instances to execute
132 | * Sometimes mutliple steps are required; separate them by `&&` to ensure that
133 | they short-circuit correctly
134 | * The first one has an implicit `$(MAKE) -C $(build)/$(cryptsetup_dir)`, but
135 | the second step has to list it explicitly
136 | * Lastly a list of any executables `cryptsetup_output` or libraries
137 | `cryptsetup_libraries` that will be produced by the build, relative to the
138 | build directory.
139 | * These will be installed into `initrd/bin` and `initrd/lib`
140 | * They will be stripped
141 |
142 | If there are any patches that need to be applied, put the file in
143 | `patches/$(submodule_name)-$(submodule_version).patch` and it will be applied
144 | when the tar file is unpacked.
145 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/BootOptions.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Configuring Boot Options
4 | permalink: /BootOptions/
5 | parent: Installing and configuring
6 | nav_order: 85
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 |
21 | Boot config files
22 | ===
23 |
24 | A user has the option to make persistent modifications to the non-Qubes boot
25 | process by creating one or more of the following files:
26 |
27 | | file | description |
28 | | ---- | ---- |
29 | | kexec_menu.txt | contains multiple options for parameters to the kexec command|
30 | | kexec_hashes.txt | a sha256sum file from within the respective boot directory |
31 | | kexec_iso_add.txt | a sh variable to override the standard ISO kernel argument additions |
32 | | kexec_iso_remove.txt | a sh variable to override the standard ISO kernel argument removals |
33 | | kexec_default.$N.txt | specifies the default kexec parameters corresponding to the Nth menu option |
34 | | kexec_default_hashes.txt | a sha256sum file for the default entry kexec file parameters |
35 | | kexec_rollback.txt | a sha256sum of the TPM counter contents in the tmp directory |
36 | | kexec_key_devices.txt | contains a list of "device uuid" combos for all LUKS devices to unlock |
37 | | kexec_key_lvm.txt | contains the name of an LVM group to activate on boot |
38 |
39 | These can be placed in any of the following locations:
40 |
41 | | location | description |
42 | | ---- | ---- |
43 | | /boot/ | used during internal HD boot |
44 | | /media/ | used during standard USB boot |
45 | | /media/kexec_iso/$ISO_FILENAME/ | used during USB boot from a particular ISO file |
46 |
47 | These files are only used if there is an appropriate signature for them in `kexec.sig` covering all `kexec*.txt` in that location. This can be generated from the user interface from the `Update checksums and sign all files` in /boot menu option, or manually from the recovery shell by running `kexec-sign-config -p /boot/`, etc. These files are only copied by `kexec-check-config` to `/tmp/kexec/` if there is a valid signature. From there the boot routines reference only the configs in `/tmp/kexec`.
48 |
49 | Dynamic vs Persistent Boot Options
50 | ====
51 |
52 | There are two ways for heads to boot Operating systems from /boot.
53 |
54 | * Dynamic (no kexec_menu.txt)
55 | * Persistent
56 |
57 | `kexec_menu.txt` is generated from GUI menu option `Default boot` while /boot contents detached signed digest is verified as valid. If there is no persistent `kexec_menu.txt` the boot directory will be searched for grub/syslinux-like configurations and it will be generated dynamically (for any of the HD/USB/USB-ISO locations). Creating a persistent `kexec_menu.txt` can be useful to limit the options displayed or to make persistent alterations to xen or kernel params.
58 |
59 |
60 | Persistent Boot Options
61 | ----
62 |
63 | To customize the boot options and ignore the default OS boot configurations you may create a
64 | `kexec_menu.txt` which has a simple layout of a single line per boot option:
65 |
66 | ```text
67 | description 1|elf|kernel /vmlinuz... |initrd /initramfs... |append ...
68 | description 2|multiboot|kernel ... |module ... |module ...
69 | description 3|xen|kernel /xen... |module /vmlinuz... | module /initramfs...
70 | ```
71 |
72 | Here is a sample `kexec_menu.txt` derived from grub.cfg:
73 |
74 |
75 |
76 | ```text
77 | Ubuntu|elf|kernel /vmlinuz-4.8.0-58-generic|initrd /initrd.img-4.8.0-58-generic|append root=/dev/mapper/ubuntu--vg-root ro quiet splash crashkernel=384M-:128M crashkernel=384M-:128M
78 | Memory test (memtest86+, serial console 115200)|elf|kernel /memtest86+.bin|append console=ttyS0,115200n8
79 | Qubes, with Xen hypervisor|multiboot|kernel /xen-4.6.5.gz placeholder |module /vmlinuz-4.4.67-13.pvops.qubes.x86_64 placeholder root=/dev/mapper/luks-UUID ro rd.qubes.hide_all_usb|module /initramfs-4.4.67-13.pvops.qubes.x86_64.img
80 | ```
81 |
82 |
83 |
84 | ### Securing Persistent Boot Options
85 |
86 | By default, no file hash checks are made for default boot since this was done during configuration. A non-default boot will fail when the file hashes don't match the expected values.
87 |
88 | ### require hash checks
89 |
90 | If a user wishes to require that file hashes be checked for a succesful
91 | non-recovery boot, they may set the `CONFIG_BOOT_REQ_HASH=y` in their
92 | respective Heads config file (/etc/config.user).
93 |
94 | ### default boot
95 |
96 | As as convenience mechanism, a user may select a boot option to always be used
97 | in the future, assuming that the boot parameters and file hashes have not
98 | changed. This can be done by running `kexec-save-default` manually or directly
99 | from the boot menu. This works for any boot location (HD/USB/USB ISO) but does
100 | modify the respective `/boot/` or `/media/` filesystems.
101 |
102 | In the case of dynamicly derived boot options from `grub.cfg` (i.e. no persistent kexec_menu.txt) an entry index is cached so that the boot will fail when there is a change to the underlying grub parameters. This will require the user to resign/revalidate the settings. This is useful to detect changes to the primary kernel/initramfs (for example in the Qubes case when the primary entry is first).
103 |
104 | ### multiboot
105 |
106 | Note that currently, any multiboot entry is interpreted as a Xen-variant and
107 | `kexec-boot` overrides the arguments to the multiboot kernel with custom
108 | arguments. A user can manually specify `multiboot` entries to override the
109 | default behavior by creating a custom `kexec_menu.txt`.
110 |
111 | ### rollback counter
112 |
113 | If a user wishes to require that a TPM counter be set for rollback prevention,
114 | they may set the `CONFIG_BOOT_REQ_ROLLBACK=y` in their respective Heads config
115 | file. When this is true, standard boot will only succeed in these two cases:
116 |
117 | * Booting from an verified ISO
118 | * Booting from a mount point that has a valid `kexec_rollback.txt` in its
119 | parameter directory
120 |
121 | The simplest way to achieve this is to set a default boot option as this updates
122 | the rollback counter by default.
123 |
124 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Building-Heads/general.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: General Building
4 | nav_order: 1
5 | permalink: /general-building/
6 | parent: Step 1 - Building Heads
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 |
11 |
12 |
13 | Table of contents
14 |
15 | {: .text-delta }
16 | 1. TOC
17 | {:toc}
18 |
19 |
20 |
21 | Building Heads
22 | ===
23 |
24 | With the new Nix build system, building Heads has become more streamlined.
25 |
26 | Please refer to the [Building Heads](https://github.com/linuxboot/heads/blob/master/README.md#building-heads) section in the [Heads README](https://github.com/linuxboot/heads/blob/master/README.md) for updated instructions on how to build Heads using the Nix build system's produced docker image reproducibly.
27 |
28 | For more information, you can also check out the [pull request #1661](https://github.com/linuxboot/heads/pull/1661) which provides additional details and updates to the build process.
29 |
30 | Clone the tree:
31 |
32 | ```shell
33 | git clone https://github.com/osresearch/heads
34 | cd heads
35 | ```
36 |
37 | Builds of Heads should be reproducible unless issues are currently known,
38 | [see Heads milestone #1](https://github.com/osresearch/heads/milestone/1) for
39 | more detail, which means that Heads will build in the exact same way on
40 | different computers. Because of this, as a user, you can guarantee that Heads
41 | has built correctly and has not been tampered with.
42 |
43 | However, this also means that the first time you build Heads it must first build
44 | the compilers that it will use to build itself. If that seems complicated,
45 | don’t worry. The result is that the first build of Heads will take about an
46 | hour to complete. After the first build, building Heads will take less than a
47 | minute.
48 |
49 | Useful targets, stored under the `boards` directory of the git tree.
50 |
51 | Generic
52 | ---
53 |
54 | Generally, everything that is needed to flash the SPI flash of a board is a
55 | single rom generated through `make BOARD=$BOARD` commands, where $BOARD is the
56 | name of the board that can be found under `board` directory of the git
57 | downloaded tree. You can do the build verbose by doing `make BOARD=$BOARD V=1`
58 |
59 | You can also run make in debug mode to trace errors in the buildsystem while you try to improve it through `make -d BOARD=$BOARD V=1`
60 |
61 | Make Heads for another board (`XXX` should be the name of your board in ./boards and YY the number of CPUs you want to build with):
62 |
63 | ```shell
64 | ./docker_repro.sh make BOARD=XXX CPUS=YY
65 | ```
66 |
67 | The resulting rom file for a x86 board will be either `./build/x86/XXX/XXX.rom` or
68 | `./build/x86/XXX/heads-XXX-vYYYY-gZZZZZZZ.rom` (`XXX` should be the name of your board in
69 | `./boards, vYYYY the pinned Heads version and ZZZZZZ the commit id from which your build comes from`).
70 |
71 | Please continue to the corresponding flashing guide for your device.
72 |
73 | More options and detail about Heads modules under [Makefile]({{ site.baseurl }}/Makefile/)
74 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Building-Heads/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Step 1 - Building Heads
4 | permalink: /Building/
5 | nav_order: 1
6 | parent: Installing and configuring
7 | has_children: yes
8 | ---
9 |
10 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Building-Heads/p8z77-m_pro-tpm1.maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Asus P8Z77-M Pro
4 | permalink: /p8z77-m_pro-building/
5 | nav_order: 1
6 | parent: Step 1 - Building Heads
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | ASUS P8Z77-M Pro
11 | ===
12 |
13 | This board currently supports TPMv1 modules, please note that TPM v2 module is not currently supported
14 | The following TPM modules have been tested and known to work: Asus branded TPM rev. 1.02H & Foxconn TPM Krypton rev. 1.0
15 |
16 | Please determine the [version]({{ site.baseurl }}/Prerequisites#supported-devices) you want to build (HOTP or not).
17 |
18 | For the ASUS P8Z77-M Pro there are multiple maximized boards under `./boards`, p8z77-m_pro-tpm1-maximized and p8z77-m_pro-tpm1-maximized-hotp.
19 |
20 | As opposed to Legacy boards produced ROM images, Maximized boards produced ROMs are totally valid ROMs, including a valid Intel Flash Descriptor (IFD), Ethernet, a valid neutered Intel ME containing only BUP+ROMP modules which liberated space is given back to the BIOS (coreboot+payload) region. The IFD also has the VSCC table remove in these boards](https://github.com/corna/me_cleaner/issues/80) which prevents the ME having an instruction of what model of flash chip to write to.
21 |
22 | These boards have a script in the 'blobs/p8z77-m_pro' folder which will automatically download a factory rom and perform the necassary modifications and extraction.
23 |
24 | You can also [download the ROMs directly from CircleCI]({{ site.baseurl }}/Downloading)
25 |
26 | Please continue with the [flashing guide]({{ site.baseurl }}/Asus-p8z77-m_pro-flashing/)
27 |
28 | More options and detail about Heads modules under [Makefile]({{ site.baseurl }}/Makefile/)
29 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Building-Heads/x230-maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lenovo X230 Maximized
4 | permalink: /x230-maximized-building/
5 | nav_order: 1
6 | parent: Step 1 - Building Heads
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | Lenovo X230 Maximized
11 | ====
12 |
13 | Please determine the [version]({{ site.baseurl }}/Prerequisites#supported-devices) you want to build (HOTP or not).
14 |
15 | For the Thinkpad x230 there are multiple maximized boards under `./boards`,
16 | x230-maximized, x230-hotp-maximized and usb-kb or edp-fhd variations.
17 |
18 | All those roms are externally flashable through their top and bottom rom images.
19 |
20 | As opposed to Legacy boards produced ROM images, Maximized boards produced ROMs
21 | are totally valid ROMs, including a valid Intel Flash Descriptor (IFD), Ethernet
22 | Intel Gigabit configuration flash space fiaxating MAC to DE:AD:C0:FF:EE,
23 | a valid neutered Intel ME containing only BUP+ROMP modules which liberated
24 | space is given back to the BIOS (coreboot+payload) region.
25 |
26 | x230 maximized boards need blobs to be downloaded and extracted from Lenovo prior
27 | of building the board configuration but those are managed by the board build, so see general builds instructions.
28 |
29 | Please refer to the [xx30 blobs documentation](https://github.com/osresearch/heads/blob/master/blobs/xx30/README),
30 |
31 | You can also [download the ROMs directly from CircleCI]({{ site.baseurl }}/Downloading)
32 |
33 |
34 | Please continue with the [flashing guide]({{ site.baseurl }}/x230-maximized-flashing/)
35 |
36 | More options and detail about Heads modules under [Makefile]({{ site.baseurl }}/Makefile/)
37 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Downloading.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Step 1 - Downloading Heads
4 | nav_order: 2
5 | permalink: /Downloading
6 | parent: Installing and configuring
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 | Downloading Heads ROMs
21 | ===
22 |
23 | What board configuration should I choose?
24 | ---
25 | Please refer to the [devices compatibility matrix]({{ site.baseurl }}/Prerequisites#supported-devices).
26 |
27 | Downloading ROM files for initial flashing
28 | ---
29 | If you are performing an initial external flash, follow these steps to download the required ROM files and verify their integrity:
30 |
31 | 1. **Access CircleCI Builds**:
32 | - Go to the [Heads GitHub repository](https://github.com/linuxboot/heads) and click on the latest commit's green checkmark.
33 | 
34 | - This will display a list of CircleCI jobs. Locate the job corresponding to your board's name and click the "Details" link.
35 | 
36 |
37 | 2. **Navigate to Artifacts**:
38 | - On the CircleCI job page, click the "Artifacts" tab to view the output files of the build.
39 | 
40 |
41 | 3. **Download Required Files**:
42 | - Download the following files by right-clicking their links and selecting "Save Link as...":
43 | 
44 | - `*.rom` files (e.g., `top.rom` and `bottom.rom` for two SPI chip boards).
45 | - `hashes.txt` file containing the SHA256 hashes of the ROM files.
46 |
47 | 4. **Verify ROM File Integrity**:
48 | - Use `sha256sum` or an equivalent tool to compute the hash of the downloaded ROM files.
49 | - Compare the computed hash with the corresponding entry in the `hashes.txt` file to ensure the files are valid.
50 |
51 | 5. **Prepare for Flashing**:
52 | - Save the verified ROM files and `hashes.txt` to the computer or USB drive that will be used for external flashing.
53 |
54 | For more details on external flashing, refer to the [Upgrading documentation]({{ site.baseurl }}/Updating).
55 |
56 | Internal upgrading from ZIP files
57 | ---
58 | If you are upgrading an existing Heads installation, you can use the ZIP file provided in the CircleCI artifacts:
59 |
60 | 1. **Download the ZIP File**:
61 | - From the CircleCI "Artifacts" tab, download the ZIP file corresponding to your board.
62 |
63 | 2. **Transfer to Target System**:
64 | - Save the ZIP file to a USB drive and transfer it to the target system.
65 |
66 | 3. **Perform the Upgrade**:
67 | - Use the Heads GUI to upgrade the firmware by selecting the ZIP file. This method automatically verifies the ROM integrity and flashes the firmware.
68 |
69 | **Note**: Internal upgrading via ZIP files is supported for firmware versions built after [this November 2023 commit](https://github.com/linuxboot/heads/commit/6873df60c1c965ac812a49d9d245f338d8a3b128).
70 |
71 | For more details on internal upgrading, refer to the [Upgrading documentation]({{ site.baseurl }}/Updating).
72 |
73 | Caution for Rolling Releases
74 | ---
75 | Heads is a rolling release. If you do not have an external programmer, refer to the [Upgrading documentation]({{ site.baseurl }}/Updating#global-warning-no-hardware-programmer-be-cautious) for important precautions before upgrading. This includes:
76 | - Waiting for community testing and reviewing reported issues to avoid potential regressions.
77 | - Understanding the implications of `UNTESTED` and `UNMAINTAINED` labels in board names. For more details, refer to the [UNTESTED and UNMAINTAINED boards documentation](https://github.com/linuxboot/heads/blob/master/unmaintained_boards/README.md).
78 |
79 | For more details on upgrading, refer to the [Upgrading documentation]({{ site.baseurl }}/Updating).
80 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/Clean-the-ME-firmware.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Cleaning Intel Management Engine
4 | permalink: /Clean-the-ME-firmware/
5 | nav_order: 99
6 | parent: Step 2 - Flashing Guides
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | What is the Intel Management Engine
11 | ===
12 |
13 | The Intel ME is a coprocessor, running inside your Intel CPU, which is supposed
14 | to function as a out-of-band management system for your computer.
15 | It's based on a ARC/i386 core depending of the version, can be powered even when
16 | the main CPU is off and has more privileges than the CPU itself.
17 | More info: [Intel Active Management Technology](https://en.wikipedia.org/wiki/Intel_Active_Management_Technology)
18 |
19 | How to disable/deactive most of it
20 | ===
21 |
22 | ***ALL MAXIMIZED BOARDS DO THE NEUTERING AUTOMATICALLY WHEN YOU BUILD THE BOARD. SEE GENERAL BUILDING GUIDE***
23 |
24 | The ME firmware sits on the second SPI flash chip of the x230 (the 8MB one). We
25 | cannot remove it completely, otherwise the machine will shut itself off after
26 | 30 minutes. We can, however, reduce it to the bare minimum necessary to keep it
27 | running, but without any malicious code in it (or so we hope, depending of what
28 | the ROMP and BUP modules really do...).
29 |
30 | The initial step is to upgrade the proprietary BIOS to the last upgradeable
31 | version one for each platform.
32 | As an example, for the x230, the latest upgradeable version would be
33 | [version 2.76](https://download.lenovo.com/pccbbs/mobiles/g2uj32us.iso) without
34 | [EC signature verification](https://support.lenovo.com/us/en/solutions/len-27764)
35 | . Newer firmware version [won't permit to swap a x220 keyboard on the x230](https://github.com/hamishcoleman/thinkpad-ec/pull/130)
36 | .
37 |
38 | Prepare a USB bootable disk by following
39 | [el torito instructions](https://askubuntu.com/questions/651281/write-bootable-bios-update-iso-to-usb-stick)
40 | , then boot that prepared USB disk and upgrade the prioprietary firmware to
41 | latest available version following on screen instructions. Be sure to have a
42 | fully charged battery, be connected to power source prior of attempting to
43 | upgrade, else you will have to wait for the battery to be changed.
44 |
45 | Once the proprietary firmware is updated to the latest available user ownable
46 | version, take a flash dump of the bottom SPI chip and verify that its backup is
47 | valid.
48 |
49 | Flashrom can be downloaded on most linux distribution on the external laptop
50 | that will be used to flash the cleaned rom. (`sudo dnf install flashrom` or
51 | `sudo apt-get install flashrom`.
52 |
53 | With a ch341a programmer, the command would look like the following:
54 |
55 | ```shell
56 | sudo flashrom -r ~/down.rom --programmer ch341a_spi && \
57 | sudo flashrom -v ~/down.rom --programmer ch341a_spi
58 | ```
59 |
60 | If they match, clone this repo:
61 | `https://github.com/corna/me_cleaner.git`
62 | and then run:
63 | `python ~/me_cleaner/me_cleaner.py -c flash.bin`
64 | to check if it's a valid ME firmware.
65 | The output should be like:
66 |
67 | ```text
68 | Full image detected
69 | The ME/TXE region goes from 0x3000 to 0x4ff000
70 | Found FPT header at 0x3010
71 | Found 23 partition(s)
72 | Found FTPR header: FTPR partition spans from 0x183000 to 0x24d000
73 | ME/TXE firmware version 8.1.30.1350
74 | Checking FTPR RSA signature... VALID
75 | ```
76 |
77 | If it's not, replace the reprogrammer clip and try again :)
78 |
79 | Next, unlock the descriptor and ME regions with ifdtool. We consider here that
80 | you already build Heads through `make BOARD=x230`:
81 | `~/heads/build/x86/coreboot-4.13/util/ifdtool/ifdtool -u down.rom`
82 | This produced a new unlocked rom under `down.rom.new`
83 |
84 | Next, let's strip all the nasty bits:
85 |
86 |
87 |
88 | ```shell
89 | python ~/me_cleaner/me_cleaner.py -r -t -d -S -O clean_flash.bin down.rom.new --extract-me extracted_me.rom
90 | ```
91 |
92 |
93 |
94 | Output:
95 |
96 | ```text
97 | Full image detected
98 | The ME/TXE region goes from 0x3000 to 0x4ff000
99 | Found FPT header at 0x3010
100 | Found 23 partition(s)
101 | Found FTPR header: FTPR partition spans from 0x183000 to 0x24d000
102 | ME/TXE firmware version 8.1.30.1350
103 | Removing extra partitions...
104 | Removing extra partition entries in FPT...
105 | Removing EFFS presence flag...
106 | Removing ME/TXE R/W access to the other flash regions...
107 | Correcting checksum (0x7b)...
108 | Reading FTPR modules list...
109 | UPDATE (LZMA , 0x1cf4f2 - 0x1cf6b0): removed
110 | ROMP (Huffman, fragmented data ): NOT removed, essential
111 | BUP (Huffman, fragmented data ): NOT removed, essential
112 | KERNEL (Huffman, fragmented data ): removed
113 | POLICY (Huffman, fragmented data ): removed
114 | HOSTCOMM (LZMA , 0x1cf6b0 - 0x1d648b): removed
115 | RSA (LZMA , 0x1d648b - 0x1db6e0): removed
116 | CLS (LZMA , 0x1db6e0 - 0x1e0e71): removed
117 | TDT (LZMA , 0x1e0e71 - 0x1e7556): removed
118 | FTCS (Huffman, fragmented data ): removed
119 | ClsPriv (LZMA , 0x1e7556 - 0x1e7937): removed
120 | SESSMGR (LZMA , 0x1e7937 - 0x1f6240): removed
121 | Relocating FTPR from 0xd00 - 0xcad00 to 0xd00 - 0xcad00...
122 | Adjusting FPT entry...
123 | Adjusting LUT start offset...
124 | Adjusting Huffman start offset...
125 | Adjusting chunks offsets...
126 | Moving data...
127 | The ME minimum size should be 98304 bytes (0x18000 bytes)
128 | The ME region can be reduced up to:
129 | 00003000:0001afff me
130 | Setting the AltMeDisable bit in PCHSTRP10 to disable Intel ME...
131 | Removing ME/TXE R/W access to the other flash regions...
132 | Extracting and truncating the ME image to "extracted_me.rom"...
133 | Checking the FTPR RSA signature of the extracted ME image... VALID
134 | Checking the FTPR RSA signature... VALID
135 | Done! Good luck!
136 | ```
137 |
138 | After that, you got your new, cleaned up version of the ME firmware inside
139 | clean_flash.bin
140 | Flash it back on the SPI:
141 |
142 | `sudo flashrom -w clean_flash.bin --programmer ch341a_spi`
143 |
144 | You're now good to go :)
145 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/T420-maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lenovo T420 Maximized
4 | permalink: /T420-maximized-flashing/
5 | nav_order: 1
6 | parent: Step 2 - Flashing Guides
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | Lenovo T420 (Maximized)
11 | ===
12 |
13 | [T420 Hardware Maintenance Manual](https://download.lenovo.com/pccbbs/mobiles_pdf/t420_and_t420i_ug_en.pdf)
14 |
15 | The thinkpad T420 has only one SPI flash chip that hold the BIOS, ME, etc. It is located under the palm rest. Similarly to the T430, to access this chip complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this follow the T430/x230 guide.
16 |
17 | [Here](https://www.coreboot.org/Board:lenovo/t420) is the location of the chip. At some models the location of the dot where the red wire from programmer should go may be misleading. The dot you need is just black.
18 |
19 | 
20 |
21 | You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/).
22 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/T430-maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lenovo T430 Maximized
4 | permalink: /T430-maximized-flashing/
5 | nav_order: 1
6 | parent: Step 2 - Flashing Guides
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | Lenovo T430 (Maximized)
11 | ===
12 |
13 | [T430 Hardware Maintenance Manual](https://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles_pdf/t430_t430i_hmm_en_0b48304_04.pdf)
14 |
15 | Similarly to the x230, the thinkpad T430 has two SPI flash chips that hold the BIOS, ME, etc. They are located under the palm rest. To access these chips, complete disassembly is required. It is a straightforward process and takes approximately 30 minutes. For this you will need: some screwdrivers, thermal paste (since the CPU cooler needs to be removed too), an assembled ch341a SPI programmer (e.g. [Modified ch341a SPI programmer](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) by Novacustom) and a other laptop/PC with Ubuntu installed. Other linux based OS should be fine too.
16 |
17 | First remove the battery and the cable powering your device.
18 |
19 | 
20 |
21 | Removing these screws will allow you to remove the keyboard and palm rest.
22 |
23 | 
24 |
25 | First, slightly shift the keyboard towards the screen.
26 |
27 | 
28 | The keyboard is connected to the motherboard by a ribbon cable which easily
29 | detaches from the motherboard.
30 |
31 | 
32 |
33 | Remove these screws in order to remove the palm-rest.
34 |
35 | 
36 |
37 | The palm-rest is removed. Removing these screws will allow you to further detach the screen and the CPU cooler.
38 |
39 | 
40 |
41 | The screen and CPU with left speaker are removed.
42 |
43 | 
44 |
45 | Flip the board and remove these screws too. This should allow you to get rid of the aluminium part to access the SPI flash chips.
46 |
47 | 
48 |
49 | Flip the board again. The SPI flash chips are located under this plastic.
50 |
51 | 
52 |
53 | Left chip corresponds to the "bottom" flash chip (8192 kb) and right corresponds to the "top" (4096 kb) chip, respectively. The top chip is 4MB and contains the BIOS and reset vector. The bottom chip is 8MB and has the [Intel Management Engine (ME)](https://www.flashrom.org/ME) firmware, plus the flash descriptor. To be on the safe side, you may want to disconnect CMOS battery before next steps.
54 |
55 | 
56 |
57 |
58 | First [download]({{ site.baseurl }}/Downloading) or build (please see [general building]({{ site.baseurl }}/{{ site.baseurl }}/x230-maximized-building/) / [building x230]({{ site.baseurl }}/x230-maximized-building/)) the maximized board roms (top and bottom) for this board and verify their hashes.
59 |
60 |
61 | Try to read the name on the top SPI flash chip. I was unable to do that. The dots on the chip help to identify the correct clip orientation.
62 |
63 | 
64 |
65 | Then, connect the clip and ch341a programmer to the "top" (4096 kb) SPI flash chip. In my set up, the red wire should be where the dot is.
66 |
67 | 
68 |
69 | Use flashrom to check the chip that you are connected to:
70 |
71 | ```shell
72 | sudo flashrom -p ch341a_spi
73 | ```
74 |
75 |
76 | Here is my output.
77 |
78 | 
79 |
80 | Find the chip and read from it twice (For me the SPI flash chip is `YYY`):
81 |
82 | ```shell
83 | sudo flashrom -r ~/top.bin --programmer ch341a_spi -c YYY && \
84 | sudo flashrom -v ~/top.bin --programmer ch341a_spi -c YYY
85 | ```
86 |
87 | If the files differ then try reconnecting your programmer to the SPI flash chip
88 | and make sure your flashrom software is up to date.
89 |
90 |
91 | If they are the same then write `t430-maximized-top.rom` to the SPI flash chip:
92 |
93 | ```shell
94 | sudo flashrom -p ch341a_spi -c YYY -w ~/heads/build/x86/t430-maximized/t430-maximized-top.rom
95 | ```
96 |
97 | While everything goes well you should see the blue LED on the programmer.
98 |
99 | 
100 |
101 |
102 | Here is a successful attempt.
103 |
104 | 
105 |
106 |
107 | Try to read the name on the bottom SPI flash chip. Then, connect the clip and
108 | ch341a programmer to the bottom SPI flash chip.
109 |
110 | 
111 |
112 | Use flashrom to check the chip that you are connected to:
113 |
114 | ```shell
115 | sudo flashrom -p ch341a_spi
116 | ```
117 |
118 | Here is my output.
119 |
120 | 
121 |
122 | Find the chip and read from the chip twice (For me the SPI flash chip is `ZZZ`):
123 |
124 | ```shell
125 | sudo flashrom -r ~/bottom.bin --programmer ch341a_spi -c ZZZ && \
126 | sudo flashrom -v ~/bottom.bin --programmer ch341a_spi -c ZZZ
127 | ```
128 |
129 | The 8M bottom chip contains the ME firmware. It is neutralized in maximized version. You can flash it specifying the same chip you found under ZZZ:
130 | ```shell
131 | sudo flashrom -p ch341a_spi -c ZZZ -w ~/heads/build/x86/t430-maximized/t430-maximized-bottom.rom
132 | ```
133 |
134 | If all goes well, you should see the keyboard LED flash, and within a second Heads will boot in its GUI.
135 |
136 | Two reboots are sometimes needed after flash. Force power off by holding the power button for 10 seconds. Since the memory training data was wiped by the content of the full flashed ROM, this is normal.
137 |
138 | You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/).
139 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/T480-maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lenovo T480 Maximized
4 | permalink: /T480-maximized-flashing/
5 | nav_order: 1
6 | parent: Step 2 - Flashing Guides
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | Lenovo T480 (Maximized)
11 | ===
12 |
13 | [T480 Hardware Maintenance Manual](https://download.lenovo.com/pccbbs/mobiles_pdf/t480_hmm_en.pdf)
14 |
15 | Accessing and flashing the BIOS chip on a T-series machine has never been easier. The process is straightforward and takes approximately 10 minutes.
16 |
17 | The ThinkPad T480 has two SPI flash chips important for the port. The first chip holds the BIOS, ME, etc., while the second holds the Thunderbolt firmware. To access these chips, you only need to remove the back panel, which is secured by six screws.
18 |
19 | For whole procedure you will need:
20 | - A Phillips screwdriver +1 (PH1), which is standard for most laptop screws.
21 | - An assembled Raspberry Pi or CH341A SPI programmer. You should use a CH341A revision 1.6 or later (e.g., 1.6, 1.7, etc.) because these versions have a properly implemented and enforced voltage regulator, ensuring stable 3.3V operation (3.3V is important!) (e.g. [Modified CH341A SPI programmer](https://novacustom.com/product/modded-ch341a-bios-firmware-programmer-3v/) by Novacustom) or [open-source Tigard tool](https://github.com/tigard-tools/tigard). Using Raspberry Pi pico is described in the [Libreboot flash guide](https://libreboot.org/docs/install/spi.html).
22 | - Other laptop/PC with a Linux-based OS installed.
23 | - Optional: A plastic guitar pick or an old credit card to help detach the bottom case from the clips holding it in place. Otherwise, it can be difficult to remove, increasing the risk of breaking the tabs or the top part of the bottom case above the battery connector.
24 |
25 | There is still debate over which programmer and software should be used (flashprog vs. flashrom). Before following this guide, make sure you read [README.md](https://github.com/linuxboot/heads/tree/master/blobs/xx80/README.md) and the related information.
26 |
27 | Some ThinkPad T480 units on the used market are affected by an Intel bug in the Thunderbolt firmware. In short, the flash chip becomes full, causing Thunderbolt fast charging to stop working, though slow charging still functions. This issue can also affect the USB-C port. For convenience, Heads provides a fixed and padded Thunderbolt firmware that resolves the "charging problem" if your laptop is affected. Board testers did not encounter this issue, and it is unlikely to occur if your laptop was in use for more than 12 months before flashing. If you do experience the "charging bug," it is possible to fix it with external flashing. Also, the update is possible prior flashing heads using [fwupd from a Linux distribution](https://www.reddit.com/r/thinkpad/comments/12tf6xv/psa_t480_thunderbolt_controller_v23_is_now_on/?rdt=44850)
28 |
29 | Please note that as of March 2025, Thunderbolt data transfer is not supported upstream by [coreboot](https://review.coreboot.org/c/coreboot/+/83274). However, video output through Thunderbolt and charging still work. This means only the USB-C charging port can be used for data transfer.
30 |
31 | ## Flashing Heads
32 |
33 | First, remove the battery and disconnect the power cable from your device. Removing the screws will allow you to remove the back panel. A guitar pick or an old credit card can be helpful for detaching the panel.
34 |
35 | 
36 |
37 | The back panel and the battery are removed. Important, ensure that all batteries, including the CMOS battery, are disconnected. Arrows indicate the direction you should pull the connectors. Pull the plastic part, not the wires, as the wires are thin and can be damaged.
38 |
39 | 
40 |
41 | The top-right chip corresponds to the Thunderbolt SPI flash chip (1 MB). The chip located in the middle of the board corresponds to the BIOS (16 MB) chip, respectively.
42 |
43 | The chip located in the middle of the board contains the [Intel Management Engine (ME)](https://www.flashrom.org/ME) firmware.
44 |
45 | 
46 |
47 | First [download]({{ site.baseurl }}/Downloading) or build (please see [general building]({{ site.baseurl }}/{{ site.baseurl }}/x230-maximized-building/) / [building x230]({{ site.baseurl }}/x230-maximized-building/)) the board rom for this board and verify its hash value.
48 |
49 | Try to read the name of the SPI flash chip. The dot on the chip helps to identify the correct clip orientation.
50 |
51 | 
52 |
53 | First, connect the clip of the CH341A programmer to the chip. Next, connect the programmer to the USB port of your other Linux-based computer with flashrom installed. In my setup, the red wire should be where the dot is (the dot indicates pin 1). Here, please also see the flashing guide for the T430.
54 |
55 | Use flashrom to check the chip you are connected to:
56 |
57 | ```shell
58 | sudo flashrom -p ch341a_spi
59 | ```
60 |
61 | Here is my output.
62 |
63 | 
64 |
65 | Read from the chip twice (where the name of the flash chip is `YYY`):
66 |
67 | ```shell
68 | sudo flashrom -r ~/t480_original_bios.bin --programmer ch341a_spi -c YYY
69 | ```
70 |
71 | First output can be seen here.
72 | 
73 |
74 | ```shell
75 | sudo flashrom -r ~/t480_original_bios_1.bin --programmer ch341a_spi -c YYY
76 | ```
77 | Second output can be seen here.
78 | 
79 |
80 | Make sure that the dump matches the chip content. If this is the case, the output of the following command will state `Verifying flash... VERIFIED`
81 |
82 | ```shell
83 | sudo flashrom -v ~/t480_original_bios.bin --programmer ch341a_spi -c YYY
84 | ```
85 | Make sure that files do not differ.
86 |
87 | ```shell
88 | sha256sum t480_original_bios.bin
89 | sha256sum t480_original_bios_1.bin
90 | ```
91 |
92 | My dumps were the same.
93 | 
94 |
95 | Alternative comparison is bit-by-bit. If the files are the same, there should be no output of this command. Otherwise, you will see a bit-by-bit difference between the files.
96 |
97 | ```shell
98 | diff <(hexdump -C t480_original_bios.bin) <(hexdump -C t480_original_bios_1.bin)
99 | ```
100 |
101 | If the files differ or the chip content does not match the dump, try reconnecting your programmer to the SPI flash chip and make sure your flashrom/flashprog software is up-to-date.
102 |
103 |
104 | If they are the same, then write `T480-hotp-maximized.rom` to the SPI flash chip:
105 |
106 | ```shell
107 | sudo flashrom -p ch341a_spi -c YYY -w ~/heads/build/x86/T480-hotp-maximized/T480-hotp-maximized.rom
108 | ```
109 |
110 | Here is a successful attempt. Be patient, it may take a while.
111 | 
112 |
113 | If all goes, well you can connect the battery, press the power button and you should see the keyboard LED flash. After that, Heads will boot into its GUI.
114 |
115 | Two reboots are sometimes needed after flashing. Force a power off by holding the power button for 10 seconds. Since the memory training data was wiped by the content of the fully flashed ROM, this is normal.
116 |
117 | You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/).
118 |
119 | ## Flash Thunderbolt firmware
120 | Important, ensure that power supply and all batteries, including the CMOS battery, are disconnected. After connecting the clip to the Thunderbolt chip as shown in the figure above read from the chip, making sure the connection is stable. The procedure is similar to the flashing Heads on the SPI chip. Therefore, comments are skipped.
121 |
122 | ```shell
123 | sudo flashrom -r ~/t480_original_tb.bin --programmer ch341a_spi -c YYY
124 | ```
125 |
126 | ```shell
127 | sudo flashrom -r ~/t480_original_tb_1.bin --programmer ch341a_spi -c YYY
128 | ```
129 |
130 | ```shell
131 | sudo flashrom -v ~/t480_original_tb.bin --programmer ch341a_spi -c YYY
132 | ```
133 |
134 | ```shell
135 | sha256sum t480_original_tb.bin
136 | sha256sum t480_original_tb_1.bin
137 | ```
138 |
139 | ```shell
140 | diff <(hexdump -C t480_original_tb.bin) <(hexdump -C t480_original_tb_1.bin)
141 | ```
142 |
143 | Flash the padded Thunderbolt firmware. The firmware file tb.bin is located in the blobs folder after you build the Heads locally, or in the CircleCI artifacts.
144 |
145 | ```shell
146 | sudo flashrom -p ch341a_spi -c YYY -w ~/tb.bin
147 | ```
148 | Done.
149 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Step 2 - Flashing Guides
4 | permalink: /Flashing-guides
5 | nav_order: 2
6 | parent: Installing and configuring
7 | has_children: yes
8 | ---
9 |
10 | - [The internal flashing commands for Purism devices can be found here](https://docs.puri.sm/PureBoot/Heads/User_Manual.html#flash-the-compiled-heads-rom-to-your-hardware)
11 | - External x230/t430 flashing can be found through Nitrokey, which supports x230/t430 sells, at
12 |
13 | - [Video showing how to properly connect a SOIC "Pamona" clip once motherboard SPI chips accessible](https://user-images.githubusercontent.com/827570/203147231-4791a1f1-bb9b-4373-9b4c-309bb3611c8b.mp4)
14 |
15 | - [Video showing how to automatize SPI chip detection upon correct SOIC clip connection](https://user-images.githubusercontent.com/827570/203147643-528e9828-2666-4bd6-900f-3b915a11f633.mp4)
16 |
17 | TODO: Add WSON
18 | TODO: Add guides for total disassembly as community effort
19 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Flashing-Guides/x230-maximized.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Lenovo X230 Maximized
4 | permalink: /x230-maximized-flashing/
5 | nav_order: 1
6 | parent: Step 2 - Flashing Guides
7 | grand_parent: Installing and configuring
8 | ---
9 |
10 | Lenovo X230 (Maximized) (applies to all 4mb+8mb SPI chips maximized boards)
11 | ===
12 |
13 | [X230 Hardware Maintenance Manual](https://web.archive.org/web/20201112030049/https://thinkpads.com/support/hmm/hmm_pdf/x230_x230i_hmm_en_0b48666_01.pdf)
14 | [X230 Tablet Hardware Maintenance Manual](https://web.archive.org/web/20130908100917/http://download.lenovo.com/pccbbs/mobiles_pdf/0b48730.pdf)
15 |
16 | 
17 |
18 | First remove the battery or cable powering your device. The Thinkpad x230 has
19 | two SPI flash chips that hold the BIOS, ME, etc. and are located under the
20 | palm rest. To access these chips, first remove the indicated screws on the back
21 | of the laptop.
22 |
23 | 
24 |
25 | Removing these screws will allow you to remove the keyboard and palm rest.
26 |
27 | 
28 |
29 | The keyboard is connected to the motherboard by a ribbon cable which easily
30 | detaches from the motherboard. (The keyboard only needs to be removed so that
31 | the palm rest can be removed. After removing the palm rest, you can put the
32 | keyboard back.)
33 |
34 | The palm rest is also connected to the motherboard, but there is a little latch
35 | holding its ribbon cable. After undoing that latch, the palm rest should be
36 | fairly easy to remove.
37 |
38 | Pull up the black plastic on the bottom right of the palm rest to reveal the two
39 | SPI flash chips.
40 |
41 | 
42 |
43 | The top chip is 4MB and contains the BIOS and reset vector. The bottom chip is
44 | 8MB and has the [Intel Management Engine (ME)](https://www.flashrom.org/ME)
45 | firmware, plus the flash descriptor.
46 |
47 | Based on [the work done here](https://github.com/osresearch/heads/issues/716),
48 | the chips should be one 4M and one 8M of the following:
49 |
50 | |Vendor|Device| size|
51 | |---|---|---|
52 | |Eon | EN25QH32 | 4M|
53 | |Eon| EN25QH64 | 8M|
54 | |Macronix|MX25L3206E - MX25L3206E/MX25L3208E|4M|
55 | |Macronix|MX25L6405,MX25L6405D, MX25L6406E/MX25L6408E, MX25L6436E/MX25L6445E/MX25L6465E/MX25L6473E/MX25L6473F, MX25L6495F|8M|
56 | |Micron/Numonyx/ST|N25Q032..1E, N25Q032..3E|4M|
57 | |Micron/Numonyx/ST|N25Q064..1E, N25Q064..3E|8M|
58 | |Winbond | W25Q32.V, W25Q32.W | 4M|
59 | |Winbond | W25Q64.V, W25Q32.W | 8M|
60 |
61 | First [download]({{ site.baseurl }}/Downloading) / [build]({{ site.baseurl }}/x230-maximized-building/) the maximized board roms (top and bottom) for this board and verify their hashes.
62 |
63 |
64 | Try to read the name on the top SPI flash chip. Then, connect the clip and
65 | ch341a programmer to the top SPI flash chip. Use flashrom to check the chip
66 | that you are connected to:
67 |
68 | ```shell
69 | sudo flashrom -p ch341a_spi
70 | ```
71 |
72 | Find the chip and read from it twice (For me the SPI flash chip is `YYY`):
73 |
74 | ```shell
75 | sudo flashrom -r ~/top.bin --programmer ch341a_spi -c YYY && \
76 | sudo flashrom -v ~/top.bin --programmer ch341a_spi -c YYY
77 | ```
78 |
79 | If the files differ then try reconnecting your programmer to the SPI flash chip
80 | and make sure your flashrom software is up to date.
81 |
82 | If they are the same then write `x230-maximized-top.rom` to the SPI flash chip:
83 |
84 | ```shell
85 | sudo flashrom -p ch341a_spi -c “YYY” -w ~/heads/build/x86/x230-maximized/x230-maximized-top.rom
86 | ```
87 |
88 | Try to read the name on the bottom SPI flash chip. Then, connect the clip and
89 | ch341a programmer to the bottom SPI flash chip. Use flashrom to check the chip
90 | that you are connected to:
91 |
92 | ```shell
93 | sudo flashrom -p ch341a_spi
94 | ```
95 |
96 | Find the chip and read from the chip twice (For me the SPI flash chip is `ZZZ`):
97 |
98 | ```shell
99 | sudo flashrom -r ~/bottom.bin --programmer ch341a_spi -c ZZZ && \
100 | sudo flashrom -v ~/bottom.bin --programmer ch341a_spi -c ZZZ
101 | ```
102 |
103 | The 8M bottom chip contains the ME firmware. It is neutralized in maximized version.
104 | You can flash it specifying the same chip you found under ZZZ:
105 | ```shell
106 | sudo flashrom -p ch341a_spi -c “ZZZ” -w ~/heads/build/x86/x230-maximized/x230-maximized-bottom.rom
107 | ```
108 |
109 |
110 | If all goes well, you should see the keyboard LED flash, and within a second Heads will boot
111 | in its GUI.
112 |
113 | Two reboots are sometimes needed after flash. Force power off by holding the power button for
114 | 10 seconds. Since the memory training data was wiped by the content of the full flashed ROM,
115 | this is normal.
116 |
117 | You should then follow through with [configuring keys]({{ site.baseurl }}/Configuring-Keys/).
118 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/GPG.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: GPG Generation
4 | permalink: /GPG
5 | nav_order: 11
6 | nav_exclude: true
7 | ---
8 |
9 | Generating a new card
10 | ===
11 |
12 | ```shell
13 | diamond:~/clean/heads: gpg --card-edit --homedir ./initrd/.gnupg
14 |
15 | gpg: detected reader `Yubico Yubikey NEO OTP+CCID 00 00'
16 | Application ID ...: D2760001240102000006053147090000
17 | Version ..........: 2.0
18 | Manufacturer .....: unknown
19 | Serial number ....: 05314709
20 | Name of cardholder: [not set]
21 | Language prefs ...: [not set]
22 | Sex ..............: unspecified
23 | URL of public key : [not set]
24 | Login data .......: [not set]
25 | Signature PIN ....: forced
26 | Key attributes ...: 2048R 2048R 2048R
27 | Max. PIN lengths .: 127 127 127
28 | PIN retry counter : 3 3 3
29 | Signature counter : 0
30 | Signature key ....: [none]
31 | Encryption key....: [none]
32 | Authentication key: [none]
33 | General key info..: [none]
34 |
35 | gpg/card> admin
36 | Admin commands are allowed
37 |
38 | gpg/card> generate
39 | Make off-card backup of encryption key? (Y/n) n
40 |
41 | Please note that the factory settings of the PINs are
42 | PIN = `123456' Admin PIN = `12345678'
43 | You should change them using the command --change-pin
44 |
45 | gpg: 3 Admin PIN attempts remaining before card is permanently locked
46 |
47 | Please enter the Admin PIN
48 |
49 | Please enter the PIN
50 | Please specify how long the key should be valid.
51 | 0 = key does not expire
52 | = key expires in n days
53 | w = key expires in n weeks
54 | m = key expires in n months
55 | y = key expires in n years
56 | Key is valid for? (0) 1y
57 | Key expires at Thu 12 Apr 2018 09:36:15 AM EDT
58 | Is this correct? (y/N) y
59 |
60 | You need a user ID to identify your key; the software constructs the user ID
61 | from the Real Name, Comment and Email Address in this form:
62 | "Heinrich Heine (Der Dichter) "
63 |
64 | Real name: Heads Firmware
65 | Email address: heads@osresearch.net
66 | Comment:
67 | You selected this USER-ID:
68 | "Heads Firmware "
69 |
70 | Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
71 | gpg: generating new key
72 | gpg: please wait while key is being generated ...
73 | gpg: key generation completed (7 seconds)
74 | gpg: signatures created so far: 0
75 | gpg: generating new key
76 | gpg: please wait while key is being generated ...
77 | gpg: key generation completed (18 seconds)
78 | gpg: signatures created so far: 1
79 | gpg: signatures created so far: 2
80 | gpg: generating new key
81 | gpg: please wait while key is being generated ...
82 | gpg: key generation completed (13 seconds)
83 | gpg: signatures created so far: 3
84 | gpg: signatures created so far: 4
85 | gpg: key 9F7861CD marked as ultimately trusted
86 | public and secret key created and signed.
87 |
88 | gpg: checking the trustdb
89 | gpg: 3 marginal(s) needed, 1 complete(s) needed, classic trust model
90 | gpg: depth: 0 valid: 3 signed: 7 trust: 0-, 0q, 0n, 0m, 0f, 3u
91 | gpg: depth: 1 valid: 7 signed: 2 trust: 5-, 0q, 0n, 0m, 2f, 0u
92 | gpg: next trustdb check due at 2017-10-06
93 | pub 2048R/9F7861CD 2017-04-12 [expires: 2018-04-12]
94 | Key fingerprint = 7679 00D2 E314 B920 91C2 ED88 7E28 A403 9F78 61CD
95 | uid Heads Firmware
96 | sub 2048R/B4DB844D 2017-04-12 [expires: 2018-04-12]
97 | sub 2048R/7E276412 2017-04-12 [expires: 2018-04-12]
98 |
99 |
100 | gpg/card>
101 | diamond:~/clean/heads: gpg --change-pin
102 | gpg: detected reader `Yubico Yubikey NEO OTP+CCID 00 00'
103 | gpg: OpenPGP card no. D2760001240102000006053147090000 detected
104 |
105 | 1 - change PIN
106 | 2 - unblock PIN
107 | 3 - change Admin PIN
108 | 4 - set the Reset Code
109 | Q - quit
110 |
111 | Your selection? 3
112 | gpg: 3 Admin PIN attempts remaining before card is permanently locked
113 |
114 | Please enter the Admin PIN
115 |
116 | New Admin PIN
117 |
118 | New Admin PIN
119 | PIN changed.
120 |
121 | 1 - change PIN
122 | 2 - unblock PIN
123 | 3 - change Admin PIN
124 | 4 - set the Reset Code
125 | Q - quit
126 |
127 | Your selection? 1
128 |
129 | Please enter the PIN
130 |
131 | New PIN
132 |
133 | New PIN
134 | PIN changed.
135 |
136 | 1 - change PIN
137 | 2 - unblock PIN
138 | 3 - change Admin PIN
139 | 4 - set the Reset Code
140 | Q - quit
141 |
142 | Your selection? q
143 | ```
144 |
145 | Fully resetting a card
146 | ===
147 |
148 | If you mess up the admin pin it is necessary to do a full reset of
149 | the PGP applet. These instructions worked for me:
150 | [https://developers.yubico.com/ykneo-openpgp/ResetApplet.html](https://developers.yubico.com/ykneo-openpgp/ResetApplet.html)
151 | I had to install `scdaemon` and start `gpg-agent` to make them
152 | work, but eventually that `gpg-connect-agent -r yubikey.reset`
153 | script did the right thing:
154 |
155 | ```shell
156 | /hex
157 | scd serialno
158 | scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
159 | scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
160 | scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
161 | scd apdu 00 20 00 81 08 40 40 40 40 40 40 40 40
162 | scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
163 | scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
164 | scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
165 | scd apdu 00 20 00 83 08 40 40 40 40 40 40 40 40
166 | scd apdu 00 e6 00 00
167 | scd apdu 00 44 00 00
168 | ```
169 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/Prerequisites.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Prerequisites for Heads
4 | permalink: /Prerequisites
5 | nav_order: 1
6 | parent: Installing and configuring
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 | Prerequisites for Heads
21 | ===
22 |
23 | Required equipment
24 | ---
25 |
26 | To install Heads on a physical device, you will need:
27 |
28 | * Supported motherboard or laptop ([see below](#supported-devices))
29 | * A heads compatible USB security dongle ([see below](#usb-security-dongles-aka-security-token-aka-smartcard))
30 | * A heads compatible storage device for your public GPG key (USB flash drive)
31 |
32 | If your device requires external flashing ([see below](#supported-devices)),
33 | you will also need:
34 |
35 | * [SPI Programmer](https://trmm.net/SPI_flash): green pcb ch341a programmer or raspberry
36 | pi or bus pirate (green ch341a is recommended for new users and can be found almost
37 | [anywhere with preassembled clip as a kit](https://www.amazon.com/s?k=ch341a+programmer).
38 | * [Beware that black ch341a are known to not provide 3.3V as most NOR chips requires and should me manually fixed. If you intend to use a ch341a for initial flashing and occasional unbricking, this is perfectly fine without modification. Otherwise, you should look into other programmers or do the fix yourself. A lot of people suggest against using ch341a unless modified.](https://libreboot.org/docs/install/spi.html#do-not-use-ch341a)
39 | * Wires and a clip SOIC8 to connect your programmer of choice to the board’s
40 | SPI flash chip(s).
41 | * The [Pomona 5250](https://www.pomonaelectronics.com/products/test-clips/soic-clip-8-pin)
42 | is suggested as it is high quality and easier to make contact with the pins.
43 | * A second computer to flash from (Try to use a recommended operating system:
44 | Qubes or Debian 9 or Fedora 30)
45 |
46 | Supported devices
47 | ---
48 |
49 | **Please see the current [heads source](https://github.com/osresearch/heads/tree/master/boards) for up-to-date supported board configurations.**
50 |
51 | *Note* repeatedly untested boards from willing to test board owners were moved to [unmaintained_boards directory and aren't built by CircleCI anymore](https://github.com/linuxboot/heads/tree/master/unmaintained_boards)
52 |
53 | If *you have an external programmer* and *are techsavvy enough to bring their support back yourself*, read the [Community page](/community/) and reach out. I will gladly assist in your quest :)
54 |
55 | USB Security Dongles (aka security token aka smartcard)
56 | ---
57 |
58 | *NOTE* - Heads does **NOT** support FIDO2 or U2F authentication. Be careful when
59 | purchasing to buy a compatible key.
60 |
61 | *NOTE* - HOTP remote attestation is supported from Librem/NovaCustom/Nitropad platforms by default,
62 | Otherwise HOTP is explicitely supported by board configurations having `hotp` in their [board names](/Prerequisites#supported-devices).
63 |
64 | *NOTE* - The NitroKey 3 comes in three sizes: USB A, A-mini and C. Nk3a mini (USB A-mini) is the one most shipped with novacustom and nitropads.
65 | - ThinkPads have USB A ports, not C. After that, it's users preferences for the form factor desired.
66 |
67 | |Manufacture|Model line|TOTP|HOTP|
68 | |--|--|:--:|:--:|
69 | |Yubico|[YubiKey 5 Series](https://www.yubico.com/products/yubikey-5-overview/)|X||
70 | |Nitrokey|[Nitrokey Pro 2](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
71 | |Nitrokey|[Nitrokey Storage 2](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
72 | |Nitrokey|[Nitrokey 3](https://www.nitrokey.com/products/nitrokeys#comparison)|X|X|
73 | |Purism|[Librem Key](https://puri.sm/products/librem-key/)|X|X|
74 |
75 | Legacy vs Maximized boards
76 | ===
77 | Some history first on the historical x230-flash and x230 boards that initially created the Heads project.
78 |
79 | Heads was initially developped on the x230 board (first xx30 board supported).
80 |
81 | At that time, ME cleaning/neutering was not a thing. Then me_cleaner facilitated the task.
82 | [The X230 board, as all xx30 family boards do not have a single SPI flash, but two.
83 | On the bottom SPI flash chip lies the Intel Flash Descriptor (IFD), Intel Management Enging (ME), Intel Gigabit Configuration (GBE) and some BIOS available space spanning from 4MB chip. On the top SPI flash is the original BIOS region which spans to BIOS region on the 8MB chip.](https://doc.coreboot.org/mainboard/lenovo/Ivy_Bridge_series.html?highlight=t430#flash-layout)
84 |
85 | Original work done on Heads without ME cleaning led to the creation of a two phase flashing of the board. It required an original external flashing of the x230-flash ROM to the 4MB top chip, which permitted to boot into a minimal BIOS recovery shell from which the x230 board 12MB ROM could be internally flashed through flashrom and Linux, fitting into the 4MB SPI flash from x230-flash ROM. Booting into x230-flash launches a recovery shell which made possible to flash only the BIOS region from the x230 created ROM. This ROM image is incomplete, and flashing the whole 12MB image would create a brick. A script made available through x230-flash was taking care of only flashing the BIOS region defined under untouched IFD region, which permitted to flash the 7MB defined BIOS region inside of the IFD descriptor, without touching ME, GBE or the IFD itself.
86 |
87 | Then me_cleaner came to life, which permitted to clean ME in different ways. me_cleaner project grew mature, and eventually permitted, for xx20 and xx30 families, to not only clean ME, but neuter it. Neutering here means that not only ME was asked to deactivate itself, but most of the modules inside of it could be removed. For the xx20 family, it eventually meant that only Platform Bring UP (BUP) was required for the computer to maintain its functions, while for the xx30, BUP and ROM byPass (ROMP) are necessary. This also meant that the space used by the ME kernel and libraries being deleted could be reused for other purposes. But that space being freed could never be took for granted. Unless the IFD descriptor was modified to reduce ME region to match freed space, coreboot CBFS region maximized to match freed ME available space. Doing so permitted the BIOS region (coreboot + Heads) to jump from a 7MB available BIOS region in IFD descriptor to 11.5MB on the x230 and the whole xx30 family boards. But no board configuration permitted to take advantage of that for numerous reasons, most of which being legal matters, with blobs being non redistributable.
88 |
89 | The consequence of that is the appearance of Maximized boards the multiple xx20 and xx30 boards now lying under Heads repository, and the complexity for newcomers to build and use Heads for the first time.
90 |
91 | *In short, legacy boards will produce ROMs that are incomplete by themselves; they do not contain a valid IFD descriptor and require internal and manual flashrom program invocation with proper parameters from a script to inform flashrom to use the actual IFD defined BIOS region and flash that area only. Otherwise a non-booting system would result. A brick.*
92 |
93 | The maximized boards were created to produce fully valid and complete images for those boards. Blobs download/cleaning scripts were created for xx20 and xx30 platforms, which download ME blobs from the manufacturer, remove all the nasty bits reducing ME used space to the minimal and put resulting blob where it is needed from coreboot configuration to be integrated in the final produced ROM. A valid IFD descriptor is provided under the blob directory to match reduced ME size, giving the freed space to the BIOS region. A generated GBE blob is also provided in tree, required to have a functional e1000e ethernet interface, with an important limitation to be known from Heads users: the MAC address of maximized boards is fixed to DE:AD:C0:FF:EE. That is not so important for the majority of us connecting through wifi nowadays. But if a lot of Heads machines are living on the same LAN, or if privacy is needed through Ethernet connection, NetworkManager or other manual configuration will need to be applied to randomize/fixate Ethernet MAC address to desired value prior of connecting to a network.
94 |
95 | Legacy boards advocates that unlocking IFD regions and ME could permit ME to be modified. While it is true, the non-removable parts of ME (BUP and/or ROMP) are signed together and verified per ME coproocessor prior of permitting the platform to boot. Consequently, removing the nasty parts of ME and providing an unlocked IFD and baked GBE was the chosen path for *Maximized* boards. It is still possible for advanced users to decide to relock the IFD regions prior of flashing maximized boards, while this path would be manual and complexify future internal upgrades. Actually provided Maximized boards take into consideration that the whole SPI flash chip is internally flashable, which would result in flashrom complaining on next internal upgrades. It is still also possible for advanced users to override Heads internally kept configuration to replace the *FLASHROM_OPTIONS* statement to specify manually the IFD defined specific sections to flash : `--ifd --image bios --image ME` etc
96 |
97 | Current Legacy boards
98 | ---
99 | xx30-flash: 4MB ROM images to be flashed internally through 1vyrain or Skulls. Unlocking IFD and cleaning/neutering ME still highly recommended prior of doing initial flash. 1vyrain deactivates ME internally. But if one leaves 1vyrain and chooses another ROM, 1vyrain applied hacks to deactivate ME will not be applied anymore. Note that Skulls permits to unlock IFD as an option prior of initial flash. So if it was not applied at that step, then the end user can only upgrade to Legacy boards produced ROMs in the future, the IFD and ME not being flashable internally and requiring an external flash to go with Maximized boards.
100 |
101 | xx30: Baked 12MB ROM images to be flashed internally through xxxx-flash flashed ROMs. Those ROMs can only be internally flashed from/to legacy boards configuration. Flashing a legacy ROM from a Maximized ROM will result in a brick, since Maximized boards produced ROMs will flash the whole combined opaque 12MB ROM internally, overwriting IFD, ME and GBE with empty content. Resulting into a brick.
102 |
103 | xx20: Those ports (t420 and x220 at time of writing) landed on Heads later in time and were historically produced by making required blobs available by applying scripts on SPI backups to extract required blobs. Consequently, those boards do not suffer from feature reduction as of now; they always took for granted that ME was neutered and IFD was unlocked. They still only flash internally the BIOS region, which was maximized to take advantage of 7.5MB available SPI space for BIOS region, while not reflashing the whole SPI.
104 |
105 | xxxx-hotp-verification: Legacy, reduced versions of their HOTP maximized counterpart. At the time of writing this, those board configuration will normally loose dropbear support, while xx30 versions will not have FBWhiptail anymore. That means that there is no framebuffer enforced graphical interface under Heads with background color cues notifying the end user of warning (yellow) or errors (red) contextual, graphical menus.
106 |
107 | Current Maximized boards
108 | ---
109 | xx30-maximized: Those board configuration produce 3 ROM images: One full 12MB image containing reduced ME, maximized IFD BIOS region and GBE to be flashed internally, and two splitted out ROM images from the full image named bottom (8MB) and top images (4MB), aimed to be externally flashed to their physical SPI counterparts
110 | If built locally, the builder has the option of extracting blobs from a backup image which will put GBE, ME and IFD binaries at the right location in the blobs directory which will be included into coreboot created full ROM image, including Heads payload. There is a risk that ME will be bigger/smaller since backuped blobs might be of sifferent size. In the case ME is bigger then expected, there is a chance that the flashed system will result in a brick. This is why [Cleaning ME instructions in this website](/Clean-the-ME-firmware/) strongly advises into upgrading to Lenovo 2.76 version of the firmware prior of backuping the bottom SPI ROM, unlocking IFD and clean that specific version of proprietary firmware. This is also why it is suggested to only backup your GBE to keep your MAC address for Ethernet and use the download script under blobs/xx30 to download and neuter verified version of Lenovo ME downloaded straight from their website. Those do not enforce HOTP firmware verification (see hotp-maximized counterparts) against supported USB Security dongles and rely solely on TOTP to manually verify firmware integrity prior of each boot, that is: launching OTP application on smartphone to manually verify that the TOTP codes generated on both screens of smartphone and laptop matches from smartphone generated and scanned Qr code after first boot of Heads new firmware.
111 |
112 | xxxx-hotp-maximized: Those board configurations are the same as prior maximized board configuration, but produce ROM images enforcing TOTP+HOTP for firmware verification on supported, already bought and received prior of flashing USB Security dongles to be bounded with Heads.
113 |
114 | Legacy to Maximized boards upgrade path
115 | ---
116 | It is possible to upgrade from Legacy to Maximized boards under certain conditions.
117 |
118 | *If you come from 1vyrain, this is impossible*. 1vyrain does not unlock neither IFD nor ME regions of the SPI. Consequently, flashing internally anything else then Legacy boards produced ROMs will result in a brick.
119 |
120 | If coming from Skulls, *if and only optional unlocking step has been followed*, you can upgrade internally through a manual flashrom call, just like if you were coming from Heads Legacy boards while having followed the me_cleaning page instructions prior of initial flash.
121 |
122 | If coming from Skulls or Heads Legacy board configurations while having unlocked IFD initially, you can flash from the recovery shell manually.
123 | [**IF UNSURE, PLEASE VERIFY FIRST**](/Updating#verify-upgradeability-paths-of-the-firmware)
124 |
125 | Having a full xxxx-hotp-maximized or xxxx-maximized board config produced ROM available on a USB stick, alongside with your USB Security dongle's matching exported public key, do the following:
126 | ```
127 | mount-usb
128 | flashrom -p internal -w /media/PathToMaximizedRom.rom
129 | ```
130 | On next reboot, Heads will guide you into factory resetting your USB Security dongle or import your previously generated public key matching your USB Security dongle's private key.
131 |
132 | It will then regenerate a TOTP/HOTP secret and sign /boot content. You will then have to define a new default boot and optionally renew/change your Disk Unlock Key to be released to to OS to unlock your encrypted OS installation to move forward.
133 |
134 | In the case nothing is found installed on your disk, Heads will propose you to boot from USB to install a new Operating System, prior of being able to do the above steps prior of booting into your system.
135 |
136 | Emulated devices
137 | ===
138 |
139 | For further information, see [Emulating Heads](/Emulating-Heads/)
140 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/RecoveryShell.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Heads Recovery Shell
4 | permalink: /RecoveryShell/
5 | nav_order: 90
6 | has_children: false
7 | has_toc: false
8 | parent: Installing and configuring
9 | ---
10 |
11 | Heads Recovery Shell
12 | ====
13 |
14 | The recovery shell is a command line environment where heads and *nix utilities may be accessed (see [modules](https://github.com/osresearch/heads/tree/master/modules)) This document is a work in progress.
15 |
16 | Overview
17 | ---
18 |
19 | The recovery shell is running a Linux kernel and shell based on busybox. The environment comes from the initrd image flashed into the BIOS with the Linux kernel. i.e. Heads
20 |
21 | The shell can be used to troubleshoot Heads. The security dongle paired with Heads may be needed to effectively use this environment.
22 |
23 |
24 | Access
25 | ----
26 |
27 | The recovery shell may be accessed using two different methods.
28 |
29 | 1. at power-on repeatedly press 'r' before the GUI loads
30 | 2. select the recovery shell menu in the Heads GUI
31 |
32 | These two different methods of access will result in some different settings.
33 |
34 |
35 | Limitations
36 | ----
37 |
38 | The recovery shell wipes secrets--normally used for security checks--that were [computed](/Keys/#tpm-pcrs) from the BIOS, kernel modules loaded, etc. This will limit sealing/unsealing functions (Disk Unlock Key creation, TOTP/HOTP sealing) from the recovery shell environment. To seal/unseal secrets, the same measurements needs to be calculated, which would be different depending of the kernel modules loaded and if going in/out of the recovery shell, which invalidates per design the TPM measurements to not release secrets.
39 |
40 | To seal/unseal secrets, use the GUI environment.
41 |
42 |
43 | Boot Process
44 | ----
45 |
46 | To troubleshoot you should understand the processes used to configure and boot Heads after flashing it into the BIOS.
47 |
48 | ### configuration
49 |
50 | * First Boot Checks
51 | * set default boot and flash BIOS (again)
52 | * Reset the TPM
53 | * sign files in /boot
54 | * reset htop/totp
55 |
56 | ### boot
57 |
58 | * mount default boot
59 | * check signatures
60 | * check hotp
61 | * menus and user interaction
62 | * boot kernel
63 |
64 |
65 | Troubleshoot the boot process
66 | ----
67 |
68 | ### manual boot
69 |
70 | If you want or need to manually boot a Linux system you must specify a kernel, initrd, and root file system. Use the kexec-boot utility. In this example 'foo' is a description that normally comes from other parts of Heads configurations. It can be anything. The root filesystem must be the correct one used in the target Linux installation.
71 |
72 | This example may work for you by changing only the root= setting. Normally, there are symlinks in the boot partition using these file names. Of course you need to adjust if your target system uses a different convention for specifying these files.
73 |
74 | kexec-boot -b /boot -e ‘foo|elf|kernel /vmlinuz|initrd /initrd.img|append root=/dev/whatever’
75 |
76 |
77 | ### sign files
78 |
79 | Content in /boot is hashed and recorded in a file. The hashes are signed using the security dongle paired with Heads. These hashes are verified on boot using the public key corresponding to the security dongle.
80 |
81 | mount /dev/sdaX /boot
82 | kexec-sign-config -p /boot
83 |
84 | ### hotp and totp
85 |
86 | Will not work in recovery shell due to missing secrets. See [Limitations](#limitations).
87 |
88 |
89 | Upgrading Heads
90 | ----
91 |
92 | The Heads [upgrade process](/Updating) may be performed from the recovery shell.
--------------------------------------------------------------------------------
/Installing-and-Configuring/Upgrading.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Upgrading Heads
4 | permalink: /Updating
5 | nav_order: 99
6 | parent: Installing and configuring
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 |
21 | 
22 |
23 |
24 | Upgrading Heads
25 | ===
26 |
27 | The first time you install Heads, you'll need [some SPI programmer]({{ site.baseurl }}/Prerequisites#required-equipment)
28 | to replace the existing vendor firmware. This process involves **initial external flashing** using `.rom` files.
29 |
30 | For subsequent upgrades, you can use the Heads GUI to perform **internal upgrading** using `.zip` files. This method is supported for firmware versions built after [this November 2023 commit](https://github.com/linuxboot/heads/commit/6873df60c1c965ac812a49d9d245f338d8a3b128).
31 |
32 | ---
33 |
34 | Global Warning: No Hardware Programmer? Be Cautious!
35 | ---
36 | Heads is a rolling release. If you do not have an external programmer to recover from potential issues, exercise caution when upgrading. Follow these guidelines:
37 |
38 | 1. **Wait Before Upgrading**:
39 | - Wait a day or two after a new commit is merged, especially if it involves coreboot or kernel updates. This allows time for potential regressions to be identified and resolved.
40 |
41 | 2. **Check Reported Issues**:
42 | - Review the [most recently reported issues](https://github.com/linuxboot/heads/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) to ensure no critical problems have been reported for your platform.
43 |
44 | 3. **Verify Community Testing**:
45 | - Confirm that other users with the same platform have successfully tested the changes. Heads relies on community testing to validate updates across supported devices.
46 |
47 | 4. **Understand the Risks**:
48 | - Major updates, such as coreboot or kernel version bumps, require extensive testing. Untested platforms may experience regressions or even bricking.
49 |
50 | 5. **Pay Attention to Board Labels**:
51 | - Boards labeled as `UNTESTED` or `UNMAINTAINED` in their names indicate limited or no support. These labels mean exactly what they state:
52 | - **UNTESTED**: The board has not been tested and may not function as expected.
53 | - **UNMAINTAINED**: The board is no longer actively supported or maintained.
54 | - For additional details, refer to the [UNTESTED and UNMAINTAINED boards documentation](https://github.com/linuxboot/heads/blob/master/unmaintained_boards/README.md).
55 |
56 | By following these precautions, you can minimize the risk of encountering issues during an upgrade. If in doubt, wait for additional feedback from the community or consider using an external programmer for recovery.
57 |
58 | ---
59 |
60 | Initial External Flashing
61 | ---
62 | If you are installing Heads for the first time, you will need to perform an external flash using `.rom` files. Refer to the [Downloading documentation]({{ site.baseurl }}/Downloading) for detailed instructions on:
63 | - Downloading `.rom` files and `hashes.txt`.
64 | - Verifying file integrity.
65 | - Preparing for external flashing.
66 |
67 | **Note**: This process is only required for the initial installation of Heads.
68 |
69 | ---
70 |
71 | Internal Upgrading Using ZIP Files
72 | ---
73 | If Heads is already installed on your device, you can upgrade the firmware internally using a `.zip` file. This method is simpler and does not require an external programmer.
74 |
75 | 1. **Prepare the ZIP File**:
76 | - Download the `.zip` file for your board from the CircleCI "Artifacts" tab (refer to the [Downloading documentation]({{ site.baseurl }}/Downloading)).
77 |
78 | 2. **Transfer to Target System**:
79 | - Save the `.zip` file to a USB drive and insert it into the target system.
80 |
81 | 3. **Upgrade via Heads GUI**:
82 | - Boot into the Heads GUI.
83 | - Navigate to `Options -> Flash/Update BIOS`.
84 | - Select the `.zip` file from the USB drive. The system will automatically verify the ROM integrity and flash the firmware.
85 |
86 | **Note**: Internal upgrading via `.zip` files is supported for firmware versions built after [this November 2023 commit](https://github.com/linuxboot/heads/commit/6873df60c1c965ac812a49d9d245f338d8a3b128).
87 |
88 | ---
89 |
90 | Caution for Rolling Releases
91 | ---
92 | Heads is a rolling release. If you do not have an external programmer, wait a few days after a new commit before upgrading to ensure no regressions are reported. Check the [most recently reported issues](https://github.com/linuxboot/heads/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) and confirm that other users have tested the changes on your platform.
93 |
94 | ---
95 |
96 | Reflashing the Same Firmware
97 | ---
98 | If you need to validate the current firmware integrity against the last flashed firmware image stored on a USB thumb drive, follow these steps to back up the current ROM and ensure no changes occur during the process:
99 |
100 | 1. **Back Up the Current ROM**:
101 | - Insert a USB thumb drive and mount it in read-write mode:
102 | ```shell
103 | mount-usb --mode rw
104 | ```
105 | - Back up the current ROM to the USB drive:
106 | ```shell
107 | ${CONFIG_FLASH_OPTIONS} -r /media/backup.rom
108 | ```
109 | - Remount the USB drive in read-only mode for safety:
110 | ```shell
111 | mount -o remount,ro /media
112 | ```
113 |
114 | 2. **Reflash the Same Firmware**:
115 | - Use the Heads Flashing GUI (for zip file downloaded) or the following command to reflash the same firmware image from Heads Recovery shell:
116 | ```shell
117 | ${CONFIG_FLASH_OPTIONS} -w /media/same_rom_image_previously_flashed.rom
118 | ```
119 | - The process should report **no changes** to the SPI flash.
120 |
121 | **Note on `CONFIG_FLASH_OPTIONS`**:
122 | - The `CONFIG_FLASH_OPTIONS` variable specifies the board-specific flash options to ensure proper handling of SPI regions during flashing. These options are defined in the board's configuration file.
123 | - Boards may specify different SPI regions to flash. For example:
124 | - The `novacustom-v540tu` board preserves the `GBE` (Gigabit Ethernet) region, ensuring the manufacturing MAC address remains intact.
125 | - The `x230-hotp-maximized` board overwrites the entire SPI flash, including the `GBE` region, replacing it with a generic configuration.
126 | - To inspect the flash options for your board, use the `env` command in the recovery shell:
127 | ```shell
128 | env
129 | ```
130 | This will display all environment variables, including `CONFIG_FLASH_OPTIONS`, as defined for your board.
131 |
132 | **Tip**: Advanced users can review the board-specific configuration files under the Heads repository (`boards//.config`) to understand what their board's flash options entail.
133 |
134 | ---
135 |
136 | Migrating from Legacy to Maximized Firmware
137 | ---
138 | **Warning**: Migration from Legacy to Maximized builds is now considered a legacy process. Legacy builds were officially deprecated in [October 2024](https://github.com/linuxboot/heads/pull/1803), while Maximized builds have been promoted since [December 2020](https://github.com/linuxboot/heads/pull/703). Use maximum caution when upgrading internally to Maximized builds, as improper steps may result in a bricked device.
139 |
140 | ### How to Identify Legacy vs Maximized Builds
141 | To determine whether you are using a Legacy or Maximized build:
142 | 1. Boot into the Heads main menu.
143 | 2. Check the main screen title:
144 | - If the build is **Maximized**, the label will explicitly include the word "Maximized."
145 | - Example: `x230-hotp-maximized`
146 | - If the label does not include "Maximized," you are using a Legacy build.
147 | - Example: `x220-legacy`, `x220`, `t430`, `x230-hotp` (no "Maximized" in the board name).
148 |
149 | For migration instructions, refer to the [Downloading documentation]({{ site.baseurl }}/Downloading) and ensure you follow both the upgradability validation and integrity validation steps before flashing.
150 |
151 | **Important Note for Nitrokey Customers**:
152 | If you are using a NitroPad X230 or T430 with firmware version **1.2 or earlier**, you should contact [Nitrokey support](https://support.nitrokey.com/) to get their flashing service. For more details, refer to this [Nitrokey support thread](https://support.nitrokey.com/t/nitropad-t430-firmware-update-brick/3777/2).
153 |
154 | ---
155 |
156 | Re-Owning the States
157 | ===
158 | After upgrading or migrating, follow these steps to re-own the security components:
159 | - Inject your public key or perform a Factory Reset/Re-Ownership.
160 | - Generate new TOTP/HOTP tokens and reset the TPM if necessary.
161 | - Sign `/boot` content and set a new boot default.
162 |
163 | For more details on re-owning, refer to the relevant sections above.
164 |
165 | ---
166 |
167 | Verify Upgradeability Paths of the Firmware
168 | ====
169 | First, verify the [supported platforms]({{ site.baseurl }}/Prerequisites#supported-devices).
170 | If you have a *ThinkPad (xx30/xx20 flavors), proceed with caution.*
171 | *Also select the HOTP variant if you own a [Heads-supported USB Security dongle]({{ site.baseurl }}/Prerequisites#usb-security-dongles-aka-security-token-aka-smartcard) for visual remote attestation.*
172 |
173 | Review whether the Intel Firmware Descriptor (IFD) and Intel Management Engine (ME) were unlocked from the [Recovery Shell]({{ site.baseurl }}/RecoveryShell) before proceeding.
174 |
175 | ```shell
176 | flashrom -p internal
177 | ```
178 |
179 | The two following situations must apply, which will define what to do next.
180 |
181 | Unlocked IFD and ME
182 | ----
183 | This is the expected output if the initial external flashing of the firmware unlocked IFD and ME regions:
184 | 
185 | - This means you can internally migrate from Legacy boards (xxxx-hotp/xxxx boards ROM) to their Maximized boards counterpart (xxx-hotp-maximized/xxxx-maximized boards ROM).
186 | - If you are presently on a Legacy board (If Heads boot screen is not showing Maximized):
187 | - You will have to manually call flashrom from the Recovery Console:
188 | - `mount-usb`
189 | - `flashrom -p internal -w /media/heads-hotp-maximized-version-gcommit.rom`
190 | - 
191 | - If you are already running a Maximized board ROM, you can safely upgrade through Heads GUI keeping your current settings.
192 |
193 | Locked IFD and ME
194 | ----
195 | Otherwise, initial external flashing of the firmware didn't unlock the IFD/ME regions:
196 | 
197 | - This means you will have to:
198 | - Externally reflash Maximized board ROM
199 | - xx30: xx30-*maximized-top.rom(4Mb) and xx30-*maximized-bottom.rom(8Mb) ROMs
200 | - xx20: xx20-*-maximized.rom (8Mb ROM)
201 |
202 | Legacy board variants were [officially deprecated in October 2024 per this PR](https://github.com/linuxboot/heads/pull/1803).
203 |
204 | ---
205 |
206 | Notes:
207 | - Since commit [6873df60](https://github.com/linuxboot/heads/commit/6873df60c1c965ac812a49d9d245f338d8a3b128): Users with this or newer firmware can upgrade with `.zip` files. These automatically verify ROM integrity and flash the contained firmware if valid.
208 | - Since commit [133da0e4](https://github.com/linuxboot/heads/commit/133da0e48e2996674f60f186c520cfad0d4848d0): Users with a TPM Disk Unlock Key (DUK) defined previously will be guided to reseal a new passphrase when resealing TOTP/HOTP automatically.
209 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/configuring-keys.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Step 3 - Configuring-Keys
4 | permalink: /Configuring-Keys/
5 | nav_order: 7
6 | parent: Installing and configuring
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 | ## No OS installed
21 |
22 | If starting with a blank hard drive, Heads will detect it and propose to boot
23 | from USB alongside other options:
24 | 
25 |
26 | You can also set a different boot device, or go into Recovery shell and
27 | partition with `fdisk`.
28 |
29 | Installing an OS by booting from USB is probably the best option. Note here
30 | again that for OSes that provide detached signatures (iso.asc or iso.sig)
31 | alongside their ISO download option, this is the preferred Heads installation
32 | method, since Heads can validate both integrity and authenticity against
33 | distribution public key, fused (and measured) in the firmware.
34 |
35 | If there are other OSes providing detached signatures alongside their ISOs,
36 | please open an issue so we can add it.
37 |
38 | ### No public key found in ROM
39 | 
40 |
41 | You can either add a backuped gpg public key matching an already provisioned
42 | USB Security dongle (see below on adding public key) or generate the keys,
43 | alongside setting all security components in one go with the `OEM Factory
44 | Reset/Re-Ownership` option.
45 |
46 | #### OEM Factory Reset/Re-Ownership
47 | Once you have installed the OS, you will need to take ownership of the
48 | different security components under Heads. The easiest way is through `OEM
49 | Factory Reset/Re-Ownership` option.
50 |
51 | The wizard will prompt you to use default configuration options.
52 | **It is strongly advised to refuse the defaults, and answer the questionnaire thoroughtly.
53 | This only happens once, and will permit you to reencrypt encrypted containers and provision
54 | properly to your use case the different security components of your system before use.**
55 |
56 | **Note that the passphrases you will type will be echoed back to you. You need
57 | to accomplish this step in a safe environment**
58 |
59 | **_EFF Diceware passphrases are recommended_**
60 | You can generate those on a separate device from the following recommended
61 | sites:
62 | - [https://www.rempe.us/diceware/#eff](https://www.rempe.us/diceware/#eff)
63 | Explains why those are important as opposed to passwords
64 | - [https://diceware.dmuth.org/](https://diceware.dmuth.org/) Explains as well
65 | - [https://romeljacinto.github.io/diceware/](https://romeljacinto.github.io/diceware/)
66 | Minimalist, first letter capitalizer, customizes word separator.
67 |
68 | The Secrets involved under Heads are the following (and their recommended
69 | lengths):
70 |
71 | - Disk Recovery Key passphrase (6 words. _Do not forget this one_)
72 | - This passphrase is required to setup a TPM Disk Unlock Key passphrase.
73 | - This passphrase is required to access encrypted data from any computer
74 | - This passphrase is required to "unsafe boot", where the installed OS will
75 | prompt for it.
76 | - TPM Ownership passphrase (2 words.)
77 | - Used to set ownership on the TPM.
78 | - GPG Admin PIN (2 words. _Locks Admin out after 3 bad attempts in a row. DO
79 | NOT FORGET_)
80 | - This passphrase is requested to do management tasks on the USB Security
81 | dongle
82 | - Under Heads, it is to seal measurements under HOTP
83 | - It will be needed in case the GPG User PIN was locked
84 | - GPG User PIN (2 words. _Locks user out after 3 bad attempts in a row. DO NOT
85 | FORGET_)
86 | - Used to sign/encrypt content
87 | - Used to do anything linked to user interaction with the USB Security
88 | dongle.
89 | - GPG prompts for this passphrase when signing hashes under Heads
90 | - TPM Disk Unlock Key passphrase (3 words, asked to boot default boot option)
91 | - Requires GPG User PIN and Disk Recovery Key passphrase to setup
92 |
93 | ##### Process
94 | This will go first briefly over a survey, asking you if you want to:
95 |
96 | - Re-encrypt the LUKS encrypted container (Say yes here if you didn't install
97 | the OS yourself)
98 | - As explained on screen, anyone having a LUKS header backup could restore it
99 | and decrypt with past corresponding passphrase. Changing passphrase without
100 | reencrypting doesn't change the encryption key.
101 | - Change the Disk Recovery Key passphrase (Say yes here if you didn't install
102 | the OS yourself)
103 | - You should have also said yes above.
104 | - Define a single shared passphrase across all security components (not
105 | recommended)
106 | - This option is used by some OEMs to provision initial secrets. Passphrases
107 | should be different
108 | - Define individual passphrases for each security components (recommended: y)
109 | - This is the preferred option
110 | - Set custom under information for the GnuPG key (recommended: y)
111 | - If you desire to use the USB Security dongle to encrypt/sign content linked
112 | to a public identity that identity needs to be provisioned in a way that it
113 | will be searchable if you ever decide to upload the resulting public key to
114 | gpg key search engines.
115 |
116 | Note that the Comment section is used to differentiate the resulting public
117 | key from other public keys that would be linked with the same Real Name and
118 | E-Mail address, and should be distinguishable from the Comment. A good
119 | Comment example is: "USB Security dongle".
120 |
121 | The process then enforces user's selected choices.
122 |
123 | At the end, the wizard outputs on screen the `Provisioned Security Components
124 | Secrets` This is the last chance you have to note provisioned secrets correctly
125 | until you know them by heart. That piece of paper's content is precious, and
126 | should be safeguarded accordingly.
127 |
128 | At the end, the wizard outputs on screen the `Provisioned Security Components
129 | Secrets` This is the last chance you have to note provisioned secrets correctly
130 | until you know them by heart. A Qr code containing the same information is also
131 | provided: please scan it.
132 |
133 | #### Adding your PGP key
134 |
135 | If you already have a provisioned USB Security dongle and its associated public
136 | key, then follow these steps to inject the public key into Heads. Otherwise,
137 | you should probably follow `OEM Factory Reset/Re-Ownership` above.
138 |
139 | 
140 |
141 | Heads uses your own GPG key to sign updates and as a result it needs the key
142 | stored in the ROM image before flashing the full Heads ROM.
143 |
144 | Ensure your USB security dongle and the USB drive with your key are still
145 | inserted. Select "Add a GPG key to the running BIOS" to enter the GPG
146 | Management menu, then "Add a GPG key to the running BIOS + reflash". Follow the
147 | steps and your GPG key will be added to the Heads rom.
148 |
149 | Once `flashrom` is complete, reboot and now you should now be back in the Heads
150 | runtime. It should display a message that it is unable to unseal TOTP.
151 |
152 | ## Configuring the TPM
153 | google authenticator or [FreeOTP+](https://f-droid.org/en/packages/org.liberty.android.freeotpplus/)
154 | application and use to validate that the firmware (bootblock, ram/rom stages,
155 | Linux payload and user config injected files are un-altered.
156 |
157 | If you have the HOTP version of the firmware, this is also where Heads will ask
158 | you for your GPG Admin PIN to seal the secret inside of a HOTP compatible USB
159 | Security dongle.
160 |
161 | On the next boot, the current TOTP will be computed and you can compare this
162 | one-time-password against the value that your phone generates.
163 |
164 | TPM Disk Encryption Key (TPM Disk Unlock Key)
165 | ---
166 |
167 | The LUKS Disk Recovery Key stored under LUKS header at OS install is derived
168 | from its user passphrase, which is expanded via the LUKS expansion algorithm to
169 | increase the time needed to brute force it. For extra protection it is possible
170 | to store an additional LUKS key in the TPM so that it will only be released to
171 | unlock the LUKS container if the PCRs match (firmware measurements, kernel
172 | modules loaded, no recovery shell access) from Heads when selecting a boot
173 | option.
174 |
175 | If you want to use the TPM to seal a secret used to unlock your LUKS volumes:
176 | Go to boot options, show OS boot options and select a new default boot option:
177 | 
178 |
179 | Select make default:
180 | 
181 |
182 | Answer the prompts properly:
183 | 
184 |
185 | This will prompt you for your Disk Recovery Key passphrase, a new TPM Disk
186 | unlock passphrase and confirm and finally ask you to enter your GPG User PIN to
187 | sign the new default boot option before rebooting.
188 |
189 | Reboot and you will be prompted for your boot password when that device is used
190 | to boot in the future:
191 | 
192 | 
193 |
194 | The key file cannot persist on disk anywhere, since it would allow an adversary
195 | to decrypt the drive. Instead it is necessary to unseal/decrypt the key from
196 | the TPM and then bundle the key file into a RAM copy of Qubes' dom0 initrd on
197 | each boot. The initramfs format allows concatenated cpio files, so it is easy
198 | for the Heads firmware to inject files into the Qubes startup script.
199 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Installing and configuring
4 | permalink: /Install-and-Configure
5 | nav_order: 40
6 | has_children: yes
7 | has_toc: false
8 | ---
9 |
10 |
11 | Installing and configuring Heads
12 | ===
13 |
14 |
15 | Prerequisites
16 | ----
17 |
18 | Heads is supported on a limited set of hardware (laptop and security dongle). First, check the [Prerequisites](/Prerequisites) page for details.
19 |
20 |
21 | Downloading
22 | ----
23 | You can [download ROMs](/Downloading) directly from CircleCI for most of the boards configurations supported.
24 |
25 | Building
26 | ----
27 |
28 | If you are [building heads](/Building) check the build guides. See below if you are using heads releases from this project.
29 |
30 |
31 | Flashing Guides
32 | ----
33 |
34 | The steps for [Flashing-Guides](/Flashing-guides) on your system may vary based on the hardware in use.
35 |
36 |
37 | Secrets and Security
38 | ----
39 |
40 | There are many secret pins, passphrases, and keys used in heads. These are described in [Configuring Keys](/Configuring-Keys/).
41 |
42 |
43 | Operating Systems
44 | ----
45 |
46 | We assume you want to run something other than heads on your system. The installation procedure could vary greatly depending on which distro you choose, which version of that distro, and if you are encrypting various partitions. See [Operating System](/InstallingOS/) for help.
47 |
48 |
49 | Recovery Shell
50 | ----
51 |
52 | There is a [Recovery Shell](/RecoveryShell/) built into the heads environment which may be used for troubleshooting.
53 |
--------------------------------------------------------------------------------
/Installing-and-Configuring/install-os.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Step 4 - Installing Qubes and other OSes
4 | permalink: /InstallingOS/
5 | nav_order: 8
6 | parent: Installing and configuring
7 | ---
8 |
9 |
10 |
11 |
12 | Table of contents
13 |
14 | {: .text-delta }
15 | 1. TOC
16 | {:toc}
17 |
18 |
19 |
20 | Generic OS Installation
21 | ===
22 |
23 | Insert OS installation media into one of the USB3 ports (blue on Thinkpads).
24 | [For certain OSes](https://github.com/osresearch/heads/tree/master/initrd/etc/distro/keys),
25 | Heads boot process supports standard OS ISO bootable media (where the USB drive
26 | contains the ISO installation media alongside of its detached signature). For
27 | other OS, you will need to create USB installation media with using `dd` or
28 | `unetbootin` etc.).
29 |
30 | For supported OSes, on a EXT3/EXT4/ExFat formatted partition on USB drive, you
31 | can put the ISO image along with a trusted detached signature in the root
32 | directory:
33 | ```shell
34 | /Qubes-R4.0-x86_64.iso
35 | /Qubes-R4.0-x86_64.iso.asc
36 | /tails-amd64-3.7.iso
37 | /tails-amd64-3.7.iso.sig
38 | ```
39 |
40 | - Some distros will require additional options to boot directly from ISO. See
41 | [Boot config files](/BootOptions) for more information.
42 | - Boot from USB by Boot menu options, or by calling `usb-scan` from the recovery
43 | shell.
44 | - Select the install boot option for your distro of choice and work through
45 | the standard OS installation procedures (including setting up LUKS disk
46 | encryption if desired)
47 | - Reboot and your new boot option should be available through boot options: show
48 | boot options.
49 |
50 | Each ISO file is verified for integrity and authenticity before booting so that
51 | you can be sure Live distros and installation media are not tampered with or
52 | corrupted, so this route is preferred when available. You can also sign the ISO
53 | with your own key **from Heads Recovery Shell menu option (Options-> Exit to
54 | recovery shell)** :
55 |
56 | ```shell
57 | mount-usb --mode rw #Loads USB controller kernel modules, scan for partitions,
58 | ask which one to mount under /media
59 | cd /media # Change directory to /media to do the detach-sign operation
60 | gpg --detach-sign # You can use TAB keyboard's key for autocompletion
61 | of file names here. This requires a provisioned USB security dongle: Factory
62 | Reset/Re-Ownership
63 | reboot # Will remount everything in Read Only and sync changes to block devices
64 | automatically.
65 | ```
66 | Then boot from detached signed ISO after having rebooted your machine. To do so,
67 | from main menu, select: Options-> Boot Options-> USB boot Select your ISO from
68 | list, see detached signature validation succeeding, then select GRUB parsed
69 | options with label and main boot parameters from the options provided to you.
70 |
71 | Compatibility
72 | ===
73 |
74 | Heads requires unencrypted `/boot`. Graphical OSes generally have the best
75 | support. Debian live installers, Fedora Workstation (or spins), Qubes, and
76 | PureOS all work well.
77 |
78 | * *For Debian*:
79 | 1. Use a live desktop image. The network installer image does not work on all
80 | systems.
81 | 2. Ensure `/boot` is unencrypted. Debian 11 defaults to a single encrypted
82 | partition, so you must partition manually. This may not apply to all Debian
83 | derivatives.
84 | * Create one 1G ext4 partition mounted at `/boot`
85 | * Create a LUKS container with one ext4 partition mounted at `/`.
86 | * For swap, you can create a swapfile later on the encrypted root, or create
87 | a swap partition.
88 | * *For Fedora*: The default partitioning works, but `/` is btrfs by default,
89 | which Heads' recovery console does not support. Use ext4 instead for recovery
90 | console support.
91 | * *For Qubes*: Be sure to disconnect USB tokens during configuration on first
92 | boot. Otherwise, the Qubes installer may prevent the creation of a sys-usb
93 | qube if they are detected as keyboards (HID devices). If you are using a USB
94 | keyboard, follow the [Qubes instructions for USB keyboards](https://www.qubes-os.org/doc/usb-qubes/#usb-keyboards).
95 | * *For PureOS*: The default installation works.
96 |
97 | Default Boot and Disk Unlock
98 | ===
99 |
100 | If you want to set a default option so that you don't have to choose at every
101 | boot, you can do so from the menu by selecting 'd' on the confirmation screen.
102 | You will also be able to seal your Disk Unlock Key into the TPM, which would be
103 | unsealed only when provided with the good TPM Disk Unlock Key passphrase and
104 | when firmware measurement and LUKS header are the same as when the Disk Unlock
105 | Key was sealed when booting from detached signed default boot option selection.
106 |
107 | This should work for Qubes OS, Fedora, Debian (and derivatives).
108 |
109 | Installing Qubes 4.X
110 | ===
111 | Qubes OS and Tails can boot directly from ISO when provided with accompanying
112 | detached signatures (iso.asc or iso.sig), thanks to distribution signing keys
113 | being provided under Heads, permitting to validate both integrity and
114 | authenticity of the ISOs prior of booting into them.
115 |
116 | Plug in the EXT3/EXT4/ExFat formatted USB stick containing Qubes iso and iso.asc
117 | files into one of the USB port and boot it from USB mode:
118 |
119 | 
120 | 
121 | 
122 | 
123 | 
124 | 
125 |
126 | If that completes with no errors it will launch the Xen hypervisor, kernel and
127 | initrd provided from ISO and start the Qubes installer:
128 | 
129 | 
130 |
131 | Use default QubesOS partitioning scheme for QubesOS 4.x:
132 | 
133 | 
134 |
135 |
136 | The Disk Recovery Key that you enter here will be used as the
137 | "recovery password" later. It should be a long value since you won't
138 | have to enter it very often; only when upgrading the Heads firmware,
139 | when setting a new boot default and desiring to change TPM released disk encryption
140 | key (Disk Unlock Key), or if there is a need to recover the disk on an external machine.
141 | 
142 | 
143 | 
144 | 
145 | 
146 | 
147 | 
148 | 
149 | 
150 | 
151 | 
152 | First stage install is finished.
153 |
154 | Disconnect your USB Security dongle (and any external keyboard/mouses) prior of going further. Otherwise Qubes might detect those as USB Keyboards (HID devices) and will prevent sys-usb from being created properly:
155 | 
156 | 
157 | 
158 | 
159 | 
160 | 
161 | 
162 | 
163 | 
164 |
165 | You should now have Qubes 4.1 installed!
166 |
167 |
168 | Taking ownership of the states
169 | ===
170 |
171 |
172 | Taking ownership of the TPM
173 | ====
174 | Heads keeps TPM and HOTP rollback counters under /boot. Since we just installed, those doesn't exist and we need to create them.
175 | First things first, we need to acknowledge current firmware state for the newly installed OS.
176 |
177 | 
178 | 
179 | 
180 | 
181 | 
182 | That's it. You now have TOTP scanned over your preferred TOTP smartphone app, or have entered manually the challenge secret under your favorite external TOTP app on another computer because you do not own a smartphone.
183 |
184 | Signing /boot content
185 | ====
186 |
187 | Now that firmware state is sealed under TPM and remotely attested through TOTP/HOTP, now is the time to sign /boot content until your next dom0 upgrade, which will most probably update Xen, initrd and kernel binaries, as well as grub configuration. This will be prompted automatically when selecting default boot option, since we have no digests nor detached signature of /boot content as of now.
188 |
189 | This can be done at any given time through:
190 | `Options-> Update checksums and sign all files in /boot`
191 |
192 | **NOTE** : It is advisable to remove all USB security dongles (yubikeys and others) and only plug in the corresponding one when you want to update kernel settings to avoid some issues.
193 |
194 | If you freshly installed an OS, the following should pick up automatically:
195 | 
196 | 
197 | 
198 |
199 |
200 | Setting a new boot default
201 | ====
202 |
203 | If you choose to add the Disk Unlock Key to the TPM, you'll need to specify
204 | which LUKS volume. A default Qubes install will work if you leave the
205 | 'Encrypted LVM group?' response blank and enter `/dev/sda2` when asked about
206 | 'Encrypted devices?'. For more details see the TPM Disk Unlock Keys
207 | section below. You'll then be asked to enter the Disk Recovery Key as well as
208 | the new boot passphrase you'll use to unseal that key.
209 |
210 | 
211 | 
212 | 
213 |
214 | Until next dom0 upgrade, this is the normal boot process
215 | ====
216 | 
217 | 
218 | 
219 |
220 | When updating dom0 from Qubes OS update widget
221 | ====
222 | You need to reboot directly after applying dom0 upgrades.
223 | You should follow this Qube's forum [Verifying Installation](https://forum.qubes-os.org/t/verifying-installation/11739) post to investigate integrity of dom0 and /boot components.
224 |
225 | You will then get a similar prompt when selecting the Default boot option:
226 | 
227 |
228 | This is the result of Heads having verified that /boot/kexec.sig detached signature file of kexec_*.txt digests are still valid, but that the content of kexec_hashes.txt differs for some of the files measured under that digest. Heads will require you to generetate new digests and sign them.
229 |
230 |
231 | Then, Heads will ask you to define a new boot default if grub.cfg file has changed:
232 |
233 | ```text
234 | !!! Boot entry has changed - please set a new default
235 | ```
236 |
237 | Applying dom0 (or OS updates) that changed the boot related binaries and config files (updating the
238 | kernel, Xen, or the initramfs, etc) will modify /boot content. If someone has tampered with your `/boot`
239 | partition, this can also happen, so if you're not sure of the situation,
240 | don't proceed and investigate. The onlyway to make sure you are the origin of the changes is to reboot and sign /boot content right after the upgrade. On Qubes OS, that should only happen when upgrading dom0. For Other OSes, that can happen in any unattended upgrades, which requires you to inspect system upgrade logs or be aware of updates propositions: if a kernel update is involved, you sure need to reboot and sign now.
241 |
242 | Choose the first option again ('1'), then make it the new default ('d'), confirm
243 | that you're modifying the boot partition ('y'), and that you don't need to
244 | reseal the disk key ('n'). You'll be asked to insert your USB Security dongle
245 | and enter the GPG User PIN to sign the new configs and the system will reboot and allow
246 | you to proceed as normal.
247 |
248 | Installing extra software
249 | ---
250 |
251 | ```shell
252 | sudo qubes-dom0-update
253 | ```
254 |
255 | powertop is useful for debugging power drain issues. In dom0 run:
256 |
257 | ```shell
258 | sudo qubes-dom0-update powertop
259 | ```
260 |
261 | You might want to make the middle button into a scroll wheel. Add this to
262 | `/etc/X11/xorg.conf.d/20-thinkpad-scrollwheel.conf`
263 |
264 |
265 |
266 | ```text
267 | Section "InputClass"
268 | Identifier "Trackpoint Wheel Emulation"
269 | MatchProduct "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device|Composite TouchPad / TrackPoint"
270 | MatchDevicePath "/dev/input/event*"
271 | Option "EmulateWheel" "true"
272 | Option "EmulateWheelButton" "2"
273 | Option "Emulate3Buttons" "false"
274 | Option "XAxisMapping" "6 7"
275 | Option "YAxisMapping" "4 5"
276 | EndSection
277 | ```
278 |
279 |
280 |
281 | You'll probably want to enable fan control, as described on [ThinkWiki](http://www.thinkwiki.org/wiki/Fan_control_scripts).
282 |
283 | Disabling the ethernet might make sense to save power
284 |
285 |
--------------------------------------------------------------------------------
/PDFs/COMSEC_beyond_encryption.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/PDFs/COMSEC_beyond_encryption.pdf
--------------------------------------------------------------------------------
/PDFs/Recon_2014_Skochinsky.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/PDFs/Recon_2014_Skochinsky.pdf
--------------------------------------------------------------------------------
/PDFs/Rootkit_in_your_laptop.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/PDFs/Rootkit_in_your_laptop.pdf
--------------------------------------------------------------------------------
/PDFs/state_harmful.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/PDFs/state_harmful.pdf
--------------------------------------------------------------------------------
/PDFs/x86_harmful.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/PDFs/x86_harmful.pdf
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Documentation for the Heads firmware project
2 | ===
3 |
4 | This documentation is hosted at [https://osresearch.net](https://osresearch.net/)
5 |
6 | Sources for heads are at [https://github.com/linuxboot/heads/](https://github.com/linuxboot/heads/)
7 |
--------------------------------------------------------------------------------
/_config.yml:
--------------------------------------------------------------------------------
1 | #This is remote configuration, used by github for github pages rendering. See local_config.yml for local jekyll serving of pages editions
2 | remote_theme: just-the-docs/just-the-docs
3 | color_scheme: dark
4 | heading_anchors: true
5 | aux_links:
6 | "Heads on GitHub":
7 | - "https://github.com/linuxboot/heads"
8 | aux_links_new_tab: true
9 |
10 | title: Heads - Wiki
11 |
12 | last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
13 | last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html
14 |
15 | # Footer "Edit this page on GitHub" link text
16 | gh_edit_link: true
17 | gh_edit_link_text: "Edit this page on GitHub."
18 | gh_edit_repository: "https://github.com/linuxboot/heads-wiki"
19 | gh_edit_branch: "master"
20 | gh_edit_view_mode: "edit"
21 |
--------------------------------------------------------------------------------
/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/favicon.ico
--------------------------------------------------------------------------------
/images/33c3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/33c3.jpg
--------------------------------------------------------------------------------
/images/Bootguard_fuses.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Bootguard_fuses.jpg
--------------------------------------------------------------------------------
/images/Disk_encryption_recovery_key.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Disk_encryption_recovery_key.jpg
--------------------------------------------------------------------------------
/images/Files_scheme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Files_scheme.png
--------------------------------------------------------------------------------
/images/Flash_chips.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Flash_chips.jpg
--------------------------------------------------------------------------------
/images/Flashing_Heads_on_an_x230_at_HOPE.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Flashing_Heads_on_an_x230_at_HOPE.jpg
--------------------------------------------------------------------------------
/images/Flashing_an_x230_bootrom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Flashing_an_x230_bootrom.jpg
--------------------------------------------------------------------------------
/images/Flashing_x230_SPI_flash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Flashing_x230_SPI_flash.jpg
--------------------------------------------------------------------------------
/images/Flashrom.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Flashrom.jpg
--------------------------------------------------------------------------------
/images/Hard_disk_drive.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Hard_disk_drive.jpg
--------------------------------------------------------------------------------
/images/Heads_booting_on_an_x230.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Heads_booting_on_an_x230.jpg
--------------------------------------------------------------------------------
/images/Heads_splash_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Heads_splash_screen.jpg
--------------------------------------------------------------------------------
/images/Keyboard_tilted_up.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Keyboard_tilted_up.jpg
--------------------------------------------------------------------------------
/images/Mount_and_flash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Mount_and_flash.jpg
--------------------------------------------------------------------------------
/images/Porting_cycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Porting_cycle.png
--------------------------------------------------------------------------------
/images/Qubes_partitioning.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Qubes_partitioning.jpg
--------------------------------------------------------------------------------
/images/Recovery_shell.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Recovery_shell.jpg
--------------------------------------------------------------------------------
/images/Ribbon_cable.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Ribbon_cable.jpg
--------------------------------------------------------------------------------
/images/Signing_Qubes_binaries_in__boot.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Signing_Qubes_binaries_in__boot.jpg
--------------------------------------------------------------------------------
/images/T420_SPI_chip.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T420_SPI_chip.jpg
--------------------------------------------------------------------------------
/images/T480/1_screws.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/1_screws.jpg
--------------------------------------------------------------------------------
/images/T480/2_battery.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/2_battery.jpg
--------------------------------------------------------------------------------
/images/T480/3_chips.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/3_chips.jpg
--------------------------------------------------------------------------------
/images/T480/4_bios_chip_orientation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/4_bios_chip_orientation.jpg
--------------------------------------------------------------------------------
/images/T480/5_chip_name.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/5_chip_name.jpg
--------------------------------------------------------------------------------
/images/T480/6_lenovo_bios.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/6_lenovo_bios.jpg
--------------------------------------------------------------------------------
/images/T480/7_lenovo_bios_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/7_lenovo_bios_1.jpg
--------------------------------------------------------------------------------
/images/T480/8_sha256.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/8_sha256.jpg
--------------------------------------------------------------------------------
/images/T480/9_flash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/T480/9_flash.jpg
--------------------------------------------------------------------------------
/images/TPM.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPM.jpg
--------------------------------------------------------------------------------
/images/TPMTOTP_QR_code.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPMTOTP_QR_code.jpg
--------------------------------------------------------------------------------
/images/TPMTOTP_in_use.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPMTOTP_in_use.jpg
--------------------------------------------------------------------------------
/images/TPMTOTP_output.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPMTOTP_output.jpg
--------------------------------------------------------------------------------
/images/TPM_TOTP_QR.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPM_TOTP_QR.jpg
--------------------------------------------------------------------------------
/images/TPM_TOTP_in_action.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/TPM_TOTP_in_action.jpg
--------------------------------------------------------------------------------
/images/Threat_model.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Threat_model.jpg
--------------------------------------------------------------------------------
/images/Thunderstrike_presentation.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Thunderstrike_presentation.jpg
--------------------------------------------------------------------------------
/images/Underside_of_the_x230.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Underside_of_the_x230.jpg
--------------------------------------------------------------------------------
/images/Yubikey.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/Yubikey.jpg
--------------------------------------------------------------------------------
/images/boot_missing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/boot_missing.jpg
--------------------------------------------------------------------------------
/images/bootguard.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/bootguard.jpg
--------------------------------------------------------------------------------
/images/gpg_management.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/gpg_management.jpg
--------------------------------------------------------------------------------
/images/gpg_missing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/gpg_missing.jpg
--------------------------------------------------------------------------------
/images/insmod.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/insmod.jpg
--------------------------------------------------------------------------------
/images/mjg59_presenting_tpmtotp_at_32c3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/mjg59_presenting_tpmtotp_at_32c3.jpg
--------------------------------------------------------------------------------
/images/otp_error.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/otp_error.jpg
--------------------------------------------------------------------------------
/images/t430/10_spi_flash_chips.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/10_spi_flash_chips.jpg
--------------------------------------------------------------------------------
/images/t430/11_spi_chips_closed_view.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/11_spi_chips_closed_view.jpg
--------------------------------------------------------------------------------
/images/t430/12_flash_4mb_spi_chip.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/12_flash_4mb_spi_chip.jpg
--------------------------------------------------------------------------------
/images/t430/13_ubuntu_output_4mb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/13_ubuntu_output_4mb.jpg
--------------------------------------------------------------------------------
/images/t430/14_programmer_flashing.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/14_programmer_flashing.jpg
--------------------------------------------------------------------------------
/images/t430/15_successful_output_top.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/15_successful_output_top.jpg
--------------------------------------------------------------------------------
/images/t430/16_flash_8mb_chip.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/16_flash_8mb_chip.jpg
--------------------------------------------------------------------------------
/images/t430/17_ubuntu_output_8mb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/17_ubuntu_output_8mb.jpg
--------------------------------------------------------------------------------
/images/t430/1_1_back_view_removed_battery.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/1_1_back_view_removed_battery.jpg
--------------------------------------------------------------------------------
/images/t430/1_2_back_view_remove_last3_screws.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/1_2_back_view_remove_last3_screws.jpg
--------------------------------------------------------------------------------
/images/t430/3_keyboard_shift.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/3_keyboard_shift.jpg
--------------------------------------------------------------------------------
/images/t430/4_keyboard_disconnected.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/4_keyboard_disconnected.jpg
--------------------------------------------------------------------------------
/images/t430/5_palmrest_screws.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/5_palmrest_screws.jpg
--------------------------------------------------------------------------------
/images/t430/6_palmrest_removed.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/6_palmrest_removed.jpg
--------------------------------------------------------------------------------
/images/t430/7_remove_cpu_cooler_screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/7_remove_cpu_cooler_screen.jpg
--------------------------------------------------------------------------------
/images/t430/8_back_view.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/8_back_view.jpg
--------------------------------------------------------------------------------
/images/t430/9_flipped_again.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/t430/9_flipped_again.jpg
--------------------------------------------------------------------------------
/images/wocintechchat_25721068170.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/linuxboot/heads-wiki/ce47962a6aa41610a654f6c75798507029eb753f/images/wocintechchat_25721068170.jpg
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: About
4 | has_children: true
5 | has_toc: false
6 | permalink: /
7 | nav_order: 1
8 | ---
9 |
10 | Heads main menu
11 | ===
12 |
13 | Left: laptop/workstation. Right: server (BMC/SSH/Console)
14 |
15 |
18 |
19 |
20 | Overview
21 | ===
22 |
23 | Heads is an open source custom firmware and OS configuration for laptops
24 | and servers that aims to provide slightly better physical security and
25 | protection for data on the system. Unlike Tails, which aims to be a
26 | stateless OS that leaves no trace on the computer of its presence, Heads
27 | is intended for the case where you need to store data and state on the
28 | computer.
29 |
30 | 
31 |
32 |
33 | Heads is not just another Linux distribution -- it combines physical
34 | hardening of specific hardware platforms and flash security features with
35 | custom coreboot firmware and a Linux boot loader in ROM. This moves
36 | the root of trust into the write-protected region of the SPI flash and
37 | prevents further software modifications to the bootup code (and on
38 | platforms that support it, [Bootguard](https://trmm.net/Bootguard) can
39 | protect against many hardware attacks as well). Controlling the
40 | first instruction the CPU executes allows Heads to measure every step of
41 | the boot firmware and configuration into the TPM, which makes it possible
42 | to attest to the user or a remote system that the machine has not been
43 | tampered with.
44 | While modern Intel CPUs require binary blobs to boot, these non-Free
45 | components are included in the measurements and are at least guaranteed
46 | to be unchanging. Once the system is in a known good state, the TPM is
47 | used as a hardware key storage to decrypt the drive.
48 |
49 |
50 | Additionally, the hypervisor, kernel and initrd images are signed by
51 | keys controlled by the user. While all of these firmware and software changes
52 | don't secure the system against every possible attack vector, they address
53 | several classes of attacks against the boot process and physical hardware
54 | that have been neglected in traditional installations, hopefully raising
55 | the difficulty beyond what most attackers are willing to spend.
56 |
57 |
58 | 
59 |
60 | Conferences
61 | ===
62 |
63 | * [2016 - 33C3 - Trammel Hudson - Heads Presentation](https://media.ccc.de/v/33c3-8314-bootstraping_a_slightly_more_secure_laptop)
64 | * [2017 - 34C3 - Trammel Hudson - LinuxBoot Presentation](https://media.ccc.de/v/34c3-9056-bringing_linux_back_to_server_boot_roms_with_nerf_and_heads)
65 | * [2019 - Platform Security Summit - Thierry Laurion - Accessible Security: An OEM approach to transferring device and secrets ownership](https://www.platformsecuritysummit.com/2019/)
66 | * [2020 - FOSDEM - Thierry Laurion - Heads OEM device initial ownership of platform/transfer of ownership (Re-Ownership concept)](https://archive.fosdem.org/2020/schedule/event/firmware_hodorateatria/)
67 | * [2020 - SOCALINUXEXPO - Kyle Rankin - Tamper Evident Firmware with User-controlled keys](https://www.youtube.com/watch?v=NqQI3nr1dqk)
68 | * [2023 - FOSDEM - Thierry Laurion - Heads status update](https://archive.fosdem.org/2023/schedule/event/heads_status_update/)
69 | * [2024 - QubesOS mini-summit - Thierry Laurion - Heads rolling release : roles of upstream and downstream forks (Design Session)](https://youtu.be/mAb_kHrF6SQ?list=PLuISieMwVBpL5S7kPUHKenoFj_YJ8Y0_d)
70 | * [2024 - QubesOS mini-summit - Jan Suhr & Thierry Laurion - Future of Measured Boot such as Heads (Design Session)](https://youtu.be/ZPeidhgNBtg?list=PLuISieMwVBpL5S7kPUHKenoFj_YJ8Y0_d)
71 |
72 | Articles
73 | ===
74 | * [2016 - BLOG - Trammel Hudson - Heads 33c3 - Bootstrapping slightly more secure systems](https://trmm.net/Heads_33c3/)
75 | * [2017 - BLOG - Trammel Hudson - Linuxboot 34c3 - Bringing linux back to the server BIOS with LinuxBoot](https://trmm.net/LinuxBoot_34c3/)
76 | * [2018 - Linux Journal - David Hendricks - LinuxBoot: Linux as firmware](https://www.linuxjournal.com/content/foss-project-spotlight-linuxboot)
77 | * [2018 - Linux Journal - Michael J. Hammel - LinuxBoot: Custom Embedded Linux Distributions](https://www.linuxjournal.com/content/custom-embedded-linux-distributions)
78 | * [2019 - Linux Journal - Kyle Rankin - Tamper-Evident Boot with Heads](https://www.linuxjournal.com/content/tamper-evident-boot-heads)
79 | * [2023 - BLOG - Michael Atfield - Trusted Boot (Anti-Evil-Mail, Heads and Pureboot](https://tech.michaelaltfield.net/2023/02/16/evil-maid-heads-pureboot/)
80 |
81 |
82 | Learn more about Heads
83 | ---
84 |
85 | * [Heads threat model]({{ site.baseurl }}/Heads-threat-model/) - goes into more
86 | detail about what classes of threats Heads attempts to counter.
87 | * [Frequently Asked Questions]({{ site.baseurl }}/FAQ/)
88 | * [Requirements for Heads]({{ site.baseurl }}/Install-and-Configure)
89 |
--------------------------------------------------------------------------------
/local_config.yml:
--------------------------------------------------------------------------------
1 | #This is local jekyll for local rendering of edits, used by github for github pages. Use with: 'jekyll serve --config local_config.yml'
2 | theme: "just-the-docs"
3 | color_scheme: dark
4 | heading_anchors: true
5 | aux_links:
6 | "Heads on GitHub":
7 | - "https://github.com/linuxboot/heads"
8 | aux_links_new_tab: true
9 |
10 | title: Heads - Wiki
11 |
12 | last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
13 | last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html
14 |
15 | # Footer "Edit this page on GitHub" link text
16 | gh_edit_link: true
17 | gh_edit_link_text: "Edit this page on GitHub."
18 | gh_edit_repository: "https://github.com/linuxboot/heads-wiki"
19 | gh_edit_branch: "master"
20 | gh_edit_view_mode: "edit"
21 |
--------------------------------------------------------------------------------