Create bootable USB key on macOS

Xavier Briand
Feb 22 · 1 min read

From .ISO

.isoimages have first to be converted into Apple Disk Image. Apple Disk Image can have several format including Universal Disk Image Format (UDIF).

To convert an .iso into an Apple Disk Image .img, you use hdiutil.

> hdiutil convert -format UDRW -o dst src

In this example, UDRW means Universal Disk Read/Write.
Convert src (eg. image.iso) into dis (eg. image.img).

Prepare the USB key

> diskutil partitionDisk device 1 'Free Space' 'unused' '100%' 

This will partition device with 1 partition, no format, unused as volume name and a size of 100%.

To know the device name. You can use diskutil list. Run it without then with the USB key plugged, and spot the difference.

Copy the image over to the USB key

> sudo dd if=file of=device bs=4m

dd copies the image file onto the device.
The Block Size (bs) parameter can be tuned up to speed up to copy process.

Once dd is over, OSX might prompt you with an error message telling you it’s not able to read the content of the key. It’s all good, eject, and you’re done.

Otherwise, you can eject the device like so:

> diskutil eject device

My journey into Cybersecurity

Xavier Briand

Written by

50% solution finder at @ExperiencePoint / 50% endurance cyclist. Will train for food and burn it for adventures.

My journey into Cybersecurity

My experience trailblazing the practice of Cybersecurity

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade