diff --git a/deploy/nixos/hardware/upboard.nix b/deploy/nixos/hardware/upboard.nix index 163b795..26e2842 100644 --- a/deploy/nixos/hardware/upboard.nix +++ b/deploy/nixos/hardware/upboard.nix @@ -24,9 +24,20 @@ "usb_storage" "sd_mod" "sdhci_pci" + "sdhci-acpi" # UP Board sintra: eMMC controller is ACPI-enumerated, not PCI + "mmc_block" # creates /dev/mmcblk* block-device nodes "i915" ]; + # Force-load the eMMC stack in stage 1 so root-by-label resolves before + # the kernel hands off to switch_root. Without this, initramfs panics + # with "An error occurred in stage 1 of the boot process" because + # /dev/disk/by-label/nixos never materialises in time. + initrd.kernelModules = [ + "sdhci-acpi" + "mmc_block" + ]; + kernelModules = [ "kvm-intel" "i2c-dev" @@ -45,14 +56,19 @@ ]; }; - # Disk layout: GPT with ESP + ext4 root (eMMC on UP Board) + # Disk layout: GPT with ESP + ext4 root (eMMC on UP Board). + # Labels match what make-disk-image.nix with partitionTableType="efi" + # produces — ESP for the FAT partition, nixos for the ext4 root. We + # previously expected `by-label/boot` here and had to manually + # `fatlabel` the partition post-flash; aligning the label avoids + # that hand-step on future re-flashes. (douro.nix already uses ESP.) fileSystems."/" = { device = "/dev/disk/by-label/nixos"; fsType = "ext4"; }; fileSystems."/boot" = { - device = "/dev/disk/by-label/boot"; + device = "/dev/disk/by-label/ESP"; fsType = "vfat"; };