A couple of days ago I decided to reinstall my operating system since it was failing. I quickly realized that the only functional system that I had at the time was my MacBook Pro. After a bit of Googling, I came up with a pretty straightforward guide, but they really could have formated it to make it easier to follow.
I’m going to run you through the same steps and you should be able to use this guide to create a bootable USB stick for Windows, Ubuntu, Fedora, etc.
- Download the disc image that you want to use. (I’ll use Ubuntu in my example, but you can use Windows or whatever you’ve downloaded.)
- Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight).
- Convert the .iso file to .img using the convert option of hdiutil as shown below (replace the paths and image names to suite your needs):hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.isoNote: OS X tends to put the .dmg ending on the output file automatically, creating the file target.img.dmg. I’ve always removed the .dmg extension.
- Run diskutil list to get the current list of devices.diskutil list
- Insert your flash media.
- Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2).diskutil list
- Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2).diskutil unmountDisk /dev/diskN
- Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.imgor ./ubuntu.dmg).sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1mUsing /dev/rdisk instead of /dev/disk may be faster
If you see the error dd: Invalid number ‘1m’, you are using GNU dd. Use the same command but replace bs=1m with bs=1M
If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the ‘Disk Utility.app’ and unmount (don’t eject) the drive.
- Run diskutil eject /dev/diskN and remove your flash media when the command completes (replace N with the disk number).diskutil eject /dev/diskN
- Restart your PC and enter the boot options to choose the USB stick. If you’re installing to your Mac, restart and press alt/option key while the Mac is restarting to choose the USB stick.
If you’ve made it this far, then you should be well on your way to installing a new operating system. Good luck!