Apr 03, 2019 Boot From CD or Live USB drive and Try Ubuntu. The system will boot into the Ubuntu live desktop environment. From the left dock panel, open applications button, which is located at the bottom. While we recommend using Rufus to create most Ubuntu live USB drives, we’ll have to use a different tool for this particular job. (Update: The latest versions of Rufus now support persistent storage!) Download the Ubuntu ISO file you want to place on the USB drive and the Linux Live USB Creator application. From here I can boot both Ubuntu Server and Ubuntu Desktop Live without any problems. – gaspanic Jan 26 '18 at 1:11 I've revised all steps, commands, and inputs in sections 'Use Ubuntu Server to Setup Ubuntu Desktop Live' and 'Use OS X to Setup Ubuntu Desktop Live' and they seem correct.
Warning: This is a complicated process, and you might screw things up. I am not an expert, and likely cannot solve any issues you encounter. Proceed at your own risk!
This guide will show you, step by step, how to install a full version of bootable Ubuntu on a SSD (solid state drive, or any other external drive), using only your Macbook. We will generally be following these instructions, with a few key modifications.
Why would you want to do this?
- You want to have a portable full install of an Ubuntu system for prototyping
- You do NOT want a virtual machine because they are slow
- You do NOT want to make any permanent changes to your Macbook
Alternative options:
- Use a persistent Ubuntu live session… certain features do not work
- Use rEFInd. This requires permanent changes to your Mac
What you will need:
- An Intel powered Macbook (may have to be newer than 2013) with 2 USB ports
- A bootable USB flash drive for installing Ubuntu: instructions.
- A blank SSD drive, like this SSD USB drive ($70-130 on Amazon for the 128 GB and 256 GB versions). Why this drive? According to the specs it is FAST, and it is a SSD, not a standard USB Flash drive. So it should be more reliable (and faster) than a generic USB Flash drive. It is more appropriate for a full install of an operating system than a flash drive is.
How long will it take?
Maybe an hour. If you mess up, a good part of a day.
Let’s get started!
Part 1: Formatting your external SSD drive
- Insert your external SSD drive into your Mac
- Open your Utilities folder
- Double-click Disk Utility
- Select your external SSD drive (NOT your Mac’s hard drive!)
- Click Erase with these options (if it fails, just try again):
- Name: EmptyDrive
- Format: Mac OS Extended (Journaled)
- Scheme: GUID Partition Map
- With the external SSD drive selected, click Partition. Reduce the size of the EmptyDrive partition by at least 128 MB. In this example I changed the original ~128 GB to ~127 GB. That is overkill, but it makes things simple.
- Apply the changes. In the window that pops up informing you that a new Untitled partition will be created, accept by clicking Partition.
- Select the Untitled partition, click erase, and rename it to Ubuntu Boot Loader
Part 2: Install Ubuntu on the external SSD
Start up an Ubuntu live session
- Shutdown your Mac.
- Unplug the external SSD drive.
- Insert your USB flash drive that has the Ubuntu installer on it.
- With the option key pressed on your keyboard, boot up your Mac.
- Select the Orange EFI Boot option (right arrow, enter).
- Choose “Try Ubuntu” (default option)
Prepare your SSD drive
- Plug in SSD drive.
- Open GParted (click the upper left corner icon, type in “GParted” and click the GParted Partition Editor application icon).
- In GParted, find your external SSD drive in the upper right box (e.g. select /dev/sdd, or whatever the appropriate letter is for you). Make sure the size of the drive makes sense.
- Delete all the partitions EXCEPT the hfs+ Ubuntu Boot Loader partition. Mine had two partitions to delete: a fat32 system with label EFI, and a hfs+ system with label EmptyDrive. For each partition to delete:
- Select it
- Click the red circle/slash symbol
- The delete operations are now queued, but have not been applied. Click the green check box to apply the operations.
- Add a new partition (click Partition > new).
- Use these options:
- New Size: 8192 MiB (this should match your RAM, e.g. 8 GB = 8192 MiB)
- File system: linux-swap
- Add another new partition with the following options:
- New size: default (unless you want yet another partition)
- File system: ext4
- Label: Whatever you like
- Apply the new partitions by clicking the green check
- Make a note of the ext4 partition name, e.g. /dev/sdd2
- Close GParted
Start installing Ubuntu
- Connect to WiFi (this saves time later, but is optional)
- Double click “Install Ubuntu” in upper left corner on the desktop.
- Choose your language.
- Check the boxes:
- Download updates
- Install third party software
- Select: something else.
- Find the ext4 formatted partition you just created in GParted. Your best confirmation is to look at the size of the disk. Don’t screw this up.
- Click change… and apply these options (there should be a better way to do this, but this works):
- default size
- Ext4 journaling file system
- check Format the partition
- Mount point: /
- Choose this device for boot loader installation: select the device that corresponds to the ext4 partition. (Do not select the SSD itself)
- Go through the rest of the installation. will take about 10 minutes.
- When it is finished, choose “continue testing”, as we have a few more things to do.
Making Ubuntu bootable part 1
Ubuntu has been installed on your SSD, but you won’t be able to boot into it since there’s no EFI boot loader, needed for Mac firmware to recognize the OS as bootable. So, we need to go into the Ubuntu installation and create a boot.efi file that we’ll use to boot it. While still in the live Ubuntu session…
- Open up a Terminal window (similar to launching GParted):
- Run this command in the terminal window (replace ‘/dev/sdaN’ with the device that corresponds to your /ext4 partition that you made a note of earlier – mine was ‘/dev/sdd2’)) (it mounts your /ext4 Ubuntu installation to /mnt):
sudo mount /dev/sdaN /mnt
- Tip: you can select something on this page, copy it with ctrl-c, and paste it into the terminal with shift-ctrl-v. But make sure to double check the formatting, especially for underscores, and dashes.
- You’ll also need to mount several of the top-level directories, which is easiest to do with the following (long one line) command:
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
- Now, we can use the chroot command to change our root directory to /mnt, so that the bash session in the Terminal is effectively running inside the Ubuntu installation:
sudo chroot /mnt
- This allows us to configure GNU GRUB, the “GRand Unified Bootloader,” with:
grub-mkconfig -o boot/grub/grub.cfg
- Now save this to a standalone file with (this is one long line):
grub-mkstandalone -o boot.efi -d usr/lib/grub/x86_64-efi -O x86_64-efi --compress=xz boot/grub/grub.cfg
- Exit the chrooted partition:
exit
- Here are all the terminal commands together:
- The boot.efi file is still in the new installation, however, we want to copy it to the live session:
cp /mnt/boot.efi /home/ubuntu
- Now you will need to access the boot.efi file from your Mac OS system. The easiest is to email the file to yourself, or save it to a google drive. You can find the boot.efi file in your home directory (click the file cabinet icon in the upper left, which launches a folder view of your home folder).
- Now you can shutdown Ubuntu. The computer might hang. give it 30 seconds and then manually shutdown.
Making Ubuntu bootable part 2
If you are running El Capitan or later, your Mac has extra security precautions called SIP (System Integrity Protection). This makes the last few steps a little harder. Following these instructions (copied from here), you can get around it:
- Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
- Click Utilities > Terminal.
- In the Terminal window, type in:
csrutil disable
- Press Enter.
- Restart your Mac.
![Ubuntu Live Usb For Mac Ubuntu Live Usb For Mac](/uploads/1/1/8/4/118488861/426583351.jpg)
Note: if you ever get a black screen with the words “grub”, just type exit.
Making Ubuntu bootable part 3
Live Ubuntu Usb For Mac
Final stretch!
- Launch your terminal (Go > Utilities > Terminal)
- Plug in your Ubuntu SSD and type in:
cd /Volumes/Ubuntu Boot Loader/
- Tip: on your mac (unlike Ubuntu), copy/paste to the Terminal does not require shift.
- Type in the following lines (one at a time) (the password is your Mac’s password):
sudo mkdir System mach kernel
cd System
sudo mkdir -p Library/CoreServices
cd Library/CoreServices - Download your boot.efi file from your email or google drive.
- Assuming your boot.efi file is now in your Downloads folder, type this into the terminal:
sudo cp ~/Downloads/boot.efi ./
- Tip: In both Mac OS and Ubuntu, you can find a file through the user interface / finder, and drag the file into a terminal window, and it will insert the full path to the file.
- Now we need to make a SystemVersion.plist file. You can see what needs to be in it, and download the file directly via this link.
- Copy the SystemVersion.plist file to the same directory on the external SSD where your boot.efi is (/Volumes/Ubuntu Boot Loader/System/Library/CoreServices). Go back to the terminal window you had open from before and type:
sudo cp ~/Downloads/SystemVersion.plist ./
- Open Disk Utility (Go > Utilities > Disk Utility) to check what disk number your bootloader is. In this case mine is disk2s3.
- Now we “bless” the partition for booting, and set the boot flag, like so (This is the step that required us to disable the SIP earlier):
sudo bless --device /dev/diskNsK --setBoot
Where you replace N and K with the letters from step 12.
Turn SIP back on (for security).
- Shut down your Mac
- Remove your USB devices
- Reboot your Mac into Recovery Mode by restarting your computer and holding down Command+R until the Apple logo appears on your screen.
- Click Utilities > Terminal.
- In the Terminal window, type in:
csrutil enable
- Press Enter.
- Shutdown the Mac.
Boot into Ubuntu!!
- Plug in your external SSD drive onto which we have installed Ubuntu
- Press the option key while booting up the Mac
- Select the orange Boot EFI device
- Now you have a functional Ubuntu install!
A few tips:
- Whenever you have that SSD drive plugged into the computer, boot up while holding the option key. If it is not plugged in, just use your Mac as normal.
- Sometimes you may encounter this screen when booting into your Mac after using the Ubuntu drive:
Don’t panic. Just type exit and press enter.
To fix this permanently, go to System Preferences > Startup Disk, unlock, then select your Mac harddrive and restart. This will take longer than usual, so be patient. After that you won’t see the grub screen anymore on restarting your Mac. - Get a right click working (better yet, use an external mouse): Wine for macbook.
- Click the “Activities” icon and type in Universal Access
- Select “Pointing and Clicking”, and turn on Simulated Secondary Click. Now if you click and hold for a brief moment, you will get a right click.
- Click the “Activities” icon and type in Universal Access
- If, when you shutdown Ubuntu, it seems to take forever (e.g. 1 minute and 30 seconds), press the “Esc” key when you see the Ubuntu… logo. This will tell you what the computer is doing. If you see this:
A stop job is running for remote CUPS printers available locally
Then implement unhammer’s (the second) reply explain here. - Get familiar with the command line editor nano
And while users historically would pop a boot media disk into their DVD or CD drive, many computers no longer come with optical disk drives. As a result, booting from USB media is becoming the standard.
How you start that rescue media can vary depending on the operating system you are using, but there are a few general guidelines that can help get your machine started, regardless of the OS you prefer.
So if your system is unstable, you need to run a diagnostic tool on the hard drive, or you just want to load a Linux desktop just to see what it’s all about, let’s look at how you start your machine using rescue USB boot media.
How you start that rescue media can vary depending on the operating system you are using, but there are a few general guidelines that can help get your machine started, regardless of the OS you prefer.
So if your system is unstable, you need to run a diagnostic tool on the hard drive, or you just want to load a Linux desktop just to see what it’s all about, let’s look at how you start your machine using rescue USB boot media.
How to boot a Mac from USB media
Getting your Mac to load from a USB drive is fairly straightforward.
- Insert the USB boot media into an open USB slot.
- Press the Power button to turn on your Mac (or Restart your Mac if it’s already on).
- When you hear the startup chime, press and hold the Option key. Holding that key gives you access to OS X’s Startup Manager. Once the Startup Manager screen appears, release the Option key. The utility will look for any available drives that include bootable content.
- Using either the pointer or arrow keys on the keyboard, select the USB drive you wish to boot from.
- Once selected, either hit the Return key or double-click your selection. The machine will start to boot from the USB drive.
NOTE: Have multiple USB devices connected to your Mac? Don’t worry. The Startup Manager only lists drives that include bootable content.
Boot from USB: Windows
Starting your PC using USB rescue media is not difficult, although it first requires an adjustment in the BIOS (Basic Input Output System). That’s because the BIOS settings include the boot sequence the machine follows when starting up. The boot order tells the machine which devices to search for the software needed to launch the computer and the priority each device in that search.
If you’re booting from USB media, you must change the BIOS boot order so the USB device is listed first. Otherwise the computer will load from the hard drive as normal.
Start by plugging the thumb drive into a USB port. Then to change the BIOS boot sequence:
If you’re booting from USB media, you must change the BIOS boot order so the USB device is listed first. Otherwise the computer will load from the hard drive as normal.
Start by plugging the thumb drive into a USB port. Then to change the BIOS boot sequence:
- Press the Power button for your computer.
- During the initial startup screen, press ESC, F1, F2, F8 or F10. (Depending on the company that created your version of BIOS, a menu may appear.)
- When you choose to enter BIOS Setup, the setup utility page will appear.
- Using the arrow keys on your keyboard, select the BOOT tab. All of the available system devices will be displayed in order of their boot priority. You can reorder the devices here.
- Move USB to be first in the boot sequence.
NOTE: If you cannot find USB or Removable Devices among the device options, your BIOS may list it under Hard Drive Devices. In that case, you’ll need to:- Move Hard Drive Devices to the top
- Expand to show all hard drive device options
- Move USB device to the top of that hard drive list
- Save the change and then exit the BIOS Setup.
- The computer will restart using the new settings, booting from your USB drive.
- Stay alert! Depending on your BIOS, you may be prompted with a message to Press any key to boot from external device and you will only have a few seconds to respond. If you do nothing, your computer will go to the next device in the boot sequence list, which will likely be your hard drive.
In the future, your computer will first check the USB port for boot media when starting up. That won’t be a problem, since the BIOS will move to the next device in the boot sequence .. unless you keep the boot media in the USB port. Then the system will launch from that device every time.
Linux USB Boot Process
Ubuntu Live Usb For Macbook Pro
To boot Ubuntu from USB media, the process is very similar to the Windows instructions above.
- Confirm the BIOS boot sequence lists the USB drive first, or make that change as needed.
- After the USB flash drive is inserted into the USB port, press the Power button for your machine (or Restart if the computer is running).
- The installer boot menu will load, where you will select Run Ubuntu from this USB.
- Ubuntu will launch and you can begin to working in the system – setting preferences, reconfiguring the system as needed, or running any diagnostic tools.
Creating USB boot media
Regardless of the operating system you are using, booting your machine from USB media does not need to be difficult. A general understanding how your system loads can provide the basics needed to understand what is going on when you use boot media.
Creating USB boot media doesn’t need to be difficult either, although there are several options to consider.
For Mac users, we recommend visiting Apple’s support page on USB boot media. It provides guidance that is specific to the iteration of OS X you are running (i.e. Sierra, High Sierra, Yosemite, etc.) to help you get the boot version you need.
Windows and Linux users might consider Acronis Disk Director 12, which includes an intuitive Boot Media Builder that streamlines the process and offers tremendous flexibility for the type and kind of boot media you can create, including WinPE media.
Creating USB boot media doesn’t need to be difficult either, although there are several options to consider.
For Mac users, we recommend visiting Apple’s support page on USB boot media. It provides guidance that is specific to the iteration of OS X you are running (i.e. Sierra, High Sierra, Yosemite, etc.) to help you get the boot version you need.
Windows and Linux users might consider Acronis Disk Director 12, which includes an intuitive Boot Media Builder that streamlines the process and offers tremendous flexibility for the type and kind of boot media you can create, including WinPE media.