Asterboot is an extremely lightweight UEFI bootloader with one job... to boot kernels.
Now 8KB compiled! No libraries. No bloat. Pure suckless nature.
Root partition encryption is supported as the initramfs handles decryption, full disk encryption not supported.
Timeout > 0: Countdown timer is shown. Any key interrupts timer.
Timeout = 0: Boots default entry instantly. To interrupt and access the menu, Hold SPACEBAR.
I recommend the "Instant Boot" mode for daily use and speed.
Arrow keys to select a slot. Enter to boot.
D to set a default slot graphically.
Use the precompiled binary under releases, or you can build from source using the commands below:
git clone https://github.com/adaster98/asterboot
cd asterboot
clang -target x86_64-unknown-windows -ffreestanding -fshort-wchar -mno-red-zone -Wl,-entry:efi_main -fuse-ld=lld -Wl,-subsystem:efi_application -Wl,-nodefaultlib -Oz -o asterbootx64.efi main.c
llvm-strip asterbootx64.efi/
├── EFI/
│ └── asterboot/
│ └── asterbootx64.efi
├── asterboot/
│ ├── asterboot.conf
│ └── slots/
│ ├── entry1.conf
│ └── entry2.conf
├── kernel1.efi
└── kernel2.efi
TIMEOUT=5
DEFAULT=entry1.confTITLE=Gentoo Linux
VERSION=6.18.9
KERNEL=\kernel1.efi
PARAMS=root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw quietIf you use initramfs, add this key:
INITRD=\initramfs1.img
For LUKS encryption, make sure to add rd.luks.uuid=<UUID> or luks.uuid=<UUID> to your PARAMS depending on which you use.
sudo efibootmgr --create --disk /dev/nvme0n1 --part 1 --label "Asterboot" --loader "\EFI\asterboot\asterbootx64.efi"If you wish to utilize secureboot, you must generate a keypair and certificate, and use it to sign the bootloader and your kernel.
You will need openssl, sbsigntools and sbsigntools.
Note: It may be possible to use a microsoft signed SHIM instead, but this is untested and probably won't work.
mkdir keys
cd keys
# 1. Platform Key (PK) - The Master Key
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=Asterboot PK/" -keyout PK.key -out PK.crt -days 3650 -nodes -sha256
# 2. Key Exchange Key (KEK) - Used to update signatures
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=Asterboot KEK/" -keyout KEK.key -out KEK.crt -days 3650 -nodes -sha256
# 3. Signature Database Key (db) - Used to sign your bootloader/kernel
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=Asterboot db/" -keyout db.key -out db.crt -days 3650 -nodes -sha256# 1. Convert Certificates to ESL format
cert-to-efi-sig-list -g "$(uuidgen)" PK.crt PK.esl
cert-to-efi-sig-list -g "$(uuidgen)" KEK.crt KEK.esl
cert-to-efi-sig-list -g "$(uuidgen)" db.crt db.esl
# 2. Sign the ESLs to create .auth files
# PK signs itself. PK signs KEK. KEK signs db.
# Sign PK with itself
sign-efi-sig-list -k PK.key -c PK.crt PK PK.esl PK.auth
# Sign KEK with PK
sign-efi-sig-list -k PK.key -c PK.crt KEK KEK.esl KEK.auth
# Sign db with KEK
sign-efi-sig-list -k KEK.key -c KEK.crt db db.esl db.auth# Sign Asterboot
sbsign --key db.key --cert db.crt --output asterbootx64-signed.efi asterbootx64.efi
# Sign your kernel. Repeat for every kernel you want to boot
sbsign --key db.key --cert db.crt --output myKernel-signed.efi myKernel.efiTransfer your db, KEK and PK to a flash drive and enroll them in your BIOS under the secure-boot menu.
NOTE: Enroll PK last and this ends setup mode.
