Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| secureboot [2023/10/25 22:58] – removed - external edit (Unknown date) 127.0.0.1 | secureboot [2023/11/12 04:39] (current) – [TPM] formatting + grammar atari | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Secure Boot ====== | ||
| + | |||
| + | For Batocera **v39** and higher on x86_64 systems, streamlined support for Secure Boot is present. This makes it easier to boot Batocera on PCs which have poor secure boot key management in the native UEFI BIOS. The process detailed below will install Batocera' | ||
| + | |||
| + | <WRAP center round alert> | ||
| + | Modifying Secure Boot and related settings may trip a " | ||
| + | |||
| + | If the system is managed by someone else (such as your employer), recovery may require assistance from an authorized system administrator. Act responsibly, | ||
| + | </ | ||
| + | |||
| + | Before proceeding, make a copy of the required BitLocker recovery keys. Documentation on locating the keys can be found at https:// | ||
| + | |||
| + | Technical references: | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | <WRAP center round info> | ||
| + | For Batocera **v38** and lower, the keys must be enrolled by the BIOS itself (if available, otherwise [[: | ||
| + | |||
| + | This method can be used instead of using the MOK management tool as explained below. Batocera **v38** and lower does not have the MOK management tool installed. | ||
| + | </ | ||
| + | |||
| + | ====== Prerequisites ====== | ||
| + | |||
| + | * The system must be an Intel/AMD system that supports booting in 64-bit UEFI mode, with the standard Microsoft signing key certificates. | ||
| + | * Secure Boot must be enabled during the setup process. If offered the option to select the mode of Secure Boot to use, the " | ||
| + | * The UEFI BIOS firmware must support booting from the desired installation media type, and it must be possible to select which drive to boot while using UEFI. | ||
| + | * A keyboard is required to navigate the MOK management procedure detailed below. | ||
| + | |||
| + | As some of this configuration is vendor-specific, | ||
| + | |||
| + | ====== Preparation ====== | ||
| + | |||
| + | [[: | ||
| + | |||
| + | ====== Configuration Steps ====== | ||
| + | |||
| + | Power on the computer and enter its BIOS setup or boot manager. Set the UEFI boot to the drive Batocera is installed on. The details of how to do this vary by manufacturer. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | A blue screen will appear with a message **Error Verification Failed (0x1A) Security Violation**. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the **Shim UEFI key management** screen, hit any key before the ten-second timer expires. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the **Perform MOK management** screen, use the arrow keys to navigate to **Enroll key from disk**, and hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the **Select Key** screen, navigate to the **BATOCERA** partition and hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the second **Select Key** screen, navigate to the **ENROLL_THIS_KEY_IN_MOKMANAGER_batocera.cer** certificate file, and hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the **Enroll MOK** screen, navigate to the **Continue** menu item, and hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the **Enroll the key(s)?** screen, navigate to the **Yes** menu item, and hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | On the second **Perform MOK management** screen, hit '' | ||
| + | |||
| + | {{: | ||
| + | |||
| + | The system will reboot. | ||
| + | |||
| + | If other operating system disks are attached to the system, they can be selected for boot from your firmware' | ||
| + | |||
| + | ====== TPM ====== | ||
| + | |||
| + | Batocera' | ||
| + | |||
| + | If the system' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Using a keyboard, press any key to move on to the next screen. | ||
| + | |||
| + | On the **Boot Options Restored** screen, use the arrow keys to select **Always continue boot** and press '' | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | It will be necessary to perform this setup only once, as long as the correct option is selected. | ||
| + | |||
| + | ====== Upgrading and Downgrading with Secure Boot ====== | ||
| + | |||
| + | It is safe to upgrade to later Batocera versions while Secure Boot is enabled. Downgrading to **v39** or higher is also safe. If the newly upgraded/ | ||
| + | |||
| + | If Batocera is downgraded to **v38** or lower, the system may fail to boot in Secure Boot mode from the bootloaders installed by those versions. On systems where Secure Boot can be disabled, disabling it should allow the system to boot again. It is recommended to disable Secure Boot //before// such a downgrade. | ||
| + | |||
| + | <WRAP center round info 100%> | ||
| + | After the downgrade, the Secure Boot capable bootloader referenced in the '' | ||
| + | </ | ||
| + | |||
| + | |||
| + | ===== Disabling Secure Boot validation in the shim ===== | ||
| + | |||
| + | Once Secure Boot is set up and working, it is possible to leave Secure Boot enabled in the system, while disabling Secure Boot verification in the shim. This is optional, and is riskier than the normal setup allowing only signed bootloader components to run. | ||
| + | |||
| + | To disable Secure Boot verification, | ||
| + | |||
| + | < | ||
| + | mokutil --disable-validation | ||
| + | </ | ||
| + | |||
| + | To re-enable Secure Boot verification: | ||
| + | |||
| + | < | ||
| + | mokutil --enable-validation | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | Reboot the system, and the MOK Manager will ask to allow changing the verification state. It will then request a few random characters of the password by specifying the position number of the desired character. For example, if it asks for character #2, type '' | ||