Search
Close this search box.

Cheat sheet: How to create a bootable USB key on Mac OS X for Ubuntu / Debian

Open a terminal. BEFORE inserting the USB key, check which disks are available:

diskutil list

You should see one or more disks installed on your system like this:

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *250.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 249.2 GB disk0s2
3: Apple_Boot Recovery HD 650.1 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS IntelSSD *248.8 GB disk1
Logical Volume on disk0s2
Unlocked Encrypted

Insert the USB key. Do a “diskutil list” again. You should see one more disk. This is your USB key. Let’s assume it is /dev/disk2First we need to convert the ISO file to an image using this (exemple here with Debian ISO):

hdiutil convert -format UDRW -o debian-8.0.0-amd64-netinst.img debian-8.0.0-amd64-netinst.iso

This will create a debian-8.0.0-amd64-netinst.img.dmg file. Hdiutil adds this extension by default. Let’s remove it:

mv debian-8.0.0-amd64-netinst.img.dmg debian-8.0.0-amd64-netinst.img

Now we are ready to write the image to the USB key:

sudo dd if=debian-8.0.0-amd64-netinst.img of=/dev/disk2 bs=1m

And voila! Once flashed Mac OS will ask you if you want to eject it. Say yes. Your key is ready to use 🙂

Share the Post:

Related Posts