You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
marcosfad e249af293f
Merge pull request #50 from marcosfad/feature/multipleKernels
1 month ago
.github Build image with multiple kernels 4 months ago
files Fix build 2 months ago
.gitignore Build image with multiple kernels 4 months ago
01_build_file_system.sh Build image with multiple kernels 4 months ago
02_build_image.sh Build image with multiple kernels 4 months ago
03_prepare_iso.sh Create multiple releases 2 years ago
04_create_iso.sh Build image with multiple kernels 4 months ago
README.md Merge pull request #50 from marcosfad/feature/multipleKernels 1 month ago
build.sh Build image with multiple kernels 4 months ago
build_in_docker.sh Build image with multiple kernels 4 months ago

README.md

mbp-ubuntu

The ISO in from this repo should allow you to install ubuntu without using an external keyboard or mouse on a MacBook Pro. It work in my MacBook with T2.

CI

If this repo helped you in any way, consider inviting a coffee to the people in the credits or me.

UBUNTU 20.04 ISO with Apple T2 patches built-in.

Apple T2 drivers are integrated with this iso.

This repo is a rework of the great work done by @mikeeq

I'm using the Kernel from - https://github.com/marcosfad/mbp-ubuntu-kernel

Using additional drivers:

Bootloader is configure correctly out of the box. No workaround needed.

Which kernel to choose

I've pre installed several different kernel, to allow better support to different hardware.

If your macbook came with Big Sur preinstalled, you should use a bigsur version of kernel.

If your macbook came with mojave, you should use a mojave version of the kernel.

This will allow you to activate wifi in your macbook. See this page for more information about wifi drivers

I've recommend starting with the HWE Kernel. That one comes from Ubuntu own repository and I have had great performance with it.

Installation

  1. Reduce the size of the mac partition in MacOS
  2. Download ISO file from releases. (Use the command line to unzip (unzip /path/to/file.zip) or "The Unarchiver" app)
  3. Copy it to a USB using dd (or gdd if installed over brew):
diskutil list # found which number has the USB
diskutil umountDisk /dev/diskX
sudo dd bs=4096 if=ubuntu-20.04-5.6.10-mbp.iso of=/dev/diskX
  1. Boot in Recovery mode and allow booting unknown OS
  2. Restart and immediately press the option key until the Logo come up
  3. Select "EFI Boot" (the third option was the one that worked for me)
  4. Launch Ubuntu Live
  5. Use Ubiquity to install (just click on it)
  6. Select the options that work for you and use for the partition the following setup:
    • Leave the efi boot as preselected by the installer. Your Mac will keep on working with out problems.
    • Add a ext4 partition and mounted as /boot (1024MB).
    • Add a ext4 partition and monted as / (rest).
    • Select the /boot partition as a target for GRUB installation, otherwise the system won't boot.
  7. Run the installer (In my case it had some problem removing some packages at the end, but this is no real problem)
  8. Shutdown and remove the USB Drive
  9. Start again using the option key. Select the new efi boot.
  10. Enjoy.

See https://wiki.t2linux.org/distributions/ubuntu/installation/ for more details.

Configuration

# /etc/modprobe.d/hid_apple.conf
options hid_apple swap_fn_leftctrl=1
options hid_apple swap_opt_cmd=1
  • I switch the touchbar to show f* by default. If you like another configuration, change /etc/modprobe.d/apple-tb.conf or remove it.
  • To update grub, run: grub-mkconfig -o /boot/grub/grub.cfg

MISC

Activate Grub Menu

For the people who want to have a menu, they can modify /etc/default/grub with the following changes:

GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=10

and then: sudo update-grub

Update to newer kernels

IF YOU UPDATE THE KERNEL, REMEMBER TO ADD THE REQUIRED DRIVERS AGAIN.

The easy way:

The live cd includes dkms and will automatically run when a new kernel is installed. You can use dkms status to see it.

If you are upgrading from 5.7.19 to a newer kernel version (5.10+), you will need updated versions of these kernel modules. Instructions for installing updated ones are here.

Another way:

Check https://github.com/marcosfad/mbp-ubuntu/blob/master/files/chroot_build.sh to see how it is done.

Know issues

Not working (Following the mikeeq/mbp-fedora)

TODO

  • ISO is using gzip initramfs. It would be great to change it lz4
  • Optimize the software installed.

Known issues (Following the mikeeq/mbp-fedora)

  • Kernel/Mac related issues are mentioned in kernel repo
  • ctrl+x is not working in GRUB, so if you are trying to change kernel parameters - start your OS by clicking ctrl+shift+f10 on external keyboard

Docs

Ubuntu

Github

Credits

  • @mikeeq - thanks for the amazing work in mbp-fedora
  • @MCMrARM - thanks for all RE work
  • @ozbenh - thanks for submitting NVME patch
  • @roadrunner2 - thanks for SPI (touchbar) driver
  • @aunali1 - thanks for ArchLinux Kernel CI, the continuous support on discord and your continuous efforts.
  • @ppaulweber - thanks for keyboard and Macbook Air patches
  • @kevineinarsson - thanks for the audio settings