Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

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

fix: Intel Mac USB boot discovery and EFI compatibility

Remove hybrid MBR that broke Mac firmware discovery, generate Apple
metadata (SystemVersion.plist, mach_kernel) inline, restore BOOTX64.EFI
on ESP, and enable CONFIG_EFI_MIXED + APPLE_GMUX for old Intel Macs.

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

+50 -19
+2 -2
fedac/native/kernel/config-minimal
··· 394 394 CONFIG_EFI=y 395 395 CONFIG_EFI_STUB=y 396 396 CONFIG_EFI_HANDOVER_PROTOCOL=y 397 - # CONFIG_EFI_MIXED is not set 397 + CONFIG_EFI_MIXED=y 398 398 # CONFIG_EFI_RUNTIME_MAP is not set 399 399 # CONFIG_HZ_100 is not set 400 400 CONFIG_HZ_250=y ··· 3366 3366 # CONFIG_AMD_3D_VCACHE is not set 3367 3367 # CONFIG_AMD_WBRF is not set 3368 3368 # CONFIG_ADV_SWBUTTON is not set 3369 - # CONFIG_APPLE_GMUX is not set 3369 + CONFIG_APPLE_GMUX=y 3370 3370 # CONFIG_ASUS_LAPTOP is not set 3371 3371 # CONFIG_ASUS_WIRELESS is not set 3372 3372 # CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
+48 -17
fedac/native/scripts/flash-helper-runner.sh
··· 75 75 cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/KERNEL.EFI" 76 76 rm -f "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 77 77 ;; 78 + kernel-direct) 79 + # Place kernel AS BOOTX64.EFI — standard UEFI fallback path. 80 + # This is discoverable by all UEFI firmware including Intel Macs. 81 + cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 82 + ;; 78 83 *) 79 84 err "Unknown VFAT boot mode: ${boot_mode}" 80 85 return 1 ··· 95 100 96 101 mkdir -p "${mountpoint}/System/Library/CoreServices" 97 102 103 + # Kernel as boot.efi — Apple's expected bootloader path 98 104 cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/System/Library/CoreServices/boot.efi" 99 105 100 - if [ -f /boot/efi/System/Library/CoreServices/SystemVersion.plist ]; then 101 - cp /boot/efi/System/Library/CoreServices/SystemVersion.plist \ 102 - "${mountpoint}/System/Library/CoreServices/SystemVersion.plist" 103 - fi 104 - if [ -f /boot/efi/.VolumeIcon.icns ]; then 105 - cp /boot/efi/.VolumeIcon.icns "${mountpoint}/.VolumeIcon.icns" 106 - fi 107 - if [ -f /boot/efi/mach_kernel ]; then 108 - cp /boot/efi/mach_kernel "${mountpoint}/mach_kernel" 109 - fi 106 + # Also place as standard UEFI fallback (some Mac firmware checks both paths) 107 + mkdir -p "${mountpoint}/EFI/BOOT" 108 + cp "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" "${mountpoint}/EFI/BOOT/BOOTX64.EFI" 109 + 110 + # SystemVersion.plist — required for Mac firmware to identify the volume 111 + cat > "${mountpoint}/System/Library/CoreServices/SystemVersion.plist" << 'PLIST_EOF' 112 + <?xml version="1.0" encoding="UTF-8"?> 113 + <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 114 + <plist version="1.0"> 115 + <dict> 116 + <key>ProductBuildVersion</key> 117 + <string></string> 118 + <key>ProductName</key> 119 + <string>Linux</string> 120 + <key>ProductVersion</key> 121 + <string>AC Native OS</string> 122 + </dict> 123 + </plist> 124 + PLIST_EOF 125 + 126 + # Dummy mach_kernel — expected by Mac firmware for volume identification 127 + echo "Mach Kernel" > "${mountpoint}/mach_kernel" 110 128 129 + # Bless the boot.efi so Mac firmware treats this as a bootable volume 111 130 hfs-bless "${mountpoint}/System/Library/CoreServices/boot.efi" 131 + 112 132 sync 113 133 umount "${mountpoint}" 134 + 135 + # Verify HFS+ integrity after blessing 136 + fsck.hfsplus -yrdfp "${dev}" 2>/dev/null || true 114 137 } 115 138 116 139 verify_partition_layout() { ··· 125 148 local efi_part="$2" 126 149 local mac_part="$3" 127 150 151 + # Partition 1 (ACBOOT): config + KERNEL.EFI, no BOOTX64.EFI 128 152 mount_vfat_partition "${main_part}" /mnt/ac-main 129 153 log "Main config: $(ac_media_summarize_config_file /mnt/ac-main/config.json || echo config=unreadable)" 130 154 test ! -f /mnt/ac-main/EFI/BOOT/BOOTX64.EFI 131 155 sha256sum /mnt/ac-main/EFI/BOOT/KERNEL.EFI "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 132 156 umount /mnt/ac-main 133 157 158 + # Partition 2 (ACEFI): kernel AS BOOTX64.EFI (standard UEFI fallback) 134 159 mount_vfat_partition "${efi_part}" /mnt/ac-efi 135 - test ! -f /mnt/ac-efi/EFI/BOOT/BOOTX64.EFI 136 - sha256sum /mnt/ac-efi/EFI/BOOT/KERNEL.EFI "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 160 + test -f /mnt/ac-efi/EFI/BOOT/BOOTX64.EFI 161 + sha256sum /mnt/ac-efi/EFI/BOOT/BOOTX64.EFI "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 137 162 umount /mnt/ac-efi 138 163 164 + # Partition 3 (AC-MAC): boot.efi + BOOTX64.EFI + Apple metadata 139 165 mount_hfs_partition "${mac_part}" /mnt/ac-mac 140 - test ! -f /mnt/ac-mac/EFI/BOOT/BOOTX64.EFI 141 - test ! -f /mnt/ac-mac/EFI/BOOT/KERNEL.EFI 166 + test -f /mnt/ac-mac/System/Library/CoreServices/boot.efi 167 + test -f /mnt/ac-mac/System/Library/CoreServices/SystemVersion.plist 168 + test -f /mnt/ac-mac/mach_kernel 169 + test -f /mnt/ac-mac/EFI/BOOT/BOOTX64.EFI 142 170 sha256sum /mnt/ac-mac/System/Library/CoreServices/boot.efi "${STAGED_ROOT}/EFI/BOOT/KERNEL.EFI" 143 171 umount /mnt/ac-mac 144 172 } ··· 193 221 mkfs.vfat -F 32 -n ACEFI "${EFI_PART}" >/dev/null 194 222 mkfs.hfsplus -v AC-MAC "${MAC_PART}" >/dev/null 195 223 224 + # Do NOT create a hybrid MBR — old Intel Macs expect standard GPT protective 225 + # MBR (single 0xEE entry). Hybrid MBR confuses Mac firmware discovery. 226 + # Set legacy_boot attribute on main partition for BIOS fallback only. 196 227 sgdisk --attributes=1:set:62 "${USB_DEV}" >/dev/null 2>&1 || true 197 - sgdisk --attributes=2:set:62 "${USB_DEV}" >/dev/null 2>&1 || true 198 - sgdisk --hybrid 3 "${USB_DEV}" >/dev/null 2>&1 || true 199 228 partprobe "${USB_DEV}" 2>/dev/null || true 200 229 230 + # Partition 1 (ACBOOT): config + kernel as KERNEL.EFI (for AC initramfs to find) 201 231 copy_boot_tree_to_vfat "${MAIN_PART}" /mnt/ac-main yes kernel-only 202 - copy_boot_tree_to_vfat "${EFI_PART}" /mnt/ac-efi no kernel-only 232 + # Partition 2 (ACEFI): kernel AS BOOTX64.EFI — standard UEFI fallback path 233 + copy_boot_tree_to_vfat "${EFI_PART}" /mnt/ac-efi no kernel-direct 203 234 populate_mac_partition "${MAC_PART}" /mnt/ac-mac 204 235 205 236 sync