revert(installer): undo grub-install changes that introduced PXE boot loop

The --no-nvram flag removed the UEFI NVRAM boot entry, causing firmware to
fall through to PXE on every reboot. Restore original --recheck behaviour
which was confirmed working in manual testing.
This commit is contained in:
joshsiv-mulga
2026-05-14 11:16:53 +10:00
parent 54a1c29ed5
commit 7dd3af3848
+2 -4
View File
@@ -539,8 +539,7 @@ func installBootloader(disk string) error {
"--boot-directory="+bootDir,
"--bootloader-id=spinifex",
"--removable",
"--no-nvram",
"--skip-fs-probe",
"--recheck",
)
if efiErr != nil {
slog.Warn("installBootloader: EFI install failed", "err", efiErr)
@@ -548,7 +547,7 @@ func installBootloader(disk string) error {
if biosErr := run("grub-install",
"--target=i386-pc",
"--boot-directory="+bootDir,
"--skip-fs-probe",
"--recheck",
disk,
); biosErr != nil {
if efiErr != nil {
@@ -575,7 +574,6 @@ GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=Spinifex
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200 systemd.show_status=1"
GRUB_DISABLE_OS_PROBER=true
`
if err := os.WriteFile(filepath.Join(mountRoot, "etc/default/grub"), []byte(grubDefault), 0o644); err != nil {