archiso keeps vmlinuz/initramfs in the ISO boot dir, not the squashfs, so unpackfs lays down an empty /boot. The chroot's mkinitcpio/grub-mkconfig had nothing to work with and the ESP ended up empty (firmware found no bootloader). - shellprocess@kernel (dontChroot) copies the live kernel into the target /boot before the bootloader step - post-install.sh now runs grub-install itself, including a --removable pass so firmware with no NVRAM entry still boots via EFI/BOOT/BOOTX64.EFI
24 lines
917 B
Bash
Executable file
24 lines
917 B
Bash
Executable file
#!/bin/bash
|
|
# Copy the live kernel into the freshly-unpacked target /boot.
|
|
#
|
|
# archiso keeps vmlinuz/initramfs in the ISO boot dir (arch/boot/x86_64/), NOT
|
|
# in the squashfs, so the rootfs that unpackfs lays down has an empty /boot.
|
|
# Without a kernel, the chroot's `mkinitcpio -P` and `grub-mkconfig` produce
|
|
# nothing and the installed system is unbootable.
|
|
#
|
|
# Runs in the LIVE environment (Calamares shellprocess, dontChroot) so it can
|
|
# read /run/archiso/bootmnt; the target root mount point is passed as $1.
|
|
set -uo pipefail
|
|
|
|
ROOT="${1:?target root required}"
|
|
SRC="/run/archiso/bootmnt/arch/boot/x86_64"
|
|
|
|
install -d -m 0755 "$ROOT/boot"
|
|
cp -f "$SRC/vmlinuz-linux" "$ROOT/boot/vmlinuz-linux"
|
|
|
|
# Microcode, if the live medium carries it (grub-mkconfig picks it up).
|
|
for u in amd-ucode.img intel-ucode.img; do
|
|
[ -f "$SRC/$u" ] && cp -f "$SRC/$u" "$ROOT/boot/$u"
|
|
done
|
|
|
|
echo "Copied live kernel into $ROOT/boot"
|