Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion N1X.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ The **USB stick** boots the installer without showing a menu. Press Esc while it
The **installed system** (Limine) offers:

- **linux-omarchy**, the normal desktop. It boots by default.
- **linux-omarchy-fallback**, the rescue entry. It boots the same system to a text login with the NVIDIA driver blocked and Plymouth off; use it if the desktop comes up black. It is rebuilt with every kernel update.
- **Snapshots**, once Omarchy has taken some.

`sudo omarchy-n1x-probe` records hardware and boot details to `/var/log/omarchy-n1x-probe.log` on demand.
Expand Down
19 changes: 4 additions & 15 deletions configs/airootfs/usr/share/omarchy-iso/orchestrator/phases_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2797,8 +2797,8 @@ def finalize_limine_boot(ctx: InstallContext) -> None:
info("› BIOS firmware; the pre-built UKI is UEFI-only, building the boot files on this machine")

# A board with a platform of its own boots by its hardware scripts' rules
# (the N1x: the console on the panel in every entry, a fallback UKI as the
# rescue entry; validate_boot checks them), which limine-mkinitcpio applies
# (the N1x: the console on the panel in every entry, which validate_boot
# checks), which limine-mkinitcpio applies
# and a UKI built in the image cannot know. Every other machine, a generic
# aarch64 one included, takes the image's UKI.
if prebuilt_uki.is_file() and not skip_prebuilt and arch.has_uefi() and not _arm_platform_boot():
Expand Down Expand Up @@ -3363,9 +3363,8 @@ def _validate_package_signing(ctx: InstallContext, mirror: Path = OFFLINE_MIRROR
# The N1x firmware publishes an ACPI SPCR serial console the kernel adopts
# unless told otherwise, and Limine hands each entry's cmdline to the UKI as
# load options that replace the embedded one. So the contract has to hold in
# the generated limine.conf itself: every entry keeps the console on the panel,
# and the rescue entry boots to a text login. Both failures look like a black
# screen, which is how the first N1x installs went.
# the generated limine.conf itself: every entry keeps the console on the panel.
# Losing it looks like a black screen, which is how the first N1x installs went.
N1X_REQUIRED_CMDLINE = ("console=tty0", "acpi=nospcr")


Expand Down Expand Up @@ -3449,16 +3448,6 @@ def _validate_platform_boot_entries(limine_conf_text: str, arm_platform: str, ke
f"limine.conf entry {name} lacks {' '.join(missing)}; its console would go to the SPCR serial port"
)

# The rescue entry is the kernel's fallback UKI, booted with its own cmdline.
rescue_name = f"{kernel}-fallback"
rescue = [options for _, options in kernels if f"_{rescue_name}.efi" in options.get("path", "")]
if not rescue:
raise RuntimeError(f"limine.conf has no {rescue_name} rescue entry")
for options in rescue:
cmdline = options.get("cmdline", "").split()
if "systemd.unit=multi-user.target" not in cmdline or "plymouth.enable=0" not in cmdline:
raise RuntimeError(f"{rescue_name} entry does not boot to a text login; its own cmdline was overridden")


def _validate_linux_boot_entry(esp_mount: Path, config_text: str, encrypted: bool) -> None:
"""Check the kernel and initramfs that limine-entry-tool copied to the ESP."""
Expand Down
33 changes: 3 additions & 30 deletions test/unit/test_n1x_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,14 @@
)
PLAIN_ROOT_CMDLINE = "root=PARTUUID=f073914b-b386-4b56-b181-61ea375509ee zswap.enabled=0 rootflags=subvol=@ rw rootfstype=btrfs"
KERNEL = "linux-omarchy"
RESCUE_CMDLINE = (
f"{ROOT_CMDLINE} console=tty0 acpi=nospcr plymouth.enable=0 nomodeset "
"systemd.unit=multi-user.target fbcon=map:0 loglevel=7"
)
NORMAL_CMDLINE = (
" quiet splash loglevel=0 console=tty0 acpi=nospcr loglevel=7 systemd.show_status=1 "
f"initramfs_async=0 {ROOT_CMDLINE}"
)


# Shaped like the limine.conf limine-entry-tool writes for linux-omarchy with
# its fallback UKI as the rescue entry.
def limine_conf(rescue_cmdline=RESCUE_CMDLINE, normal_cmdline=NORMAL_CMDLINE, rescue=True):
rescue_entry = f"""\
//linux-omarchy-fallback
comment: Kernel version: 7.2.8-8-omarchy
comment: kernel-id=linux-omarchy-fallback
protocol: efi
path: boot():/EFI/Linux/omarchy_linux-omarchy-fallback.efi#5187fcdd
cmdline: {rescue_cmdline}
""" if rescue else ""
# Shaped like the limine.conf limine-entry-tool writes for linux-omarchy.
def limine_conf(normal_cmdline=NORMAL_CMDLINE):
return f"""\
timeout: 3
default_entry: 2
Expand All @@ -57,7 +44,7 @@ def limine_conf(rescue_cmdline=RESCUE_CMDLINE, normal_cmdline=NORMAL_CMDLINE, re
protocol: efi
path: boot():/EFI/Linux/omarchy_linux-omarchy.efi#1ebecba8
cmdline: {normal_cmdline}
{rescue_entry}

/EFI fallback
comment: Default EFI loader
protocol: efi
Expand Down Expand Up @@ -146,20 +133,6 @@ def test_parameter_must_be_a_whole_token(self):
with self.assertRaisesRegex(RuntimeError, "lacks console=tty0"):
self.validate(limine_conf(normal_cmdline=f"console=tty0,115200 acpi=nospcr {ROOT_CMDLINE}"), "n1x")

def test_missing_rescue_entry_fails(self):
with self.assertRaisesRegex(RuntimeError, "no linux-omarchy-fallback rescue entry"):
self.validate(limine_conf(rescue=False), "n1x")

# The 2026-09-03 failure: the rescue entry carried the normal cmdline, so
# it booted the graphical target like the normal entry.
def test_rescue_with_the_normal_cmdline_fails(self):
with self.assertRaisesRegex(RuntimeError, "does not boot to a text login"):
self.validate(limine_conf(rescue_cmdline=NORMAL_CMDLINE), "n1x")

def test_rescue_with_plymouth_fails(self):
with self.assertRaisesRegex(RuntimeError, "does not boot to a text login"):
self.validate(limine_conf(rescue_cmdline=RESCUE_CMDLINE.replace(" plymouth.enable=0", "")), "n1x")

def test_no_kernel_entries_fails(self):
with self.assertRaisesRegex(RuntimeError, "no kernel entries"):
self.validate("timeout: 3\n/EFI fallback\nprotocol: efi\npath: boot():/EFI/BOOT/BOOTAA64.EFI\n", "n1x")
Expand Down
Loading