Create a Bootable USB for Ubuntu 16.04 LTS for a PC using Mac OSX

Brian Hooper
fellow hobbyist
Published in
3 min readApr 21, 2016

One of my favorite server distributions is Ubuntu. This quick tutorial will show you how to create a Bootable Ubuntu USB Drive using a Mac that will boot or install Ubuntu on a PC.

STEP 1 — Download Ubuntu ISO Image
http://www.ubuntu.com/download

ubuntu-16.04-server-amd64.iso

STEP 2 — Make a Staging Directory

$ mkdir ubuntu-iso

STEP 3— Move ISO to the Staging Directory and CD into the Directory

$ mv ubuntu-16.04-server-amd64.iso ubuntu-iso/
$ cd ubuntu-iso/

STEP 4— Use the hdiutil command to format the ISO Image

$ hdiutil convert -format UDRW -o ubuntu-16.04-server-amd64.iso.img ubuntu-16.04-server-amd64.isoReading Driver Descriptor Map (DDM : 0)…
Reading Ubuntu-Server 16.04 LTS amd64 (Apple_ISO : 1)…
Reading Apple (Apple_partition_map : 2)…
Reading Ubuntu-Server 16.04 LTS amd64 (Apple_ISO : 3)………………………………………………………………………………………….
Reading EFI (Apple_HFS : 4)
…………………………………………………………………………………………..
Reading Ubuntu-Server 16.04 LTS amd64 (Apple_ISO : 5)……………………………………………………………………………………………………………………………..
Elapsed Time: 2.869s
Speed: 228.3Mbytes/sec
Savings: 0.0%
created: /Users/brian.hooper/Downloads/ubuntu-iso/ubuntu-16.04-server-amd64.iso.img.dmg

So, now you should have two files in your staging directory

$ ls
ubuntu-16.04-server-amd64.img.dmg
ubuntu-16.04-server-amd64.iso

STEP 5 — Use diskutil to list mounted disks on your system

$ diskutil list/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 499.4 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS Macintosh HD *499.0 GB disk1
Logical Volume on disk0s2
C9E034D8–8CA0–4ED8-A365-FAE91BD52197
Unencrypted
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *15.6 GB disk2
1: DOS_FAT_32 COPYLEFT 15.6 GB disk2s1

As we can see above… the Copyleft USB is /dev/disk2

STEP 6 — Use diskutil to unmount disk2

$ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful

STEP 7 — Use dd to Create the Bootable USB Drive

To create the USB drive, the dd command is used to copy and convert a file. Note: Use Caution when using this command. If used incorrectly, it is possible to corrupt the hard drive of your Mac rendering it unable to boot from disk.

An explanation of the command used is:

  • sudo means substitute user do and gives you greater privileges to carry out a command that you would normally not be able to execute.
  • dd means convert and copy
  • if is the input file
  • of is the output file
  • You will need to enter the admin password to use this command
  • It may take a few minutes to complete… you will not see a progress display. Just hang tight and let it run.
$ sudo dd if=ubuntu-16.04-server-amd64.iso.img.dmg of=/dev/rdisk2 bs=1mPassword:<enter admin password>
655+0 records in
655+0 records out
686817280 bytes transferred in 145.562370 secs (4718371 bytes/sec)

STEP 8 — Remove the USB using diskutil to eject the USB

$ diskutil eject /dev/disk2
Disk /dev/disk2 ejected

STEP 9 —After the USB has been ejected, Click Ignore on the Pop-up

OK, TIME TO TEST THE NEW BOOTABLE USB!

The newly created Ubuntu USB drive is now ready to be inserted into a PC as a live-drive from which you can run the Ubuntu operating system.

The USB drive can also be used to install Ubuntu, alongside or in place of, Windows on a PC. Simply input the USB into the new Device (Desktop/Laptop/Server) and Boot the Device…

You will be presented with a Language Selection Menu… Defaults to English

Ubuntu Server Install — Language Selection

Next, you should see the Ubuntu Server Install Menu

Ubuntu Server Install — Menu

SUCCESS!!!

As you can see above, our new bootable Ubuntu USB is working as expected. From here you should be able to install Ubuntu Server or Desktop. The same process will work for both .

References:

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx

--

--