Deprecated: (jiahao) preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /afs/athena.mit.edu/user/j/i/jiahao/web_scripts/labnotebook/includes/Sanitizer.php on line 1550
Mac usage notes - Jiahao's lab notebook

Mac usage notes

From Jiahao's lab notebook
Jump to: navigation, search

How to copy a ISO disk image to a thumb drive

1. Convert ISO to raw IMG format:

hdiutil convert -format UDRW -o a.img a.iso
Confusingly, the output file is called
a.img.dmg

2. Find the name of the output drive

hdiutil list
3. Say the target drive is
/dev/disk1
. Then issue:
sudo dd if=a.img.dmg of=/dev/rdisk1

Note the r in rdisk1: it uses the raw disk device which provides unbuffered access to the device, i.e. it will be much faster. [1]

3'. If you want a progress meter and a) have pv installed and b) know what size file you have, you can use:

sudo dd if=a.img.dmg 2>/dev/null | pv -tpreb -s 1000000000 | dd of=/dev/rdisk1

where a.img.dmg is of size 1Gb.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox