Before you begin, ensure you have the following:
- A working Arch Linux installation.
- Root or sudo privileges.
- Basic knowledge of Arch Linux and UEFI.
-
Reboot your system and enter the UEFI firmware settings (usually by pressing a key like
F2,F10,Del, orEscduring boot). -
Enable Setup Mode in the UEFI firmware settings. This mode allows you to enroll new keys and is necessary for the initial setup.
-
Save and exit the UEFI firmware settings.
-
Update your system:
sudo pacman -Syu
-
Install
sbctl:sudo pacman -S sbctl
-
Generate a new key pair:
sudo sbctl create-keys
-
Enroll the keys in the UEFI firmware:
sudo sbctl enroll-keys
Or:
sudo sbctl enroll-keys -m # For enrolling the micro soft vendor keysFollow the on-screen instructions to enroll the keys. This usually involves rebooting into the UEFI firmware settings and enrolling the keys manually.
-
Sign the bootloader (e.g., GRUB):
Use the following command to see which all .efi files you need to sign
sudo sbctl --verify
Then sign all the keys as shown in following example
sudo sbctl sign -s /boot/efi/EFI/arch/grubx64.efi
Replace
/boot/efi/EFI/arch/grubx64.efiwith the path to your bootloader's EFI binary if it's different. -
Sign the kernel:
sudo sbctl sign -s /boot/vmlinuz-linux
Replace
/boot/vmlinuz-linuxwith the path to your kernel if it's different. -
Sign the initramfs:
sudo sbctl sign -s /boot/initramfs-linux.img
Replace
/boot/initramfs-linux.imgwith the path to your initramfs if it's different.
-
Reboot your system:
sudo reboot
-
Enter the UEFI firmware settings (usually by pressing a key like
F2,F10,Del, orEscduring boot). -
Enable Secure Boot in the UEFI firmware settings.
-
Save and exit the UEFI firmware settings.
-
Reboot your system and log in.
-
Verify that Secure Boot is enabled:
sudo mokutil --sb-state
The output should indicate that Secure Boot is enabled.
-
Verify the signatures of your signed binaries:
sudo sbctl verify /boot/efi/EFI/arch/grubx64.efi sudo sbctl verify /boot/vmlinuz-linux sudo sbctl verify /boot/initramfs-linux.img
Replace the paths with the actual paths to your bootloader, kernel, and initramfs if they are different.
- If you encounter issues, check the
sbctldocumentation or the Arch Wiki for more detailed information. - Ensure that all signed binaries are correctly placed and that their paths are accurate.
This guide should help you enable Secure Boot on Arch Linux using sbctl. If you encounter any issues, refer to the additional resources or seek help from the Arch Linux community.