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:
5 files changed
+85
-18
No files matched your search
@@ -25,7 +25,7 @@
|
||||
# ============================================================================
|
||||
pkgname=anaconda
|
||||
pkgver=45.8
|
||||
pkgrel=5
|
||||
pkgrel=6
|
||||
pkgdesc="The Anaconda installer (porté sur Arch pour FWS, payload liveimg)"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/rhinstaller/anaconda"
|
||||
@@ -178,6 +178,21 @@ s = s.replace(ap, ap + '''
|
||||
open(p, 'w', encoding='utf-8').write(s)
|
||||
print("FWS: champ Hostname ajouté au spoke Utilisateur (glade + user.py)")
|
||||
PYEOF
|
||||
|
||||
# ── FWS : créer l'ESP même avec « bootloader --disabled » ─────────────────
|
||||
# Le kickstart désactive le bootloader d'Anaconda (grub2-install n'existe pas
|
||||
# sur Arch, GRUB est posé par le %post). Or execution.py met alors
|
||||
# skip_bootloader=True, et schedule_partitions() SAUTE la requête « efi » du
|
||||
# partitionnement automatique (« skipping unneeded stage1 efi request »).
|
||||
# Résultat vu en réel (HP OMEN, NVMe vierge, UEFI) : /boot + LVM, AUCUNE
|
||||
# partition EFI → grub-install n'avait nulle part où écrire, et la machine ne
|
||||
# démarrait qu'avec la clé USB branchée. On ne garde que l'autre moitié de la
|
||||
# condition : ne pas créer de 2e ESP si une partition stage1 existe déjà.
|
||||
sed -i \
|
||||
's/^\(\s*\)(storage\.bootloader\.skip_bootloader or stage1_device):$/\1stage1_device: # FWS: ESP créée même sans bootloader Anaconda/' \
|
||||
pyanaconda/modules/storage/partitioning/automatic/utils.py
|
||||
grep -q 'stage1_device: # FWS: ESP' \
|
||||
pyanaconda/modules/storage/partitioning/automatic/utils.py
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in new issue
Block a user