Making Installation USB Media on Mac OS X
This procedure involves using the dd
command line tool to write the installation image to a USB flash drive. Note that some steps involve use of the sudo
command, which is only available when logged in with an administrator account that requires a password.
All data on the USB flash drive will be deleted by this procedure. |
-
Connect a USB flash drive to the system and identify the device path with the
diskutil list
command. The device path has the format of/dev/disknumber
, where number is the number of the disk. The disks are numbered starting at zero (0). Disk 0 is likely to be the OS X recovery disk, and Disk 1 is likely to be your main OS X installation. In the following example, it isdisk2
:$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *500.3 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_CoreStorage 400.0 GB disk0s2 3: Apple_Boot Recovery HD 650.0 MB disk0s3 4: Apple_CoreStorage 98.8 GB disk0s4 5: Apple_Boot Recovery HD 650.0 MB disk0s5 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS YosemiteHD *399.6 GB disk1 Logical Volume on disk0s1 8A142795-8036-48DF-9FC5-84506DFBB7B2 Unlocked Encrypted /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk2 1: Windows_NTFS SanDisk USB 8.0 GB disk2s1
To identify your USB flash drive, compare the
NAME
,TYPE
andSIZE
columns to what you know about your flash drive. For example, theNAME
should be the same as the title of the flash drive icon in the Finder. You can also compare these values to those in the flash drive’s information panel; right-click on the drive icon and selectGet Info
. -
Use the
diskutil unmountDisk
command to unmount the flash drive’s filesystem volumes:$
diskutil unmountDisk /dev/disknumber
Unmount of all volumes on disknumber was successfulWhen you do this, the icon for the flash drive disappears from your desktop. If it does not, you might have identified the wrong disk. If you attempt to unmount the system disk accidentally, you get a
failed to unmount
error. -
Use the
dd
command as a parameter of thesudo
command to write the ISO image to the flash drive:$
pv /path/to/image.iso | sudo dd of=/dev/rdisknumber bs=1m
Mac OS X provides both a block (
/dev/disk*
) and character device (/dev/rdisk*
) file for each storage device. Writing an image to the/dev/rdisknumber
character device is faster than to the/dev/disknumber
block device.Example 1. Writing an ISO Image to a DiskTo write the
/Users/user_name/Downloads/CentOS-server-x86_64-boot.iso
file to the/dev/rdisk2
device:$ pv /Users/user_name/Downloads/CentOS-server-x86_64-boot.iso | sudo dd of=/dev/rdisk2
-
Wait for the command to finish. Note that no progress bar is displayed; however, to check the status of the operation while it is still running, press Ctrl+t in the terminal:
4.39GiB 0:03:08 [23.8MiB/s] [============================================================================================================================================================>] 100% 0+71904 records in 0+71904 records out 4712300544 bytes transferred in 188.501782 secs (24998706 bytes/sec)
-
The speed of the data transfer depends on the speed of your USB ports and the flash drive. After the prompt is displayed again, the data transfer is finished. You can then unplug the flash drive.
The flash drive is now ready to be used as a boot device. You can continue with Booting the Installation on 64-bit AMD, Intel, and ARM systems on AMD64 and Intel 64 systems or Booting the Installation on IBM Power Systems on IBM Power Systems servers.