Return to site

Linux Boot Usb Mac

broken image


  • 2 days ago You can create a Linux live USB by using either a GUI application like Rufus or by leveraging your existing command-line utilities. We will show you how to create a bootable Linux distro from all major operating systems, including Linux, Mac OS, and Windows.
  • May 23, 2017 The Mac will boot the Linux system from the connected USB drive. If your Mac just boots to the login screen and you don't see the boot options menu, reboot your Mac again and hold down the Option key earlier in the boot process. This solution will allow you to boot common Linux USB drives on your Mac.

Download the ISO. This may seem obvious – but just in case you haven't already downloaded your.

The Need

I was recently using multiple machines for work (Lab machines, friend's laptop, etc) and I needed Linux. I own a 128GB MacBook Air I could'nt install Linux on it as storage was tiny. I did have a USB 3.0 flash drive which had speeds comparable to some(not-so-fast) harddrives. It struck me that if I install Linux on my flash drive it would make my life a hell lot easier. It was later that I realised it wasn't so straight forward mainly because of EFI boot and Mac ‘quirks'. I did a lot of googling but could'nt find anything that worked. After reading multiple sources I deduced what was the problem. Since I got it figured out I decided to write this post so that other people can benefit from it.

The problem

  • Modern Macs boot using EFI and their bootloader expects boot partition to be HFS+ or APFS(High Sierra) not EXT4.
  • Ubuntu installer is buggy and always installs bootloader in EFI partition of internal HDD despite being instructed to install it on EFI partition of flash drive.
    • This makes the flash drive only bootable on the mac it was made on

The Solution

Step 1: Preparing live USB for installation
  • Download https://unetbootin.github.io/

  • Download your favourite Ubuntu flavor, Im using Ubuntu Mate

  • Burn the iso to a USB drive(not on your installation flash drive) using UNetbootin

Step 2: Boot using live installation drive
  • Plug both drives and press option+power button

  • Choose EFI boot option

  • Choose Try Ubuntu without Installing

Step 3: Install Linux on target flash drive
  • Once into the live session, open terminal and run ubuquity —no-bootloader , this will start installation wizard in a mode that wont install a bootloader (Dont worry we will take care of it later)
Fig 1: Run installer with no-bootloader option
  • Keep going next untill an option comes as shown in below image. Choose Something else
Fig 2: Choose this option
  • On your target drive, create a 200MB EFI System Partition as the first partition (Primary)
  • Create a reasonable sized ext4 partition, with mount point = ' (Primary)
Fig 3: Sample partitions
  • Click on Install
  • Reboot into Mac after installation finishes
Step 4: Setting up Boot manager

We will be using a super awesome 3rd party boot manager rEFInd. It can detect any operating systems installed in EFI mode and boot them.

Boot Linux Usb Macbook

Linux Boot Usb Mac
  • Download rEFInd zip and extract it
  • Open Terminal and navigate to rEFInd directory
  • Run diskutil list and find the name of your flash drive's EFI partition. (In my case /dev/disk2s1)
  • Run ./refind-install --usedefault /dev/diskXXX (replace XXX with appropriate name)
Fig 4: Output must be similar to this

Now your flash drive is ready to boot on any Mac or EFI compatible PC. Moreover, if you ever mess up your bootloader and are unable to boot rEFInd can help you boot into your OS (if it exists :p)

Testing on Mac and PC

MacBook Air (Early 2015)
  • Press option+power and select EFI Boot
Fig 5: rEFInd screen
  • Select your apropriate Linux to boot
Fig 6: MacBook booted Asus X550LD (PC)
  • Boot from flash drive in UEFI Mode
Fig 7: rEFInd screen
  • Select your apropriate Linux to boot

Create Linux Boot Usb

Fig 8: PC booted



broken image