···11+# Intel Mac USB Boot Debug Handoff
22+33+Prepared on 2026-03-29 from the local flashing/debugging session in `/workspaces/aesthetic-computer`.
44+55+## Goal
66+77+Get `fedac/native` USB media to appear and boot reliably on an older Intel MacBook while preserving per-user `config.json` and the recent hybrid-media work.
88+99+## Current Repo State
1010+1111+At the time of this note:
1212+1313+- Branch: `main`
1414+- HEAD: `39f4a773c`
1515+- Worktree: clean before adding this report
1616+1717+The current checked-in native changes already include:
1818+1919+- `fedac/native/ac-os`
2020+ - `build_kernel()` now stages built-in firmware from `/usr/lib/firmware` or `/lib/firmware`, including nested paths like `i915/glk_dmc_ver1_04.bin`.
2121+- `fedac/native/initramfs/init`
2222+ - USB mount logic now prefers a FAT partition with `config.json` before falling back to FAT partitions that only have boot files.
2323+- `fedac/native/src/ac-native.c`
2424+ - Display-failure diagnostics now write to `/mnt/ac-init.log` instead of `/mnt/usb/ac-init.log`.
2525+- `fedac/native/scripts/flash-helper-runner.sh`
2626+ - This file is where the Intel-Mac-specific boot-media behavior was being iterated during this session.
2727+2828+## Build Result
2929+3030+A fresh local kernel build completed successfully during this session.
3131+3232+- `fedac/native/build/vmlinuz`
3333+- Size: `282571776`
3434+- SHA256: `09e1f63b92540d12a0f5209b5566894540f9c53e776cedd9aa557a23dabdbb0b`
3535+3636+## What Happened
3737+3838+### 1. Initial hybrid flash was discoverable but wrong on the Mac
3939+4040+The first hybrid-media flash produced 3 visible `EFI Boot` entries on the old Intel MacBook.
4141+4242+Local verification showed why:
4343+4444+- partition 1 (`ACBOOT`) had `config.json`, `EFI/BOOT/BOOTX64.EFI`, and `EFI/BOOT/KERNEL.EFI`
4545+- partition 2 (`ACEFI`) had the same boot tree
4646+- partition 3 (`AC-MAC`) had the same boot tree plus a blessed Mac path
4747+4848+That matched the Mac behavior: 3 generic boot targets.
4949+5050+The user reported:
5151+5252+- all 3 `EFI Boot` entries appeared
5353+- each one crashed/rebooted back into macOS
5454+5555+At the same time, the USB had no runtime logs written back to the writable partition. That strongly suggested the failure was happening before Linux userland mounted the writable FAT partition.
5656+5757+### 2. First attempt to force a single Mac target regressed too far
5858+5959+The next iteration tried to force a single Apple-visible target by:
6060+6161+- removing `BOOTX64.EFI` from the FAT helper partitions
6262+- hiding the FAT partitions in partition metadata
6363+- leaving only a blessed HFS Mac path
6464+- using a direct-kernel `boot.efi` on the HFS partition
6565+6666+This was the version the user tried next, and the old Intel MacBook did not show the stick at all.
6767+6868+That is the key regression.
6969+7070+### 3. The USB then became awkward to rewrite cleanly in-place
7171+7272+After one interrupted rewrite, `/dev/sda1` remained kernel-busy inside the privileged helper environment:
7373+7474+- `mkfs.vfat /dev/sda1` kept returning `Device or resource busy`
7575+- `sda2` and `sda3` were still writable
7676+- `sda1` could not be cleanly reformatted again during this session
7777+7878+Because of that, later updates were done in-place on `sda2` and `sda3` rather than from a perfectly clean full reprovision.
7979+8080+## Current USB State
8181+8282+The most recent local write left the stick in this state:
8383+8484+- GPT still has 3 partitions:
8585+ - `sda1` `ACBOOT`
8686+ - `sda2` `ACEFI`
8787+ - `sda3` `AC-MAC`
8888+- Hybrid MBR currently advertises only the Apple HFS partition:
8989+ - protective entry
9090+ - `0xAF` for the HFS partition
9191+- `sda2` was refreshed and verified to contain:
9292+ - `config.json`
9393+ - `EFI/BOOT/KERNEL.EFI`
9494+ - no `EFI/BOOT/BOOTX64.EFI`
9595+- `sda3` was refreshed with:
9696+ - `System/Library/CoreServices/boot.efi`
9797+ - that file’s SHA256 matched the rebuilt kernel hash above
9898+9999+Important caveat:
100100+101101+- this exact latest USB state was not re-tested by the user on the old MacBook before this report was requested
102102+- the last user-observed result on the old MacBook was still: “did not show up at all”
103103+104104+## Source-Backed Findings
105105+106106+The web check suggests the “hide everything except one blessed HFS file” approach was too improvised and not close enough to the Fedora path.
107107+108108+### Fedora docs
109109+110110+Fedora’s `livecd-iso-to-disk --efi` docs explicitly say that this mode is necessary for most Intel Macs and can create up to 3 partitions:
111111+112112+- main image partition
113113+- EFI helper partition from `/images/efiboot.img`
114114+- HFS+ Mac helper partition from `/images/macboot.img`
115115+116116+Source:
117117+118118+- https://raw.githubusercontent.com/livecd-tools/livecd-tools/master/docs/livecd-iso-to-disk.pod
119119+120120+### Fedora implementation
121121+122122+The `livecd-iso-to-disk.sh` source does not treat the Mac helper partition as “just write one arbitrary `boot.efi` file.” It formats the HFS partition and copies the contents of `macboot.img` into it.
123123+124124+Source:
125125+126126+- https://raw.githubusercontent.com/livecd-tools/livecd-tools/main/tools/livecd-iso-to-disk.sh
127127+128128+### Fedora Mac EFI notes
129129+130130+Fedora’s Intel Mac EFI notes emphasize:
131131+132132+- HFS+ blessing matters
133133+- Apple-visible boot media needs Apple-style metadata, not just a generic GPT ESP
134134+135135+Source:
136136+137137+- https://fedoraproject.org/wiki/User%3APjones/MacCDsForEFI
138138+139139+### Apple boot path
140140+141141+Apple’s booting documentation describes `/System/Library/CoreServices/boot.efi` as the standard bootloader path for the simplest boot configuration.
142142+143143+Source:
144144+145145+- https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/booting/booting.html
146146+147147+### HFS blessing tool
148148+149149+`hfs-bless` is explicitly meant to make an HFS+ filesystem bootable for EFI Apple hardware.
150150+151151+Source:
152152+153153+- https://www.mankier.com/1/hfs-bless
154154+155155+## Best Current Reading
156156+157157+The safest reading is:
158158+159159+- the older Intel MacBook is sensitive to the exact Apple helper partition layout
160160+- the first “3 EFI Boot” result showed the stick was at least discoverable
161161+- the later “single visible target” rewrite likely removed or distorted something the old Mac firmware needed for discovery
162162+- Fedora’s documented path is closer to “separate helper images for EFI and Mac” than to the custom hidden-partition approach used in the later local experiment
163163+164164+## Recommended Next Step
165165+166166+Claude should optimize for “shows up and boots” first, not for deduplicating the Option-boot picker.
167167+168168+Recommended order:
169169+170170+1. Move `fedac/native/scripts/flash-helper-runner.sh` back toward a Fedora-style discoverable layout.
171171+2. Stop hiding the helper FAT partition(s) until boot discovery is stable on the old MacBook.
172172+3. Recreate a proper Mac helper partition rather than treating partition 3 as only a hand-written `boot.efi` drop.
173173+4. Once the stick reliably appears and boots, then iterate on reducing duplicate Option-boot entries.
174174+175175+## Practical Notes For Claude
176176+177177+- Do not assume the current USB contents are a clean baseline. `sda1` became sticky/busy after an interrupted rewrite.
178178+- The rebuilt kernel artifact is good and verified.
179179+- The biggest unresolved problem is old-Intel-Mac discovery semantics, not Linux kernel compilation.
180180+- If you need a fully clean USB reprovision, physically replugging the stick may be the fastest way to clear the stale `sda1` busy state before retrying.