Creating Bootable USB via OS X(Mac) • Albert Tai

This tutorial allows you to create a bootable usb via OS X (Mac). This is needed if you are trying to install OS without a CD, which can be fixed by creating a bootable USB.

This tutorial will accomplish the goal of creating a bootable USB through the terminal, without any external softwares :).

**Materials Needed: **

  • USB (recommended at least 8GB of space)
  • Operating System in ISO Format (Quick Google Search should yield the result)

1. Acquire the .ISO of the operating system

In this tutorial, I will be using Kali as an operating system. After a quick Google search, I stumble upon the ISO. Make sure you download the correct OS for your system. In this case, it will be a 64 bit operating system.

2. Open Terminal

In this tutorial, I will be using ITerm2 rather than default terminal. Either terminals works. Default terminal is located at /Applications/Utilities/.

Spotlight can find the terminal app if you cannot find it.

3. Convert ISO to IMG

Find direct path of the ISO **(drag and drop from finder to terminal works) **(ex: /Users/Al/Downloads/kali-linux-2.0-amd64.iso)

Type In The Command For Conversion

Converting ISO to IMG

hdiutil convert -format UDRW -o ~/path/to/yourOS.img ~/path/to/yourOS.iso 

**Success Screen (Example with Kali)

Note: OS X (Mac) tends to add .dmg ending to the img file automatically

You can press the file and press enter to delete the extra extensions. Apple will ask to confirm, and just confirm as .img.

4. Find Device Details

Find The List of Devices

Type this into terminal:

diskutil list

Insert the USB into the computer

Find The List of Devices For New Device

Type this into terminal again:

diskutil list

Find the new node assigned to your flash media (ex. /dev/disk2).

5. Unmount the USB

Type in this in terminal to unmount the usb:

diskutil unmountDisk /dev/diskN

Replace N with the node USB is located. (ex. replace N with 2)

6. Write the IMG to the USB

Type in this in terminal to write the img to the usb:

sudo dd if=/path/to/yourOS.img of=/dev/rdiskN bs=1m

Replace N with the node USB is located. (ex. replace N with 2)

Completed Copying IMG To USB

7. Eject USB And Celebrate :)!

Eject the USB through the finder or through terminal with the command:

diskutil eject /dev/diskN

Replace N with the node USB is located. (ex. replace N with 2)

After this step, you are done.

I hope this really helped create a bootable USB. I provided tons of screenshots to allow for people with little or no experience of terminal to build a bootable USB in OS X.

I may create a video in the future, which will definitely make it easier to follow. Feel free to comment below or email me if you need any sort of help with this :)!

Albert Tai

Co-founder / CEO of @HypercareHq, helping clinical teams coordinate patient care seamlessly. Passion in good products. Alumni of Microsoft, University of Toronto, and Western University.

alberttai1 alberttai