6 Feb 2019

Create CentOS Bootable USB Installer on Mac OSX

Create a bootable USB drive with the CentOS 7 installer ISO on Mac OSX (Apple MacBook).

Steps

  1. Format a USB drive as ExFAT with Disk Utility.
  2. Download the CentOS 7 Full or Minimal ISO.
  3. Open Terminal and find the USB drive’s partition name with diskutil list.
  4. Use the dd command to copy the CentOS ISO to the USB drive.
  5. Test the USB drive in a Parallels virtual machine.

Find the USB drive partition

Run diskutil list to view partitions — the USB drive will be the last one listed.

Unmount the disk

diskutil unmountDisk /dev/disk2

Copy the CentOS 7 ISO to the USB drive with dd

sudo dd if=./Downloads/CentOS-7-x86_64-DVD-1611.iso of=/dev/rdisk2 bs=1m

Note the extra r prepended to the partition name (rdisk2 instead of disk2) — this does a raw copy, which is much faster than a block-by-block file copy.

Press Ctrl+T to view progress, which shows blocks processed:

4177+0 records in
4177+0 records out
4379901952 bytes transferred in 323.733465 secs (13529346 bytes/sec)

OSX won’t recognize this partition after the ISO is copied — a “Disk not readable” prompt appears; click Ignore. The drive won’t be readable on OSX, but it can be used to boot and install CentOS 7.