diskutil (macOS)
Note: This is specific to macOS and it's diskutil
program.
Nintendo GameCube/Wii
# determine the device node:
disk='/dev/disk2'
diskutil info ${disk}
# Deaktivate the Volume with diskutil
diskutil unmountDisk ${disk}
#Create new Volume:
newfs_msdos -F 32 -v WII_GS -c 1 ${disk}
# -F = FAT-type (12,16 or 32)
# -c cluster-size (2^n)
#The cluster size -c 1 will create the size of 512 Byte
# WII Format and Layout
diskutil eraseDisk FAT32 WII_GS MBRFormat /dev/disk2
# Create wbfs Directory
mkdir /Volumes/WII_GS/wbfs
# Game Structure = Game Title [XNXP0X]
# GameCube Format and Layout
newfs_msdos -F 32 -v GC_USB -S 512 -c 32 /dev/disk2
EFI snippets
I attempted to manually create the EFI bit for a macOS USB Installer. I'd advise to use the macOS installation tool for that and only do adjustments afterwards.
diskutil unmountDisk disk2
# Erase Disk as Free Space
diskutil eraseDisk free USB /dev/disk2
diskutil partitionDisk /dev/disk2 GPT JHFS+ macos R
# FAT32 (Note the UpperCase Title)
diskutil partitionDisk /dev/disk2 GPT FAT32 MACOS R
# EFI (Non macOS)
diskutil partitionDisk disk2 GPT \
fat32 EFI 550MiB \
HFS+ macos R
# Create Empty GPT Formatted Stick
diskutil partitionDisk disk2 GPT \
free macos R
# Create HFS+ GPT Formatted Stick
diskutil partitionDisk disk2 GPT \
JHFS+ SierraUSB R
# EFI GUID = C12A7328-F81F-11D2-BA4B-00A0C93EC93B
# HFS GUID = 48465300-0000-11AA-AA11-00306543ECAC
sudo gpt add -b 40 -i 1 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk2
sudo gpt add -b 409640 -i 2 -t 48465300-0000-11AA-AA11-00306543ECAC disk2
# macOS gpt also has aliases for common GUID specifications:
sudo gpt add -b 40 -i 1 -s 409600 -t efi disk2
sudo gpt add -b 409640 -i 2 -t hfs disk2
# Add Labels:
sudo gpt label -i 1 -l 'EFI' disk2
sudo gpt label -i 2 -l 'USB' disk2
sudo gpt -r show /dev/disk2
# Reformat EFI to FAT32
newfs_msdos -v EFI -F 32 /dev/rdisk2s1
# Reformat USB to HFS+
diskutil eraseVolume HFS+ SierraUSB /dev/disk2s2
diskutil mountDisk disk2
# Further tests
diskutil partitionDisk disk2 MBR \
HFS+ USB R
# Block Size and More:
diskutil info /dev/disk2 | grep "Block Size"
# FileSystem Block Size:
stat -f . | grep "Block size"
trivia
By the way: You can open man-pages from your browser by typing
x-man-page://8/gpt
into your address field and macOS will offer to open the Terminal.