Skip to content

Instantly share code, notes, and snippets.

@gildas
Last active January 31, 2021 05:50
Show Gist options
  • Star 16 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save gildas/ef4b1011bdc6a7123c53 to your computer and use it in GitHub Desktop.
Save gildas/ef4b1011bdc6a7123c53 to your computer and use it in GitHub Desktop.
Create Linux Mint USB on Mac OS/X
#! /usr/bin/env bash
# Insert a USB key.
# if needed initialize it with MS/DOS FAT and MBR
# Download the Mint ISO image
# Convert the ISO -> IMG
hdiutil convert -format UDRW -o linuxmint-17.3-cinnamon-64bit linuxmint-17.3-cinnamon-64bit.iso
# Run a diskutil list to know the device for the USB key, e.g.: /dev/disk3
# then unmount the USB key:
diskutil unmountDisk /dev/rdisk3 #note the "r"
# And copy the img on it:
sudo dd if=linuxmint-17.3-cinnamon-64bit.dmg of=/dev/rdisk3 bs=1m
# Eject the USB key and voilà!
@radmancer
Copy link

Hi, I spotted a mistake in line 15, it should read as "linuxmint-17.3-cinnamon-64bit.dmg" instead of ".img"
hdiutil generated a .dmg file for me on OSX.
Thanks, it was a very helpful script. Respect.

@fedir
Copy link

fedir commented Feb 11, 2018

@whetstone11 +1

@cavarlyman
Copy link

No problem. Jutst used the dmg on terminal: "sudo dd if=linuxmint-17.3-cinnamon-64bit.dmg of=/dev/rdisk3 bs=1m"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment