Skip to content

Instantly share code, notes, and snippets.

@schneefisch
Last active September 27, 2020 17:35
Show Gist options
  • Save schneefisch/60ee5a2a16166008b88387d28cdf8bfe to your computer and use it in GitHub Desktop.
Save schneefisch/60ee5a2a16166008b88387d28cdf8bfe to your computer and use it in GitHub Desktop.
How to create a bootable USB image on Mac
# first, format USB as ExtFAT (using Disk Utility)
# convert .iso to .img
hdiutil convert -format UDRW -o ./ubuntu-18.04.2-server-amd64.img ubuntu-18.04.2-server-amd64.iso
# mac adds .dmg at the end, we need to remove that
mv ubuntu-18.04.2-server-amd64.img.dmg ubuntu-18.04.2-server-amd64.img
# find out the disk-name:
diskutil list
# unmount the disk (e.g. disk4)
diskutil unmountDisk /dev/disk4
# copy on usb stick
sudo dd if=/Users/fricc/Downloads/ubuntu-18.04.2-server-amd64.img of=/dev/rdisk4 bs=1m/Downloads/ubuntu-18.04.2-server-amd64.img of=/dev/rdisk4 bs=1m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment