#!/bin/bash # Copyright 2026 Logan Fick # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # bootloader.sh - systemd-boot configuration # # Installs and configures systemd-boot as the bootloader: # - Runs bootctl install to set up EFI boot manager # - Creates boot entry with LUKS unlock parameters # - Supports both single-disk and RAID1 configurations # - Configures loader.conf timeout setting # Install systemd-boot bootloader install_bootloader() { print "Installing bootloader..." run_visible_cmd_in_chroot bootctl install } # Create boot entry for single-disk installation # Arguments: # $1 - LUKS UUID create_boot_entry_single() { local luks_uuid="$1" run_cmd_in_chroot sh -c "cat > /boot/loader/entries/arch.conf" < /boot/loader/entries/arch.conf" <