Last active
November 1, 2021 03:20
-
-
Save aasmith/9224335 to your computer and use it in GitHub Desktop.
Writing an image to a USB drive is somewhat convoluted in OS X...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Insert drive. | |
# See what drives are available. | |
diskutil list | |
# Unmount the target drive. | |
diskutil unmountDisk /dev/disk1 | |
# OPTIONAL step to convert ISO to usb compatible image (ubuntu ISOs require this) | |
hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso | |
# Write the image using dd(1). Experiment with blocksize (bs). | |
# Note usage of *r*disk to improve write speed. | |
# MAKE SURE YOU HAVE THE CORRECT DRIVE | |
sudo dd of=/dev/rdisk1 if=loonix.iso bs=8m | |
# Press ^T (Ctrl-T) to see progress while copying. | |
# Eject disk afterwards. | |
diskutil eject /dev/disk1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are writing an OS image and want to test that it is bootable after writing, try qemu: