# Wipe the drive and create a fresh GPT table with a single EFI partition
# (Using sgdisk for non-interactive precision)
sudo sgdisk --zap-all /dev/sdg
sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdg
# Format the partition as FAT32 (MS-DOS)
# Macs expect the EFI loader on a standard FAT32 filesystem.
sudo mkfs.vfat -F 32 /dev/sdg1
# Mount the ISO and the USB
mkdir -p /mnt/iso /mnt/tmp
sudo mount -o loop debian-13-netinst.iso /mnt/iso
sudo mount /dev/sdg1 /mnt/tmp
# Copy the contents using rsync (better for preservation and progress)
# We use -a to preserve structure and -h for human-readable output.
sudo rsync -ah --progress /mnt/iso/ /mnt/tmp/
# The Critical Step: Ensure the EFI loader is in the "Default" path
# Apple's firmware looks specifically for this file to populate the Boot Picker.
# It should already be there from the ISO, but verify it:
ls -l /mnt/tmp/EFI/BOOT/BOOTX64.EFI
# Flush the buffers and unmount
sync
sudo umount /mnt/iso /mnt/tmp
Created
March 7, 2026 03:03
-
-
Save daryltucker/0a5ad8e8532b42f22181d2d5cecb2c10 to your computer and use it in GitHub Desktop.
# OSX / Macbook Linux Thumb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment