From 748bc6a8a092f57635c736d5b968152e202eefd9 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 14 Nov 2026 17:27:51 +0100 Subject: [PATCH 1/2] Drop the N1x rescue boot entry The fallback UKI behind it is built with every module and took about a minute on every install and kernel update. Release firmware boots the GPU, and snapshots cover recovery. Existing N1x machines lose the drop-in and rebuild, which removes the fallback UKI and its menu entry. Co-Authored-By: Claude Opus 5.5 --- install/hardware/n1x.sh | 34 +++++----------------------------- migrations/1794673542.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+), 29 deletions(-) create mode 100644 migrations/1794673542.sh diff --git a/install/hardware/n1x.sh b/install/hardware/n1x.sh index 9a99456aae65..3e9da58cbf0c 100644 --- a/install/hardware/n1x.sh +++ b/install/hardware/n1x.sh @@ -22,16 +22,14 @@ cat > /etc/mkinitcpio.conf.d/omarchy-n1x-input.conf <<'CONF' MODULES+=(i2c_mt65xx i2c_hid_acpi) CONF -# Console and rescue boot contract. +# Console boot contract. # # The firmware publishes an ACPI SPCR serial console at 0x16a00000; without # acpi=nospcr the kernel adopts it and the LUKS prompt and any initramfs # emergency shell go to a UART nobody is watching. The ISO installer gives # every aarch64 install console=tty0 acpi=nospcr (00-omarchy-console.conf). The -# normal entry otherwise boots as quietly as on x86, so Plymouth stays up from -# the LUKS prompt to the login screen; the rescue entry below is the verbose -# one. BOOT_ORDER is a plain assignment where the last file read wins, hence -# the zz- drop-in. +# entry otherwise boots as quietly as on x86, so Plymouth stays up from the +# LUKS prompt to the login screen. mkdir -p /etc/limine-entry-tool.d # cppc_cpufreq leaves CPPC autonomous selection off, so the CPUs follow the @@ -75,28 +73,6 @@ KERNEL_CMDLINE[default]+=" pci=hpbussize=0x20" CONF fi -# Rescue entry: limine-mkinitcpio-hook builds a fallback UKI for the kernel -# (every module, no autodetect) and keeps it in step with kernel updates. It -# boots with NVIDIA blacklisted, the multi-user target and a verbose console on -# the panel. Limine passes an entry's cmdline as EFI load options and -# systemd-stub prefers those over the UKI's embedded cmdline, so the fallback -# entry gets its whole cmdline, root= included, from KERNEL_CMDLINE[fallback]. -# BOOT_ORDER is a plain assignment where the last file read wins, hence the -# zz- drop-in; the snapshot entries leave the fallback out to save ESP space. -root_cmdline=$(cat /etc/kernel/cmdline 2>/dev/null || true) -if [[ -z $root_cmdline || $root_cmdline != *root=* ]]; then - echo "Error: /etc/kernel/cmdline has no root= (Limine defaults not written yet)" >&2 - return 1 -fi -rescue_cmdline="$root_cmdline initramfs_async=0 console=tty0 acpi=nospcr plymouth.enable=0 nomodeset module_blacklist=nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm,nvidia_peermem,nouveau modprobe.blacklist=nvidia,nvidia_drm,nvidia_modeset,nvidia_uvm,nvidia_peermem,nouveau nvidia_drm.modeset=0 systemd.unit=multi-user.target fbcon=map:0 loglevel=7 ignore_loglevel systemd.show_status=1 systemd.log_target=console vt.global_cursor_default=1" -printf '%s\n' \ - '# N1x: a text-console rescue entry sits right below the normal one; see install/hardware/n1x.sh.' \ - 'MKINITCPIO_FALLBACK=linux-omarchy' \ - "KERNEL_CMDLINE[fallback]=\"$rescue_cmdline\"" \ - 'EXCLUDE_SNAPSHOT_ENTRIES="Windows*, windows*, *fallback"' \ - 'BOOT_ORDER="linux-omarchy, linux-omarchy-fallback, *, Snapshots"' \ - > /etc/limine-entry-tool.d/zz-omarchy-n1x-boot-order.conf - # GPU policy, decided by the system firmware version. # # Dell's pre-release firmware (0.x, e.g. 0.60.1) leaves the GPU's secure boot @@ -189,6 +165,6 @@ install nvidia_uvm /bin/false CONF fi -# omarchy-n1x-probe collects hardware and boot evidence on demand, from the -# rescue entry or a running system, and uses lspci. +# omarchy-n1x-probe collects hardware and boot evidence on demand and uses +# lspci. omarchy-pkg-add pciutils diff --git a/migrations/1794673542.sh b/migrations/1794673542.sh new file mode 100644 index 000000000000..50f6999b0c17 --- /dev/null +++ b/migrations/1794673542.sh @@ -0,0 +1,12 @@ +echo "Drop the N1x rescue boot entry" + +# N1x laptops booted a text-console rescue entry from a fallback UKI built with +# every module, which cost about a minute on every kernel update and install. +# Release firmware boots the GPU, and snapshots cover recovery. A rebuild with +# no fallback configured removes the fallback UKI and its menu entry. +conf="${OMARCHY_N1X_BOOT_ORDER_CONF:-/etc/limine-entry-tool.d/zz-omarchy-n1x-boot-order.conf}" + +[[ -f $conf ]] || exit 0 + +sudo rm -f "$conf" +sudo limine-mkinitcpio From dd4e3df3c869738a73a38b0c6e581311e5dfe9bb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 15 Nov 2026 10:35:39 +0100 Subject: [PATCH 2/2] Keep the N1x rescue rebuild pending until it finishes Co-Authored-By: Claude Opus 5.5 --- migrations/1794673542.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/migrations/1794673542.sh b/migrations/1794673542.sh index 50f6999b0c17..7b1120e8c08e 100644 --- a/migrations/1794673542.sh +++ b/migrations/1794673542.sh @@ -5,8 +5,16 @@ echo "Drop the N1x rescue boot entry" # Release firmware boots the GPU, and snapshots cover recovery. A rebuild with # no fallback configured removes the fallback UKI and its menu entry. conf="${OMARCHY_N1X_BOOT_ORDER_CONF:-/etc/limine-entry-tool.d/zz-omarchy-n1x-boot-order.conf}" +# Removing the drop-in also removes what this migration looks for, so a marker +# keeps the rebuild pending until it finishes: an interrupted run retries it. +pending="${OMARCHY_N1X_RESCUE_REBUILD_MARKER:-/var/lib/omarchy/migrations/1794673542.pending}" -[[ -f $conf ]] || exit 0 +if [[ -f $conf ]]; then + sudo install -Dm644 /dev/null "$pending" + sudo rm -f "$conf" +fi + +[[ -e $pending ]] || exit 0 -sudo rm -f "$conf" sudo limine-mkinitcpio +sudo rm -f "$pending"