Shell script to enable secure boot in Arch Linux (i use arch, btw)
- Enter your BIOS and reset Secure Boot to Setup Mode
- DO NOT enter any other operating system after this, head straight into the Arch installation you want to sign for Secure Boot.
Clone and cd into this repository with:
git clone https://github.com/pxradiso/arch-secure-boot.git && cd arch-secure-bootThen run the script as root with:
sudo sh secureboot-arch.sh- Installs
sbctlandgrubvia pacman - Checks sbctl status and Setup Mode
- Creates and enrolls your custom Secure Boot keys (with optional Microsoft keys for Valorant/Battlefield compatibility)
- Backs up your GRUB themes to
/root/grub-themes-backup-YYYYMMDD_HHMMSSbefore proceeding - Reinstalls GRUB with
--disable-shim-lockto fix theshim_lock_verifier_init:177error - Restores your GRUB themes
- Regenerates GRUB config
- Signs all unsigned EFI binaries and kernel images
- Prompts you to reboot and enable Secure Boot in BIOS
This error occurs when GRUB is built expecting shim chainloading but custom keys are used instead. The script automatically fixes this by reinstalling GRUB with --disable-shim-lock. If you hit this on an existing install before running the script, boot from an Arch live USB, chroot into your system, and run the script from there.
Please open an issue in #issues so I can find the fixes
Everyone is welcome to contribute. Fork this repository and open a pull request along with a description of your changes