diff --git a/CHANGELOG.md b/CHANGELOG.md index ab16833..d8ce8ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,41 @@ * Correctly handle VM environments * Correctly quote pacman arguments +## CachyOS with Steamify Live ISO 1.0.0 (unreleased) +CachyOS 26.08 with Steamify built in: install CachyOS and turn the PC into a Steam Machine in one go. + +**Features:** + +* **ISO:** called `steamify-cachyos--x86_64.iso`; CachyOS Hello installs it like CachyOS's own + release (the build date is kept in `/etc/steammachine-iso-build`) +* **Installer (CachyOS - Steamify Installer):** + * A Steamify page after the packages page: which Steam Machine parts to set up (rows from + `steamify.sh --defaults --list`, the newest Steamify fetched before Calamares starts) and where + the PC starts (gaming mode or the desktop) + * The Summary lists every chosen item and where the PC starts + * The new user's Steam Machine setup runs during the install (`steamify-install`, a Calamares step + before cleanup): the first boot is already a Steam Machine + * Only what Steamify supports is offered: KDE Plasma, and the boot loaders Limine, systemd-boot and + GRUB (not rEFInd) +* **Live session:** keeps CachyOS's own name; the power-off fix is built for the ISO's kernels, and + the login has the Vapor look + +**Fixes:** + +* **systemd-boot:** the installed system gets its "Linux Boot Manager" EFI boot entry, first in the + boot order. cachyos-installer runs `bootctl install` in a chroot, where bootctl leaves the EFI + variables alone, so the entry was missing: the PC could only boot through the disk's fallback path + (`\EFI\BOOT\BOOTX64.EFI`). Most PCs find it early and boot normally, but firmware that tries the + network first waits minutes on every boot (QEMU/OVMF: PXE, HTTP boot and the EFI shell come first), + and anything else that writes the fallback file (another OS) takes the boot over. + `steamify-install` now registers it with `efibootmgr` from the live system, with the ESP's real + disk and partition (bootctl in the chroot writes an entry without a partition, which the firmware + can't load); the output is in `/var/log/steamify-bootentry.log` +* **Installer:** Steamify's setup never asks for a password (its sudo rule is read after CachyOS's + `%wheel` rule); Calamares starts with the Boost version it was linked against +* **Build:** finishes cleanly as root and reports no error after a successful build; the Steamify page's + Calamares module is built with the ISO and left out when Calamares' version differs + # 26.07 **Features:** diff --git a/archiso/airootfs/usr/local/bin/steamify-install b/archiso/airootfs/usr/local/bin/steamify-install index 5544fb9..748dd60 100755 --- a/archiso/airootfs/usr/local/bin/steamify-install +++ b/archiso/airootfs/usr/local/bin/steamify-install @@ -20,6 +20,23 @@ for id in ${choice//,/ }; do *) options+="${options:+,}$id" ;; esac done +# systemd-boot: cachyos-installer runs `bootctl install` in a chroot, and bootctl leaves the EFI +# variables alone there: no "Linux Boot Manager" boot entry, so the firmware tries the network and +# its other entries first and finds the disk's fallback path last (or never). bootctl can't be made +# to do it from the chroot either (it writes the entry without the partition: HD(0,GPT,0000...)). +# So register it from the live system, with the ESP's real disk and partition; efibootmgr puts it first. +if [[ -n "$root" && -f "$root/boot/EFI/systemd/systemd-bootx64.efi" && -d /sys/firmware/efi/efivars ]]; then + { + esp="$(findmnt -no SOURCE "$root/boot")" + disk="/dev/$(lsblk -no PKNAME "$esp" | head -n 1)" + part="$(cat "/sys/class/block/${esp##*/}/partition")" + echo "ESP: $esp (disk $disk, partition $part)" + for n in $(efibootmgr | sed -n 's/^Boot\([0-9A-Fa-f]\{4\}\)\*\{0,1\} \(Fallback \)\{0,1\}Linux Boot Manager.*/\1/p'); do + efibootmgr -q -b "$n" -B + done + efibootmgr --create --disk "$disk" --part "$part" --label "Linux Boot Manager" --loader '\EFI\systemd\systemd-bootx64.efi' + } > "$root/var/log/steamify-bootentry.log" 2>&1 +fi log="$root/var/log/steamify-install.log" rule="$root/etc/sudoers.d/zz-steamify-install" [[ -d "$root" && -n "$user" ]] || exit 0