All Projects → andreyv → Sbupdate

andreyv / Sbupdate

Licence: gpl-3.0
Generate and sign kernel images for UEFI Secure Boot on Arch Linux

Programming Languages

shell
77523 projects

Labels

Projects that are alternatives of or similar to Sbupdate

Guide2011 3
Гайд по сокету LGA2011-3 и в целом по платформе Intel X99
Stars: ✭ 37 (-68.91%)
Mutual labels:  uefi
Vbiosfinder
Extract embedded VBIOS from (almost) any BIOS Update
Stars: ✭ 64 (-46.22%)
Mutual labels:  uefi
Tomatboot
A UEFI 64bit Bootloader
Stars: ✭ 109 (-8.4%)
Mutual labels:  uefi
Efiseek
Ghidra analyzer for UEFI firmware.
Stars: ✭ 45 (-62.18%)
Mutual labels:  uefi
Multibootusb
Create multiboot live Linux on a USB disk...
Stars: ✭ 1,042 (+775.63%)
Mutual labels:  uefi
Mortar
Framework to join Linux's physical security bricks.
Stars: ✭ 80 (-32.77%)
Mutual labels:  uefi
Mu tiano plus
UEFI Tiano Core Value
Stars: ✭ 28 (-76.47%)
Mutual labels:  uefi
Rpi3
Raspberry Pi 3 UEFI Firmware Images
Stars: ✭ 117 (-1.68%)
Mutual labels:  uefi
Yubikey Full Disk Encryption Secure Boot Uefi
Tutorial to create full disk encryption with YubiKey, encrypted boot partition and secure boot with UEFI
Stars: ✭ 62 (-47.9%)
Mutual labels:  uefi
Mu plus
Microsoft Core UEFI Value
Stars: ✭ 95 (-20.17%)
Mutual labels:  uefi
9pfspkg
Painless Network-Transparent Network Boot with 9P
Stars: ✭ 48 (-59.66%)
Mutual labels:  uefi
Debootstick
Generate a bootable live image from any Debian/Ubuntu filesystem tree.
Stars: ✭ 48 (-59.66%)
Mutual labels:  uefi
Veracrypt Dcs
VeraCrypt EFI Bootloader for EFI Windows system encryption (LGPL)
Stars: ✭ 81 (-31.93%)
Mutual labels:  uefi
Minimal
Minimal Linux Live (MLL) is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the Linux kernel, GNU C library, and Busybox userland utilities.
Stars: ✭ 1,014 (+752.1%)
Mutual labels:  uefi
Refind Minimal
A stunningly clean theme for the rEFInd UEFI boot manager.
Stars: ✭ 1,585 (+1231.93%)
Mutual labels:  uefi
Ebcvm
EFI Byte Code Virtual Machine in userspace
Stars: ✭ 34 (-71.43%)
Mutual labels:  uefi
Uefi
Fast and lightweight yet another UEFI implementation
Stars: ✭ 79 (-33.61%)
Mutual labels:  uefi
Liveusb Builder
A script suite to create multiboot USB stick for GNU/Linux distributions
Stars: ✭ 118 (-0.84%)
Mutual labels:  uefi
Tofita
🍬 All-new kernel for @GreenteaOS
Stars: ✭ 112 (-5.88%)
Mutual labels:  uefi
Uefi Jitfuck
A JIT compiler for Brainfuck running on x86_64 UEFI
Stars: ✭ 83 (-30.25%)
Mutual labels:  uefi

sbupdate

This tool allows you to sign Arch Linux kernels using your own Secure Boot keys.

Installation

You should be familiar with the process of creating, installing and using custom Secure Boot keys. See:

After you have generated your custom keys, proceed with setup:

  • Install sbupdate-git from AUR
  • Place your custom keys in /etc/efi-keys
  • Configure /etc/sbupdate.conf (see Configuration)
  • Run sudo sbupdate for first-time image generation

For each installed Arch kernel, a signed UEFI image will be generated, by default in /boot/EFI/Arch/<NAME>-signed.efi. Multiple images can be generated with advanced configuration. Now you can add these images to your UEFI firmware or boot manager configuration.

After the initial setup, signed images will be (re)generated automatically when you install or update kernels using Pacman.

Note that the kernel command line, initramfs and boot splash will be embedded in the signed UEFI image.

Configuration

Edit the file /etc/sbupdate.conf. Set your default kernel command line in the CMDLINE_DEFAULT variable.

The following optional settings are available:

  • Command line and initramfs for each kernel config (each kernel can have multiple configs)
  • A list of additional boot files to sign
  • Locations of the key, ESP and output directories
  • Boot splash image

💡 Hint: Intel and AMD microcode updates are handled automatically.

💡 Hint: Disable boot splash to keep the UEFI boot logo.

Direct booting vs. boot manager

The generated images are UEFI executables and can be directly booted by UEFI firmware. Therefore, a separate boot manager such as systemd-boot is technically not required. This is similar to Linux EFISTUB.

Booting directly from firmware is arguably more secure, but may also be harder to set up and use. See Using UEFI directly in the above article, with the exception that the kernel command line does not need to be specified in this case.


Alternatively, you can use a boot manager. In this case you need to add the generated UEFI images to the boot manager configuration. For systemd-boot, the basic entry format is

title Arch Linux <NAME>
efi   /EFI/Arch/<NAME>-signed.efi

You also need to sign your boot manager's own UEFI executables with your custom keys. Add corresponding filenames to the EXTRA_SIGN array in /etc/sbupdate.conf, for example (systemd-boot):

EXTRA_SIGN=('/boot/EFI/BOOT/BOOTX64.EFI' '/boot/EFI/systemd/systemd-bootx64.efi')

and re-run the tool if needed. You should remember to run the tool every time you update your boot manager's files (e. g., after sudo bootctl update).

⚠️ Note: When booting with Secure Boot disabled, options passed from an EFI shell (even empty) may override the built-in command line in the combined image, and the boot may fail. See #4.

ESP mount point

Typically ESP is mounted on /boot and contains also the original, unsigned files such as the Linux kernel image and initramfs. You may choose to mount ESP on a different directory (for example, /efi) and keep /boot itself on the secure root file system. This way ESP will only contain signed images which cannot be tampered with.

See Configuration to change the ESP directory.

Note that if you use a boot manager such as systemd-boot, then its files still need to be on the ESP before they are signed. It is customary to sign these files right after they have been installed on the ESP. Direct booting is recommended for increased security.

Related resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].