-
Notifications
You must be signed in to change notification settings - Fork 8
Creating and writing USB image files
The dd command on Linux may be used from a shell logged in as a user with sudo access or the root user directly.
Before proceeding, check the system log or run the dmesg command after connecting the target disk to find its device name (e.g. /dev/sdd or something like /dev/mmcblk0 if systemd is in use). The following commands use sample disk names, replace them with the actual device name of the target disk.
The image can be decompressed and written in one command. If run as root, omit sudo. Replace below with your drive letter.
$ unzip -p ~/Desktop/IntelCAP_RACHEL_USB-Multitool-v1a_1-2-15_20150827.img.zip | sudo dd of=/dev/sd<x> bs=1M
[sudo] password for user:
0+7416 records in
0+7416 records out
243048448 bytes (243 MB) copied, 26.3313 s, 9.2 MB/s
Locate the disk using diskutil list
diskutil umount disk9s1
Create an zipped image file from USB (max compression) - WARNING: The "count=7337984" is what is needed for this version of the USB Multitool
sudo dd if=/dev/rdisk2 of=~/Desktop/IntelCAP_RACHEL_USB-Multitool-v1_1-2-15_2015_08_27.img count=7337984 bs=512
Then compress with OSX built-in compress utility (from the menu).
unzip -p ~/Desktop/IntelCAP_RACHEL_USB-Multitool-v1a_1-2-15_20150827.img.zip | sudo dd of=/dev/rdisk9 bs=1m
NOTE "rdisk" is a reference to the raw disk. From superuser.com:
From "man hdiutil":
/dev/rdisk nodes are character-special devices, but are "raw" in the BSD sense and force block-aligned I/O. They are closer to the physical disk than the buffer cache. /dev/disk nodes, on the other hand, are buffered block-special devices and are used primarily by the kernel's filesystem code.
In layman's terms /dev/rdisk goes almost directly to disk and /dev/disk goes via a longer more expensive route