Files
FWS-ISO/configs/releng
nocode b27378eed3 fix(boot): never write NVRAM on Intel RST machines
Seen on real RST hardware: the installed system boots once, then never again,
the firmware no longer finding a bootable disk.

What is established. In the installer's chroot efivars is not reachable, so
nothing is written to NVRAM and the firmware boots EFI/BOOT/BOOTX64.EFI, which
it finds by scanning the ESP. That first boot works. Then fws-grub-finalize runs
grub-install again, and this time efivars answers: it creates a "FWS" entry and
puts it first in the boot order. That is the only thing this chain changes at
firmware level between the two boots, and firmware level is where the second
one fails.

What is assumed, not verified for lack of a VMD machine: why that entry is
unusable. Under VMD, Linux sees the NVMe in a synthetic PCI domain (10000:...)
that the vmd module creates and the firmware knows nothing about, so a device
path computed from that view resolves to nothing. "efibootmgr -v" on an
affected machine would settle it.

On any machine with an Intel VMD controller, FWS now relies solely on the
--removable path, which the first boot proves works. Detection goes through
fws-intel-rst (exit codes 10/11/12), the project's single VMD logic. Machines
without VMD are untouched and keep their NVRAM entry.

There were three NVRAM writers, and all three are gated:

- the kickstart %post, where the write fails anyway today but would break even
  the first boot in an environment that exposed efivars to the chroot;
- fws-grub-finalize, both grub-install and the efibootmgr -c fallback;
- fws-recovery, which was the worst of them. It goes through arch-chroot, and
  unlike Anaconda's chroot, arch-chroot mounts efivars, so the write succeeded
  there, from the ISO as well as from the installed system. A user whose RST
  machine would not boot would run "Réparer FWS", and the repair would recreate
  exactly the entry that stops it from booting.

Also in fws-grub-finalize: two lsblk calls took the disk from "lsblk -s", which
draws a tree, and got "└─/dev/nvme0n1" (checked on a real NVMe). The efibootmgr
fallback therefore always received a garbage device and never created its
entry, and the ESP search could fall back to the first ESP on the system,
Windows' on a dual-boot. The kickstart had already fixed this very trap in its
BIOS branch; the UEFI branch here had been missed. Fixing it alone would have
re-armed the efibootmgr writer on VMD, which is why it lands together with the
gate.

Tested by replacing the system tools with recording stubs: fws-grub-finalize
and fws-recovery each over five cases (no VMD, VMD in its three states, engine
missing), plus the engine's six detection cases. In every case the --removable
path is still installed, since on these machines it becomes the only way in.

Signed-off-by: nocode <suzuku295@gmail.com>
2026-09-22 15:56:06 +02:00
..
2026-04-02 15:32:15 +02:00
2026-04-02 15:32:15 +02:00
2026-04-02 15:32:15 +02:00