Requirements
You should have a USB Hub or similar with enough ports for
![17.10 17.10](/uploads/1/1/8/7/118791969/611844152.jpg)
- One LiveUSB
- One USB Storage Device fast enough to run an OS from (e.g. SanDiskUltra Fit); we shall call this the target device from here on.
- One input device (USB keyboard and mouse required; for ease twoports recommended)
As well as a MacBook running a macOS version between El Capitan andHigh Sierra (inclusive).
Download Ubuntu desktop, Ubuntu Server, Ubuntu for Raspberry Pi and IoT devices, Ubuntu Core and all the Ubuntu flavours. Ubuntu is an open-source software platform that runs everywhere from the PC to the server and the cloud. Macbook pro 7,1 and ubuntu 14.04 trusty tahr this page aims to describe the steps needed, to fully enable all features of the macbookpro 7,1 release date, mid 2010 when using ubuntu 14.04, codename 'trusty tahr'. Recently i switched from a macbook pro late 2013 to a new mbp 2018, and i setup virtualbox with same settings on the new computer. I skipped 17.04, since it didn’t seem to add much that I was excited about, but 17.10 has switched from Unity back to Gnome3, so I wanted to give it a try. I did a fresh install of 17.10 on my Macbook Pro Retina mid-2012 (rMBP 10,1). It continues to simplify the installation process, and seems quite stable so far. Improved from 16.10 No longer need to use rEFInd Hi-DPI scaling!
We're talking about Ubuntu 16.04 (or even the latest Beta of 16.10). Both are available as PowerPC image files thanks to some pretty active community support and demand to use old G5 Macs as. Cons Of The MacBook Pro. Touch bar sensitivity can be problematic. Dell Precision M7710 for Ubuntu. This offering from Dell is a heavy-duty option for those who need a proper workstation for various computer tasks. Fortunately, not only does the hardware support Ubuntu but it can also be chosen to be preinstalled in lieu of Windows.
You should be comfortable running commands on terminal;
bash
isassumed.Caveats
- Internal speaker and headphone jack output is still not working(probably).
- Chaining GRUB2 bootloader probably needs to be manually (possiblyautomatable) rebuilt every kernel update, and probably the keyboardand touchpad drivers too.
- Seems like installing GRUB2 adds a folder to the internal SSD’s EFIpartition that may mess with the MacBook’s native bootloader’sbootable-partition discovery process and its BOOTCAMP bootloadingprocess. This is not a major issue as
- The bootloading process where one holds the
Option
key andchooses which volume to boot into still works fine, - Booting into Windows through GRUB2 is possible,
- Removing the
ubuntu
folder from the EFI Partition, resetting thedefault boot partition to the macOS partition from within macOS,and not connecting the external drive containing Ubuntu shouldrevert things to a normal state.
- The bootloading process where one holds the
- I strongly do not recommend installing Ubuntu to the internal driveas macOS upgrades tend to assume several things about thepartitioning state of the internal SSD and messing around with itoutside of Disk Utility and the Bootcamp-proscribed instructions maymess stuff up. In particular, note the upgrades beginning withYosemite that converted HFS+ partitions so that they were withinCoreStorage containers, and the upgrades beginning with High Sierrathat converted HFS+ filesystems into APFS filesystems.
The Stages
- Preparing the LiveUSB.
- After this stage you should have a USB containing a live imagethat you can boot into from your MacBook.
- Preparing the target device to make it bootable.
- After this stage you should have a partition that your MacBook recognizes as a partition containing macOS that it can boot into.
- Installing Ubuntu to the target device.
- After this stage you should have an Ubuntu installation in your target device that might not be bootable into.
- Installing the bootloader.
- After this stage you should be able to boot into the Ubuntu installation, but keyboard and mouse support may not be present.
- Installing and configuring internal keyboard and touchpad drivers.
- After this stage your Ubuntu should have internal keyboard and touchpad support, but it may no longer be bootable.
- Rebuilding and reinstalling the bootloader.
- After this stage you should be able to boot into the Ubuntu installation and be able to use your mouse and keyboard.
- This stage is similar to Stage 4, and I think it must be re-performed everytime you update the kernel of your installation.
Stage 1: Preparing the LiveUSB
- Download the Ubuntu 17.10 x86_64 Desktop image. I have not triedthe other versions, which may have slightly different installationinstructions in stage 3. The 17.10 Beta 2 desktop image suffices.
- We convert the
.iso
image file into a.dmg
disk image file that thenative bootloader recognizes as bootable. - We insert our Live-USB-to-be. Confirm the location that our LiveUSB-to-beis at with It should be identified by a name of the form
diskN
for someintegerN
. Then ensure that none of the partitions present on thedisk are mounted with - We now burn the
.dmg
file to the disk withNote that writing tordiskN
is speedier than writing todiskN
as it skips several layers of software abstraction. Nevertheless,depending on the USB standard your LiveUSB supports, it may stilltake quite a while.
We are done with this stage. Unmount your LiveUSB.
Stage 2: Preparing the Target Device to Make It Bootable
- Insert the target device. Let
diskN
be its identifier; as before,we may discover its identifier withdiskutil list
. - Erase the disk, write a GPT and EFI partition and a Journaled HFS+ partitionto it with
- Split the JHFS+ partition into a 128MB (size is pretty arbitrary;ex. we have used MB and not MiB) partition for the GRUB2 bootloaderand a partition for our installation with a command like
- We now mount the “Ubuntu Boot Loader” partition and navigate ourterminal shell into its root; the standard Finder mountingsuffices, whereupon it will be located at
/Volumes/Ubuntu BootLoader
. - We create the necessary folders necessary for the MacBook torecognize it as a macOS installation
- We create a
.plist
text file atSystem/Library/CoreServices/SystemVersion.plist
with the contents - Finally, we set the Apple-specific boot flag for the partition with where
M
is the partition identifier of the “Ubuntu Boot Loader”partition, which can be discovered withdiskutil list
.
We are done. Insert the LiveUSB and shutdown or restart the MacBook.
Ubuntu 20.04 On Macbook Pro
Stage 3: Installing Ubuntu
We assume that the LiveUSB and the target device are both plugged in,and that the reader shall connect external input devices wheneverrequired for input.
- When the MacBook starts, immediately during or before the bootupchime, hold down the
Option
button to enter the nativebootloader. Select any of the “EFI Boot” options. - You should boot into the LiveUSB’s GRUB2 bootloader. Select “TryUbuntu without installing”. Your internal keyboard still works inthe GRUB2 bootloader
- You should arrive at the Live Ubuntu desktop. You should need anexternal keyboard and mouse while in this environment. Proceed withinstallation as per usual, except for the following part.
- At “Installation type”, and presented with where and how on thedisks you wish to install Ubuntu, select “Something else”. I do notlike connecting to the Internet and updating just yet; we may dothat later.
- Select to format the partition that was
diskNsM
in macOS asext4
, and use it as the root/
mount point. Choose to installthe bootloader in the same partition, that is, the partition thatwasdiskNsM
in macOS. Leave every other partitions and drivesalone. - Proceed and complete the installation, but do not reboot just yet.
Stage 4: Making Ubuntu bootable
You should now be booted into a Live Ubuntu OS. You should have boththe LiveUSB connected from which you are running the OS, and also haveyour target device connected. We shall identify the partition that youhave installed Ubuntu 17.10 to by
sdAN
where A
is some small-capsletter and N
is some integer.We now build the GRUB2 bootloader.
- We mount the Ubuntu 17.10 partition. It suffices to use GNOME’sdefault mounting, whereupon it will be availabe at some locationlike
/media/ubuntu/some_uuid_string/
- We bind our Live Ubuntu’s special files so that they are available when we
chroot
into our Ubuntu 17.10 installation with - We
chroot
into our Ubuntu 17.10 installation with - We configure GRUB2 with
- We build GRUB2 into a
boot.efi
located (for convenience) at the root of ourUbuntu 17.10 installation with - From outside the
chroot
‘d shell (that is, from the Live Ubuntudesktop), save yourboot.efi
file somewhere from your macOSinstallation (e.g. Google Drive). - Reboot into macOS. Due to how the native bootloader searches for bootablepartitions, from now on you may have to always hold down the
Option
button and select the location you would like to bootinto, else you may arrive at a GRUB2 fallback shell. - Mount the “Ubuntu Boot Loader” partition. From the Terminal,(since Finder glitches out in that directory) copy the GRUB2 image into the partition with
- It does not seem likely, but you may have to re-bless the “UbuntuBoot Loader” partition.
We are done. Your Ubuntu 17.10 installation should now be bootable.
Stage 5: Building, configuring, and installing the keyboard and touchpad drivers
You do not need the LiveUSB from here on. Reboot the MacBook with
Option
key held down while booting, and select “Ubuntu Boot Loader”.You should boot into GRUB2, and should be able to select an Ubuntumenu entry to boot onto your Ubuntu 17.10 installation. From here onyou may need to perform input via an external keyboard and mouse. Login.- Connect to the Internet.
- Update your package lists and then update your system (upgrade)with and thenYou may be prompted to restart your system, but it is important notto just yet.
- Install git and the build tools you will need with
- Download the experimental keyboard and touchpad drivers with
- Build the drivers as kernel modules
- Install the kernel modules
- Write a configuration file to set the touchpad to an appropriateDPI. The file should be located at
/etc/udev/hwdb.d/61-evdev-local.hwdb
and its contents should be - We configure the modules to load on boot with
You should now have a system that should load the drivers upon boot.But (I’m unsure about this point) you may have to rebuild your GRUB2bootloader to correctly identify the kernel to boot into.
Stage 6: Rebuilding the GRUB2 Bootloader
After every system update (upgrade) that rebuilds the kernel, youshould re-run this step.
- Reconfigure GRUB2.
- Rebuild GRUB2
- Upload
boot.efi
to some place accessible by macOS. - Reboot into macOS.
- Mount “Ubuntu Boot Loader” and replace the old
boot.efi
file inthat partition with the newboot.efi
file. Remember that it mustbe done with the Terminal as Finder glitches out. - I doubt this must be done, but you may need to re-bless the partition.
Acknowledgments
- Nailen Matschke ([email protected]) for instructions on how to bootinto Ubuntu from Apple’s native bootloader via intermediatelybooting into a standalone GRUB2 bootloader.
- github.com/chisNaN for easy instructions to install and configurethe keyboard and touchpad drivers.
NOTE: This is for dual-booting OS X 10.11 with Ubuntu 16.04.
Install
Preparation in OS X
Resize OS X partition with Disk Utility.
Download the Ubuntu 16.04 Desktop 64-bit ISO from ubuntu or download whatever flavor you might prefer.
I prefer using dd to create a LiveUSB.
Booting into the live USB
Shut down the Macbook.
Hold the Option (Alt) key, and then press the power button for a couple seconds until you see the menu to choose a startup disk; select the LiveUSB (which will be labelled as EFI).
Ubuntu
Use gparted to create an
ext2
partition of 512MB after the third partition, which is the OS X Recovery HD, and an ext4
partition with the remaining free space.Choose 'Something else', and then mount the newly created
ext2
as /boot
, and /dev/mapper/vgcrypt
as /
. Keep FORMAT unchecked.Choose to 'Continue testing', DO NOT reboot yet.
You will then need to
chroot
into the new system.My /etc/fstab looks something like this:
create /etc/crypttab:
NOTE I cannot remember whether this was actually necessary. I believe it may only be necessary when you need to mount an encrypted swap.
The UUID is determined from a previous step.
Back in chroot:
Install bootloader with systemd-boot
DO NOT REBOOT YET.
Outside of the
chroot
environment, you'll need to mount the EFI System Partition (ESP) which lives on /dev/sda1
to where the newly-installed Ubuntu partition maps the ESP:Then, from within the
chroot
, copy the kernel and initrd to /boot/efi
:Create the needed directories.
Then, create
/boot/efi/loader/loader.conf
with the contents:Create a
/boot/efi/loader/entries/ubuntu.conf
:Then, finally, install the bootloader and set
systemd-boot
as the default:Post-Install
Get WiFi working
You don't need an internet connection to get WiFi to work. Just plug in the LiveUSB you used to install Ubuntu. Once it's mounted, you'll see a folder,
/path/to/USB/pool
. This is where you can get the drivers.You'll need to copy
pool/main/d/dkms-*.deb
and pool/restricted/b/broadcom-*.deb
to, say, ~/Desktop.This should automatically load the WiFi module.
More stuff
NVIDIA (optional)
NOTE It is not necessary to install the propriety nvidia drivers, unless you are doing some intensive graphics work that the open-source nouveau driver can't handle as well.
In Additional Drivers, enable nvidia-361. Then run
You'll then need to reboot.
Notes on Propriety NVIDIA Graphics
- I would stick with text-only boot for Ubuntu (i.e. no splash screen) because it freezes at the prompt for the encrypted volume pass.
- The first time I rebooted after installing NVIDIA drivers, I had a black screen. Had to force shutdown (by pressing the power button for 8 seconds), since I could not switch to a TTY, either. But on the second boot, I was able to proceed.
- ~My laptop ran really hot for the first few uses of Ubuntu 16.04, but cooled down over time. Really odd...~ It runs really hot.
- Take a look at xorg.conf.
- rc.local is necessary to get brightness control to work.
Graphics
This machine can run really hot when the discrete GPU, the NVIDIA card, is turned on, even if using the propriety drivers. Since I don't really do any intensive gaming or CUDA programming on this machine and need it to be portable, I keep the discrete GPU off and so use the integrated Intel card.
You do not have to install the nouveau or intel drivers manually, but for reference sake (or in case you need to reinstall them), the packages are
xserver-xorg-video-intel
and xserver-xorg-video-nouveau
.- systemd-vgaswitcheroo-units Set of scripts to turn off the discrete GPU at boot. NOTE This only works if you are using the open-source, Nouveau drivers rather than the NVIDIA ones.
- gpu-switch Script to switch between Intel and NVIDIA cards. However, requires that you restart your Macbook.
Updating the kernel
If you're using rEFInd as a bootloader, or
bootctl
(included in systemd
), after installation you will need to copy the initrd and vmlinuz files to /boot/efi
(where your actual EFI system partition is mounted in Ubuntu):