2 USB drives > 2GB
- Grab the latest Ubuntu Desktop iso image
- Convert iso to img
hdiutil convert -format UDRW -o ~/ubuntu.img ~/Downloads/ubuntu-15.10-desktop-amd64.iso
- NOTE: .dmg will be appended to the output filename.
- Determine the device node of the USB drive
- List the currently connected devices:
diskutil list
- Insert USB drive
- List the currently connected devices again:
diskutil list
- Compare two outputs to determine the device node
- Unmount the USB drive
diskutil unmountDisk /dev/diskN
(where N is the device node from step 3)
- Write the image to the USB drive
sudo dd if=~/ubuntu.img.dmg of=/dev/rdiskN bs=1m
(where N is the device node from step 3)- NOTE: You'll want to use /dev/rdisk instead of /dev/disk for faster write speeds
- Eject the USB drive
diskutil eject /dev/diskN
(where N is the device node from step 5)
These steps were paraphrased from here
It's important to resize your disk using Disk Utility from inside of MacOS instead of using the Ubuntu installer. Don't worry about creating all the individual partitions right now, the partition creation will be handled during the install.
- Open Disk Utility in MacOS
- Choose
Macintosh HD
on the left side of the window - Click on
Partition
on the right side of the window - Click the + to add a new partition
- Resize the new partition and choose to leave it as free space
Download the packages for bcmwl-kernel-source and dkms to another USB drive. We will use these packages in a later step to enable wifi.
Plug in the USB drive that contains your Ubuntu image and reboot your Macbook. Once the screen goes black, hold down the Alt key until you see the boot menu. Choose EFI boot from the boot menu. You will be presented with the Grub menu, select 'Install Ubuntu'.
IMPORTANT: When you reach the screen in the installer titled "Installation Type", you must choose the option "something else". This allows for custom partitioning, if you let the installer choose, you may not be happy with the result.
Create whatever partitioning scheme you'd like, for example:
swap swap 4GB
/ ext4 10GB
/home ext4 Remainder
NOTE: I recall reading somewhere that it was important to leave the 0MB free space partition between the MacOS partitions and the linux partitions, but I have been unable to find that reference.
IMPORTANT: Under Device for bootloader
, ensure the EFI partition is selected /dev/sda1
Finish up the installation and boot into Ubuntu.
Insert the USB drive that you downloaded deb packages to earlier, and then install the packages.
For my machine, the command looked like this:
cd /media/charlie/MISC
sudo dpkg -i bcmwl-kernel-source_6.30.223.248+bdcom-0ubuntu7_amd64.deb dkms_2.2.0.3-2ubuntu6_all.deb
Append the following lines to /etc/grub.d/40_custom
:
menuentry "MacOS" {
exit
}
Change these options in /etc/default/grub
:
#GRUB_HIDDEN_TIMEOUT=0 # Disable hidden Grub
#GRUB_HIDDEN_TIMEOUT_QUIET=true # Disable hidden Grub
GRUB_TIMEOUT=5 # [Optional] Set smaller timeout (default was 10)
GRUB_CMDLINE_LINUX="libata.force=noncq" # Linux parameter to prevent occasional SSD freezes
GRUB_DEFAULT=2 # [Optional] Default to MacOS entry
On the command line execute the following:
sudo grub-mkfont -s 36 -o /boot/grub/DejaVuSansMono.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
Open and edit again /etc/default/grub and add the following line at the bottom:
GRUB_FONT=/boot/grub/DejaVuSansMono.pf2
sudo update-grub
This is caused by a bug in the network-manager.
You can verify this by running the following to see if wifi returns:
sudo systemctl restart network-manager.service
To automate restarting network-manager, create /etc/systemd/system/wifi-resume.service
and paste the following into it:
#/etc/systemd/system/wifi-resume.service
#sudo systemctl enable wifi-resume.service
[Unit]
Description=Restart networkmanager at resume
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target
[Service]
Type=oneshot
ExecStart=/bin/systemctl restart network-manager.service
[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target
Finally run this to activate it:
sudo systemctl enable wifi-resume.service
The Macbook Pro's fan requires a daemon to adjust the speed.
Add the following to /etc/modules
:
coretemp
applesmc
Install build-essential
package:
sudo apt install build-essential
Clone the mbpfan
source:
git clone git@github.com:dgraziotin/mbpfan.git
Follow directions found here to build and install: A beginner's tutorial for mbpfan under Ubuntu
The most important issue I have found so far is the high CPU usage by kworker (i.e. Linux Kernel worker thread), which seriously affects the battery life. Apparently this is caused by an interrupt storm on ACPI interrupt GPE06, as described here. You can verify it by checking if interrupt GPE06 contains a high value:
$ grep . -r /sys/firmware/acpi/interrupts/
...
/sys/firmware/acpi/interrupts/gpe05: 0 invalid
/sys/firmware/acpi/interrupts/gpe06: 2938373 enabled <---
/sys/firmware/acpi/interrupts/gpe07: 0 enabled
...
A quick solution for this issue is to disable this interrupt, i.e.
echo disable > /sys/firmware/acpi/interrupts/gpe06
In order to disable it on every boot, you can add the previous line to /etc/rc.local, just before exit 0.
Create /etc/systemd/system/keyboard-map.service
and paste the following into it:
#sudo systemctl enable keyboard-remap.service
[Unit]
Description=Remap keyboard keys
After=multi-user.target
[Service]
Type=oneshot
ExecStart=/usr/bin/setxkbmap -device $(/usr/bin/xinput list --id-only "keyboard:Apple Inc. Apple Internal Keyboard / Trackpad") -option "altwin:swap_alt_win"
[Install]
WantedBy=multi-user.target
Finally run this to activate it:
sudo systemctl enable keyboard-remap.service
http://askubuntu.com/questions/29731/rebind-alt-key-to-win-using-setxkbmap https://lampjs.wordpress.com/2015/06/26/remapchange-your-secondaryusb-keyboard-keys/
Installing Ubuntu 15.04 on a Macbook Pro 11,2
Installing Ubuntu 15.10 - Wily Werewolf on a Macbook Pro 12-1 (2015)
I did everything but when i click on the MacOS option it just goes back to the same grub menu, if the MacOS option is selected again then it just goes to a blank screen