heads/initrd/bin/basic-autoboot.sh
Matt DeVillier 4bc6159ab6
Add PureBoot Basic Mode
PureBoot Basic mode provides the full Linux userspace in firmware from
Heads without requiring verified boot or a Librem Key.  Basic and
verified boot can be switched freely without changing firmware, such as
if a Librem Key is lost.

PureBoot Basic can apply firmware updates from a USB flash drive, and
having a complete Linux userspace enables more sophisticated recovery
options.

Basic mode boots to the first boot option by default, setting a default
is not required.  This can be configured in the config GUI.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2023-06-21 13:26:45 -04:00

12 lines
248 B
Bash
Executable File

#!/bin/bash
set -o pipefail
. /etc/functions
BOOT_MENU_OPTIONS=/tmp/basic-autoboot-options
scan_boot_options /boot "grub.cfg" "$BOOT_MENU_OPTIONS"
if [ -s "$BOOT_MENU_OPTIONS" ]; then
kexec-boot -b /boot -e "$(head -1 "$BOOT_MENU_OPTIONS")"
fi