Fed up with Kubuntu on my laptop at home, I decided to try and install Mint via a USB Flash Drive.
Except, I couldn’t get either KDE Partition Manager on my laptop, or Disk Utility on my work MacBook to erase and format the flash drive. I wanted to do this, so that dd would have a pristine flash drive to burn the Mint ISO to.
Disk Utility was giving errors of the form:
Name invalid. Operation invalid...
Turns out this was something to do with the fact the the USB Flash Drive already had a bootable Linux partition on it from the last Kubuntu install I did. Luckily I found this page on the Apple website, that contained the solution, you’ll need to scroll all the way to the Helpful answers section at the bottom to find the answer.
In short though, find the id of the USB flash drive using the Info button in Disk Utility, then open a Terminal and issue:
$ diskutil eraseVolume HFS+ NAME disk3 Started erase on disk3 Kubuntu 16.04 LT Unmounting disk Erasing Initialized /dev/rdisk3 as a 7 GB case-insensitive HFS Plus volume Mounting disk Finished erase on disk3 NAME
Then pop back into Disk Utility and click the Erase button and format the disk to FAT32. You should now be able to use dd to copy the ISO to the flash drive.