From 970e4f4dc672c0de5ce7d015480e00c677709fda Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 18 Sep 2026 12:42:46 -0700 Subject: [PATCH] =?UTF-8?q?flash-mac:=20mount=20FAT=20via=20diskutil=20fir?= =?UTF-8?q?st=20=E2=80=94=20macOS=2027=20won't=20load=20the=20msdosfs=20ke?= =?UTF-8?q?xt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mount_msdos died with "msdos filesystem is not available" (Bad code signature on the codeless kext) after the stick had already been wiped. diskutil mounts through FSKit there and still works on older releases; mount_msdos remains the fallback. The cleanup trap unmounts either way. Co-Authored-By: Claude Fable 5.1 --- fedac/native/scripts/flash-mac.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fedac/native/scripts/flash-mac.sh b/fedac/native/scripts/flash-mac.sh index 8250c39c6c..703ea905ef 100755 --- a/fedac/native/scripts/flash-mac.sh +++ b/fedac/native/scripts/flash-mac.sh @@ -440,11 +440,20 @@ newfs_msdos -F 32 -v ACEFI "${RAW2}" >/dev/null # --- mount --- M1=$(mktemp -d /tmp/ac-main.XXXXXX) M2=$(mktemp -d /tmp/ac-efi.XXXXXX) -trap "umount '${M1}' 2>/dev/null; umount '${M2}' 2>/dev/null; rmdir '${M1}' '${M2}' 2>/dev/null; rm -f '${PRESERVE_WIFI}' '${BAKED_INITRAMFS:-}' 2>/dev/null; true" EXIT - +trap "umount '${M1}' 2>/dev/null || diskutil unmount '${M1}' >/dev/null 2>&1; umount '${M2}' 2>/dev/null || diskutil unmount '${M2}' >/dev/null 2>&1; rmdir '${M1}' '${M2}' 2>/dev/null; rm -f '${PRESERVE_WIFI}' '${BAKED_INITRAMFS:-}' 2>/dev/null; true" EXIT + +# macOS 27 refuses to load the legacy msdosfs kext ("Bad code signature"), +# so mount_msdos dies with "msdos filesystem is not available". diskutil +# mounts FAT through FSKit there and still works on older releases, so it +# goes first; mount_msdos stays as the fallback for anything diskutil +# won't mount at an explicit mount point. +mount_fat() { # $1=partition device $2=mount point + diskutil mount -mountPoint "$2" "$1" >/dev/null 2>&1 && return 0 + mount_msdos "$1" "$2" +} log "Mounting partitions…" -mount_msdos "${P1}" "${M1}" -mount_msdos "${P2}" "${M2}" +mount_fat "${P1}" "${M1}" +mount_fat "${P2}" "${M2}" # --- layout ACBOOT (kernel-direct + config) --- log "Writing ACBOOT (kernel-direct boot tree)…" -- 2.51.2