Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: flash helper uses BOOTX64.EFI as staged kernel path

media-layout.sh stages the kernel as BOOTX64.EFI (kernel-direct mode)
but flash-helper-runner.sh still referenced KERNEL.EFI, causing
"cannot stat KERNEL.EFI" during USB flash. Updated all staged-root
reads and verification checks to match the current layout.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+20 -13
+20 -13
fedac/native/scripts/flash-helper-runner.sh
··· 66 66 67 67 mount_vfat_partition "${dev}" "${mountpoint}" 68 68 mkdir -p "${mountpoint}/EFI/BOOT" 69 + # Staged tree uses BOOTX64.EFI as the canonical full kernel path 70 + # (set by ac_media_stage_boot_tree in media-layout.sh). 71 + local STAGED_KERNEL="${STAGED_ROOT}/EFI/BOOT/BOOTX64.EFI" 72 + 69 73 case "${boot_mode}" in 70 74 chainloader) 71 - cp "${STAGED_ROOT}/EFI/BOOT/BOOTX64.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 72 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 75 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 76 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 73 77 ;; 74 78 kernel-only) 75 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 79 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 76 80 rm -f "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 77 81 ;; 78 82 kernel-direct) 79 83 # Place kernel AS BOOTX64.EFI — standard UEFI fallback path. 80 84 # This is discoverable by all UEFI firmware including Intel Macs. 81 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 85 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 82 86 ;; 83 87 systemd-boot) 84 88 # Universal boot: splash.efi → systemd-boot → slim kernel + initramfs. ··· 88 92 [ ! -f "${sdboot}" ] && sdboot="/repo/fedac/native/boot/systemd-bootx64.efi" 89 93 [ ! -f "${sdboot}" ] && sdboot="/workspaces/aesthetic-computer/fedac/native/boot/systemd-bootx64.efi" 90 94 # splash.efi as BOOTX64.EFI (shows splash, chains to LOADER.EFI) 91 - cp "${STAGED_ROOT}/EFI/BOOT/BOOTX64.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 95 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 92 96 # systemd-boot as LOADER.EFI (loads slim kernel + initramfs) 93 97 cp "${sdboot}" "${mountpoint}/EFI/BOOT/LOADER.EFI" 94 98 # Use slim kernel if available, fall back to full kernel 95 99 if [ -f "${STAGED_ROOT}/EFI/BOOT/KERNEL-SLIM.EFI" ]; then 96 100 cp "${STAGED_ROOT}/EFI/BOOT/KERNEL-SLIM.EFI" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 97 101 else 98 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 102 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 99 103 fi 100 104 # Separate initramfs for systemd-boot to load (prefer gzip, fall back to lz4) 101 105 if [ -f "${STAGED_ROOT}/initramfs.cpio.gz" ]; then ··· 131 135 local dev="$1" 132 136 local mountpoint="$2" 133 137 138 + local STAGED_KERNEL="${STAGED_ROOT}/EFI/BOOT/BOOTX64.EFI" 139 + 134 140 if mount_hfs_partition "${dev}" "${mountpoint}" 2>/dev/null; then 135 141 # Native mount succeeded — populate directly 136 142 mkdir -p "${mountpoint}/System/Library/CoreServices" 137 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/System/Library/CoreServices/boot.efi" 143 + cp "${STAGED_KERNEL}" "${mountpoint}/System/Library/CoreServices/boot.efi" 138 144 mkdir -p "${mountpoint}/EFI/BOOT" 139 - cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 145 + cp "${STAGED_KERNEL}" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 140 146 cat > "${mountpoint}/System/Library/CoreServices/SystemVersion.plist" << 'PLIST_EOF' 141 147 <?xml version="1.0" encoding="UTF-8"?> 142 148 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> ··· 185 191 local main_part="$1" 186 192 local efi_part="$2" 187 193 local mac_part="$3" 194 + local STAGED_KERNEL="${STAGED_ROOT}/EFI/BOOT/BOOTX64.EFI" 188 195 189 - # Partition 1 (ACBOOT): config + KERNEL.EFI, no BOOTX64.EFI 196 + # Partition 1 (ACBOOT): config + kernel as BOOTX64.EFI (kernel-direct mode) 190 197 mount_vfat_partition "${main_part}" /mnt/ac-main 191 198 log "Main config: $(ac_media_summarize_config_file /mnt/ac-main/config.json || echo config=unreadable)" 192 - test ! -f /mnt/ac-main/EFI/BOOT/BOOTX64.EFI 193 - sha256sum /mnt/ac-main/EFI/BOOT/KERNEL.EFI "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 199 + test -f /mnt/ac-main/EFI/BOOT/BOOTX64.EFI 200 + sha256sum /mnt/ac-main/EFI/BOOT/BOOTX64.EFI "${STAGED_KERNEL}" 194 201 umount /mnt/ac-main 195 202 196 203 # Partition 2 (ACEFI): systemd-boot BOOTX64.EFI + KERNEL.EFI ··· 198 205 test -f /mnt/ac-efi/EFI/BOOT/BOOTX64.EFI 199 206 test -f /mnt/ac-efi/EFI/BOOT/KERNEL.EFI 200 207 test -f /mnt/ac-efi/loader/entries/ac-native.conf 201 - sha256sum /mnt/ac-efi/EFI/BOOT/KERNEL.EFI "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 208 + sha256sum /mnt/ac-efi/EFI/BOOT/KERNEL.EFI "${STAGED_KERNEL}" 202 209 umount /mnt/ac-efi 203 210 204 211 # Partition 3 (AC-MAC): boot.efi + BOOTX64.EFI + Apple metadata ··· 207 214 test -f /mnt/ac-mac/System/Library/CoreServices/SystemVersion.plist 208 215 test -f /mnt/ac-mac/mach_kernel 209 216 test -f /mnt/ac-mac/EFI/BOOT/BOOTX64.EFI 210 - sha256sum /mnt/ac-mac/System/Library/CoreServices/boot.efi "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 217 + sha256sum /mnt/ac-mac/System/Library/CoreServices/boot.efi "${STAGED_KERNEL}" 211 218 umount /mnt/ac-mac 212 219 else 213 220 log "HFS+ mount unavailable for verification — checking via fsck"