23

How do I create a bootable USB stick for Ubuntu using an Apple Macbook that can then be used on my Windows PC to replace it with Ubuntu?

0

6 Answers 6

27

New Method using Etcher

  1. Make sure you have a USB Stick with at least 4GB of free space.
  2. Get your Ubuntu ISO from here.
  3. Open Disk Utility from Applications > Utilities
  4. Select the USB stick and select Erase (This will remove all data stored on the USB drive)
  5. Select the format: MS-DOS (FAT) and scheme: GUID Partition Map
  6. Click Erase

    Disk utility

  7. Download, install and open Etcher (By default MacOS blocks running apps from unidentified developers. Follow this tutorial if you are experiencing problems with this.)
  8. Select image and navigate to the location you saved the Ubuntu ISO you have downloaded in step 2
  9. Select the USB drive you have formatted in step 3-6.
  10. Click Flash

    Etcher interface

  11. Congratulations! You now have Ubuntu on a USB stick, bootable and ready to go!

Old Method using UNetbootin (might still work)

  1. Make sure you have a USB Stick with at least 4GB of free space.
  2. Download and install UNetbootin USB installer
  3. Download The Ubuntu Desktop ISO of your choice
  4. Launch UNetbootin and allow the osascript to make changes

    authentication

  5. Select the Diskimage radio button and then click the ... button

    unetbootin interface

  6. Select the ubuntu ISO file you downloaded and click 'Open'

    selecting iso file

  7. Then select your flash drive in the bottom row and click 'OK'
  8. After Unetbootin finishes, click 'Exit' and now you have yourself an Ubuntu USB stick.

Source

4
  • 1
    Does one need to format USB stick before doing this procedure?
    – erikvimz
    Dec 29, 2017 at 10:10
  • @Eric No Unetbootin will format the drive for you.
    – Cyber_Star
    Dec 30, 2017 at 12:03
  • You do not need to format the drive with Etcher, it flashes the ISO directly on it. Apr 29, 2018 at 16:07
  • You cannot select "GUID Partition Map" anymore on Mac OS Catalina. Where is it?
    – Wouter
    Aug 27, 2020 at 12:38
15

1) Find the file path to your USB drive with

diskutil list external

You're looking for /dev/diskN. It's probably /dev/disk2, but double check that the NAME and SIZE columns make sense. The dd command you're going to run later will effectively delete all data on the drive so don't get this wrong. If that command produces no output, your USB drive is probably not plugged in.

2) Unmount the device so you can overwrite it (change N to the number you got from the previous step)

diskutil unmountDisk /dev/diskN

3) Use dd to copy the .iso image to the USB with

sudo dd if=/path/to/your/iso-file.iso of=/dev/diskN

That step will take a while. When it's finished you might get an error saying that the disk can't be read, you can click "Eject" and you're done; use your USB stick to boot Ubuntu. If you don't get that error, you should eject it with 4)

diskutil eject /dev/diskN

You can speed up the dd command by adding bs=1m (if you get the invalid number: ‘1m’ error change "m" to an uppercase "M" (this can happen if you installed a newer version of coreutils with homebrew)) and using /dev/rdiskN instead of /dev/diskN (use /dev/diskN for the diskutil commands though). You can get dd to report progress with status=progress. This would all look like

sudo dd bs=1m status=progress if=ubuntu-19.10-desktop-amd64.iso of=/dev/rdiskN

With my cheap USB 2.0 drive I get 3.6 MB/s (9 minutes) with these options vs 0.8 MB/s (40 minutes) without them.

1
  • This worked fine for me with 18.04 iso. I was able to use the resultant usb to boot into it on a macbook.
    – rogerdpack
    Jun 18, 2019 at 21:23
6

Format your USB stick in FAT32 then open a terminal and type

dd if=/path/to/file.iso of=/path/of/mounted/usb

Substitute the strings after = signs with your real paths.

That's really quicker than other method!

1

sudo dd if=/path/to/file.iso of=/dev/disk3

where disk3 is your usb device. You need to umount the usb device before performing this operation.

dd is a dangerous command and can erase your disk completely. of=/dev/diskx this x should never be your internal disk. Make sure you have not put your internal disk after "of=/dev/"

0

Well, yes, you can. Look for the correct tool to do this, like unetbooting. For more information about, how to create a bootable USB you can look at this:

How to create a bootable USB stick on OS X.

And here: How do I create a bootable flash drive for installing Windows?,

And here: How to create a Windows 10 installer USB drive from a Mac.

3
  • This is to create a windows sick tho but he want's a ubuntu stick.
    – Cyber_Star
    Jul 21, 2016 at 20:32
  • Wrong understanding. I read "...upgrade a windows PC...", so, i though, "he wants to upgrade his windows 8 to windows 10", because no "Ubuntu" is mentioned. Just didn't catch the idea. Thanks for the corrections.
    – GTRONICK
    Jul 21, 2016 at 20:34
  • 1
    Yeh thats what i tought aswel thats why i commented it :)
    – Cyber_Star
    Jul 21, 2016 at 20:34
0
m.apple.disk.iso.create() {
        local iso="${1}" disk="${2}" # example -> /dev/disk6
        sudo dd if="${iso}" of="${disk}"
}

Example call:

m.apple.disk.iso.create ~/Downloads/ubuntu-18.04.3-live-server-amd64.iso /dev/disk6
5
  • 1
    Can you explain how these command lines works?
    – damadam
    Jan 9, 2020 at 10:50
  • @damadam Does it work?
    – mjs
    Jan 15, 2020 at 15:59
  • I don't know, I can't test it
    – damadam
    Jan 17, 2020 at 10:51
  • I don't see the point of making this one line bash function instead of just invoking dd as already suggested by @MKay
    – user677955
    Jan 19, 2020 at 20:54
  • if you have a bunch of usable code ... dd in one case and other commands other times. which is easier to remember? all of them or through a consistent api that will give you what you need? m.apple.disk.format. it has to be the latter, otherwise you wouldn't have found this answer by googling ;) now take it down.. or try use dd through your memory in one years time again! how would you take it down? in a note file? or by declaring that method above, which in this case was just that command. but your question is valid in this example alone. for all 2+ liners, it wouldn't. I am just consistent.
    – mjs
    Jan 19, 2020 at 21:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .