Commit bc4f90f
committed
kickstart: Fix multi-ESP install and GRUB boot on RAID 1
Three issues prevented a successful Anaconda-based bootc install onto a
RAID 1 array with per-disk ESP partitions:
1. Bind mount failure during ostreecontainer payload install:
Anaconda mounts the root FS at /mnt/sysimage and then tries to
bind-mount /mnt/sysimage/boot/efi2 and /boot/efi3 into /mnt/sysroot.
However, it does not create the mount point directories for the
secondary ESPs before the bind mount, causing:
mount: /mnt/sysroot/boot/efi2: special device
/mnt/sysimage/boot/efi2 does not exist.
Fix: add a %pre-install script that creates the directories after
the root FS is mounted but before the payload runs.
2. Empty secondary ESPs after installation:
Anaconda only installs the bootloader (shim, GRUB, grub.cfg) to the
primary ESP at /boot/efi. The secondary ESPs (efi2, efi3) are
formatted and mounted but receive no bootloader files. Additionally,
the 'noauto' fsoption causes Anaconda to unmount them before %post.
Fix: add a %post --nochroot script that explicitly mounts each
secondary ESP by device path and copies the full EFI directory tree
from the primary ESP.
3. GRUB cannot find the kernel on the RAID root filesystem:
The GRUB EFI binary shipped with CentOS Stream 10 does not include
the mdraid1x module. GRUB's grub.cfg uses 'search --fs-uuid' to
locate the root filesystem and load the kernel from the ostree
deployment path, but it cannot access the md array.
Fix: add a separate /boot partition (ext4, 1G) on the primary disk.
GRUB can read ext4 natively without mdraid support. The kernel and
initramfs live on /boot, and the initramfs handles RAID assembly
for the root filesystem during boot.
Note: /boot is only on vda (not mirrored), so only disk 1 can boot
independently. Full boot redundancy from any disk would require either
whole-disk RAID (where GRUB reads from the raw mirror) or a GRUB build
with mdraid1x support. This is a known limitation tracked in:
- bootc-dev/bootc#1911
- coreos/bootupd#10771 parent e4fb36b commit bc4f90f
1 file changed
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments