Date Created: 2025-03-29
By: 16BitMiker
[ BACK.. ]
While Linux users have their familiar tools, macOS has its own approach to creating bootable USB drives. This guide walks through the macOS-specific commands and considerations for safely using the powerful but potentially dangerous dd
command to burn ISO images to USB drives.
The dd
(data duplicator) command is a powerful Unix utility available on macOS that performs low-level copying of data. Unlike graphical tools, dd
gives you precise control but requires careful handling to prevent data loss.
On macOS, there are several important differences compared to Linux:
Disk identifiers use /dev/diskN
instead of /dev/sdX
The raw device path (/dev/rdiskN
) offers significantly faster writes
Block size is specified as bs=1m
(lowercase) rather than bs=1M
First, insert your USB drive and identify it correctly:
diskutil list
The output will show all connected storage devices. Look for your USB drive, which will appear with a name like /dev/disk2
(not /dev/sdb
as in Linux).
Example output:
x/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_APFS Container disk1 500.1 GB disk0s2
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *16.0 GB disk2
1: DOS_FAT_32 USB_DRIVE 16.0 GB disk2s1
In this example, /dev/disk2
is our USB drive.
Before writing to the drive, you must unmount it (but not eject it):
xxxxxxxxxx
sudo diskutil unmountDisk /dev/diskN # Replace N with your disk number
This unmounts all partitions on the drive while keeping the device available for writing.
Now use the dd
command with macOS-specific syntax:
xxxxxxxxxx
sudo dd if=/path/to/your.iso of=/dev/rdiskN bs=1m
Let's break down this command:
if=/path/to/your.iso
- Input file: the path to your ISO image
of=/dev/rdiskN
- Output file: the raw disk device (note the 'r' prefix for faster writes)
bs=1m
- Block size: 1 megabyte chunks (macOS uses lowercase 'm')
Unlike Linux versions, macOS's default dd
doesn't have a built-in progress indicator. You have two options:
Option 1: Press Ctrl+T
during the operation to see progress statistics.
Option 2: On macOS 10.13 (High Sierra) and newer, you can use:
xxxxxxxxxx
sudo dd if=/path/to/your.iso of=/dev/rdiskN bs=1m status=progress
For older macOS versions, you can open another Terminal window and run:
xxxxxxxxxx
while pgrep -q dd; do
kill -INFO $(pgrep dd)
sleep 1
done
This sends an INFO signal to the dd
process every second, causing it to print progress information.
After dd
completes, safely eject the drive:
xxxxxxxxxx
sudo diskutil eject /dev/diskN
Here's a complete example of the process:
xxxxxxxxxx
# First, identify your drive
diskutil list
# Unmount the disk (example for disk2)
sudo diskutil unmountDisk /dev/disk2
# Write the ISO (using rdisk2 for faster writes)
sudo dd if=~/Downloads/debian-11.iso of=/dev/rdisk2 bs=1m
# Press Ctrl+T occasionally to check progress
# Safely eject when complete
sudo diskutil eject /dev/disk2
The dd
command is sometimes called "disk destroyer" for good reason:
TRIPLE CHECK the disk identifier before executing the command
Never use /dev/disk0
or /dev/disk1
as these are typically your system drives
Always use sudo
as these operations require administrator privileges
Don't remove the USB drive until the process is complete and properly ejected
Consider making a backup of important data on the USB drive before formatting
xxxxxxxxxx
dd: /dev/diskN: Resource busy
Solution: Make sure you've unmounted (not ejected) the disk:
xxxxxxxxxx
sudo diskutil unmountDisk /dev/diskN
xxxxxxxxxx
dd: /dev/diskN: Permission denied
Solution: Use sudo
to run the command with administrative privileges.
If Finder shows a message that the disk is "not readable" during or after the process, this is normal. The ISO format may not be recognized by macOS's Finder.
Solution: Make sure you're using the raw device path (/dev/rdiskN
instead of /dev/diskN
) for significantly faster performance.
If you're uncomfortable with the command line or want a safer option, consider these GUI alternatives:
Balena Etcher - Cross-platform, user-friendly interface with built-in verification
USBImager - Lightweight and simple for basic ISO burning
Disk Utility - macOS's built-in tool can restore ISO images to USB drives
For Disk Utility:
Open Disk Utility
Select your USB drive in the sidebar
Click "Restore" in the toolbar
Select your ISO as the source and your USB as the destination
Click "Restore"
Remember that while dd
is powerful and efficient, it requires careful handling. When in doubt, GUI tools like Balena Etcher provide a safer alternative with minimal performance trade-offs.