OS X: Create and use Live USB Fedora Linux Media

My new Dell Laptop has no DVD or CD drive. I’m trying to create a bootable Fedora Linux 20 USB using UNetbootin utility as described here. But, UNetbootin failed to create bootable USB image on OS X. How do I create Fedora Linux 20 USB Media in Apple OS X using command line options?

You need to use the following two commands on Apple OS X to directory write an ISO image to USB flash drive:[donotprint]
Tutorial details
Difficulty level Intermediate
Root privileges Yes
Requirements Terminal
Est. reading time 5m

a) diskutil command – The diskutil utility manipulates the structure of local disks.

b) dd command – The dd utility copies the standard input to the standard output

How to create and use Live USB on a OS X

First, download a Fedora image by visiting the official site. Insert a USB stick and backup all required data on your disk. Open the Terminal and type the following command to view USB stick name:

diskutil list

Sample outputs:

   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *480.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage                         479.2 GB   disk0s2
   3:                 Apple_Boot Boot OS X               650.0 MB   disk0s3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                 Apple_HFSX Macintosh HD           *478.9 GB   disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.4 GB    disk2
   1:                 DOS_FAT_32 UNTITLED                16.4 GB    disk2s1

In this example, /dev/disk2 is my USB flash drive (16.4GB). You need to use the correct drive name in next step. Please note that the following command will destroy all data on the USB stick. Also, make sure you use the correct USB drive name. Do not blame me if you overwrite OS X disk:

## first unmount the usb media ##
diskutil unmountDisk /dev/disk2
## Now, write an iso image to the usb media in raw format.  ##
### I'm using Fedora 20 Live ISO Image downloaded from https://fedoraproject.org/ ##
sudo dd if=~/Downloads/Fedora-Live-Desktop-x86_64-20-1.iso of=/dev/disk2 bs=1m

Sample outputs:

Fig. 01: dd command in action on Apple OS X

Fig. 01: dd command in action on Apple OS X

Wait for the dd command to complete, then remove the USB flash drive. Start your x86/amd64 based computer/laptop, and boot from a USB stick by holding down F12 (or F2 or Del) keys:
Fig. 01: Booting Thinkpad using USB pen drive by pressing F12 key

Fig. 01: Booting Thinkpad using USB pen drive by pressing F12 key

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Leaman Jun 4, 2014 @ 1:51

    I don’t know if Ubuntu .iso files are different — I would guess not — but I have always followed the instructions on this page:
    It has an extra step — using the hdiutil command to convert the .iso file to an .img or .dmg file before using dd to copy it to the USB stick

    For me, when making bootable Ubuntu USB sticks, I have found this step to be necessary. When I skipped that step, thinking it surely must not be necessary due to the way dd works, I was not able to boot from the USB stick. It worked when following the complete instructions, including the conversion via hdiutil.

    • 🐧 Nix Craft Jun 4, 2014 @ 7:50

      I didn’t know about extra steps. I guess it is Ubuntu specific info only. I appreciate your post.

  • jj May 24, 2015 @ 22:15

    I believe that conversion is required if booting a Mac w/OSX. Not required for other OS.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum