fix(installer): create the EFI partition even with "bootloader --disabled"

On a blank UEFI disk the installed system only booted with the USB key
plugged in (HP OMEN MAX 16, see OMEN-demarrage-sans-cle-usb.md): Anaconda
had created /boot and the LVM PV but no EFI system partition.

The kickstart disables Anaconda's bootloader because Arch has no grub2-*
binaries and GRUB is installed by the %post. Anaconda then sets
skip_bootloader, and schedule_partitions() drops the "efi" request of the
automatic partitioning ("skipping unneeded stage1 efi request"). The
anaconda PKGBUILD now patches that condition so the ESP is still created
when no stage1 partition exists yet.

The first-boot log of that machine also showed fws-grub-finalize writing
GRUB to /dev/sda2, the Ventoy key's EFI partition, because it took the
first ESP of the system. The kickstart and fws-grub-finalize now look on
the disk carrying / first, then on internal disks only, and log a
CRITICAL line instead of borrowing a removable device's ESP.
This commit is contained in:
nocode committed 2026-11-03 12:09:09 +01:00
1 parent 86f326ad65
commit cbdf86fa9f
5 files changed
+85 -18

No files matched your search

+13
View File
@@ -81,6 +81,19 @@ Changed
Fixed
-----
- **Aucune partition EFI n'était créée sur un disque vierge en UEFI : le système ne démarrait qu'avec la
clé USB.** Le kickstart désactive le bootloader d'Anaconda (``bootloader --disabled``, GRUB étant posé
par le ``%post``) ; or Anaconda met alors ``skip_bootloader`` et son partitionnement automatique SAUTE
la requête ``efi`` (« skipping unneeded stage1 efi request », ``partitioning/automatic/utils.py``). Vu
en réel sur un HP OMEN : ``/boot`` + LVM, pas d'ESP, ``grub-install`` sans destination. Le paquet
``anaconda`` de FWS est désormais patché (``pkgbuilds/anaconda``) pour ne garder que l'autre moitié de
la condition — pas de 2e ESP si une partition stage1 existe déjà — : l'ESP (500–600 Mio, montée sur
``/boot/efi``, dans le fstab) est créée comme sur Fedora. Nécessite de reconstruire le paquet
(``./setup-aur.sh``).
- **GRUB pouvait s'installer sur la clé d'installation.** Faute d'ESP sur la cible, le ``%post`` et
``fws-grub-finalize`` prenaient la « première ESP du système » — celle de la clé encore branchée (vu
en réel : partition EFI Ventoy ``/dev/sda2``). La recherche se limite maintenant au disque qui porte
``/`` puis aux disques internes (``RM=0``) ; sans ESP, le journal dit CRITIQUE au lieu de bricoler.
- **Aucun pilote graphique NVIDIA n'était réellement installé.** ``nvidia`` et ``nvidia-dkms``
n'existent plus dans les dépôts Arch — il ne reste que les modules ouverts (``nvidia-open``,
``nvidia-open-dkms``). Le script réclamait ``nvidia-dkms`` : écarté en silence par son filtre de