When you have downloaded the CentOS ISO image that you’d like to run from USB, there are a few simple commands to run from the terminal so that you can create a bootable USB key. This has only been tested on the CentOS 7 download, but it should work for any bootable ISO.
1. In the terminal, navigate to the directory where your CentOS download is saved (“Downloads” in my case).
2. Convert the .iso to a .img using the following command. You will need to adjust the filename if you downloaded something other than the DVD iso.
hdiutil convert -format UDRW -o centosdvd.img CentOS-7.0-1406-x86_64-DVD.iso
3. We now need to copy the .img to the USB device. The first job is to identify and unmount the USB device.
diskutil list
You need to find the section that looks like this:
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *7.8 GB disk1
1: DOS_FAT_32 UNTITLED 7.8 GB disk1s1
Note the first part “/dev/disk1“, this is the USB device that we need to unmount as can be seen from the size. If you have multiple devices attached, it may be a different number so make sure you check this part.
diskutil unmountDisk /dev/disk1
4. Finally, copy the image to the USB device.
sudo dd if=centosdvd.img.dmg of=/dev/disk1
This step may take some time, but once you are back at the command prompt, the USB device should be bootable.
© Enrapture Limited - Building online solutions since 2009
Guernsey registered company number: 50810
Office of Data Protection Registration ID: DPA7171