4 ms·
For people who want to install Ubuntu on MBP14,2 or 14,3 (the new MBPs with four thunderbolt 3 ports) — this[0] might help. (It'll be probably trivial to update
by pcr910303 7y ago
For people who want to install Ubuntu on MBP14,2 or 14,3 (the new MBPs with four thunderbolt 3 ports) — this[0] might help. (It'll be probably trivial to update the article for Ubuntu 20.04 - just ignore the upgrading the kernel parts.)
It mentions adding the touchbar, keyboard drivers[1] and fixes for the non-working wifi[2], all without an external keyboard or anything. You can just boot up your Ubuntu virtual machine, execute some commands in the chroot environment & make an bootable ISO.
This gist[3] and this GitHub repo[4] might also be worth to check out - although it looks like a bit lagging in information (the wifi fix, added last November isn't reflected yet).
This is my command checklist (tweaked from this[0] to match my prefs), might be helpful for someone?
### check if pwd is ~/Download
# ask password beforehand
sudo -v
# mounting iso and copying to current file
sudo mkdir -p /mnt/iso
sudo mount ubuntu-20.04-desktop-amd64.iso /mnt/iso
mkdir customiso
rsync -a --exclude=casper/filesystem.squashfs /mnt/iso/ customiso/
sudo unsquashfs /mnt/iso/casper/filesystem.squashfs
sudo umount /mnt/iso
# chrooting
sudo mount --bind /dev squashfs-root/dev/
sudo chroot squashfs-root/
PS1="(chroot) $PS1"
LC_ALL=C
HOME=/root
export PS1 HOME LC_ALL
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devpts none /dev/pts
# updating
mv /etc/resolv.conf /etc/resolv.conf.bak
echo 'nameserver 1.1.1.1' | tee /etc/resolv.conf
### change apt mirror list
apt update
apt upgrade
apt dist-upgrade
apt autoremove
apt -f install
# installing driver
apt install git dkms
echo -e "\n# macbook12-spi-drivers\napplespi\nappletb\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules
git clone https://github.com/roadrunner2/macbook12-spi-driver.git /usr/src/applespi-0.1
dkms install -m applespi -v 0.1
cat > /etc/udev/hwdb.d/61-evdev-local.hwdb << 'EOF'
# MacBook8,1 (2015), MacBook9,1 (2016), MacBook10,1 (2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook8,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook9,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBook10,1:*
EVDEV_ABS_00=::95
EVDEV_ABS_01=::90
EVDEV_ABS_35=::95
EVDEV_ABS_36=::90
# MacBookPro13,* (Late 2016), MacBookPro14,* (Mid 2017)
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,2:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,1:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,2:*
EVDEV_ABS_00=::96
EVDEV_ABS_01=::94
EVDEV_ABS_35=::96
EVDEV_ABS_36=::94
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro13,3:*
evdev:name:Apple SPI Touchpad:dmi:*:svnAppleInc.:pnMacBookPro14,3:*
EVDEV_ABS_00=::96
EVDEV_ABS_01=::95
EVDEV_ABS_35=::96
EVDEV_ABS_36=::95
EOF
cat > /etc/udev/hwdb.d/61-libinput-local.hwdb << 'EOF'
libinput:name:*Apple SPI Touchpad*:dmi:*
LIBINPUT_MODEL_APPLE_TOUCHPAD=1
LIBINPUT_ATTR_KEYBOARD_INTEGRATION=internal
LIBINPUT_ATTR_TOUCH_SIZE_RANGE=200:150
LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1200
EOF
### edit wifi driver(https://bugzilla.kernel.org/show_bug.cgi?id=193121#c52)
# exiting chroot
mv /etc/resolv.conf.bak /etc/resolv.conf
umount /dev/pts
umount /sys
umount /proc
exit
sudo umount squashfs-root/dev/
sudo rm customiso/casper/filesystem.squashfs
sudo mksquashfs squashfs-root customiso/casper/filesystem.squashfs
cd customiso
sudo rm md5sum.txt
sudo find -type f -print0 | xargs -0 sudo md5sum | grep -Ev "./md5sum.txt|./isolinux/" | sudo tee md5sum.txt
cd ..
sudo xorriso -as mkisofs -r -V "ubuntu-for-mac" -R -l -o ubuntu-for-mac.iso -c isolinux/boot.cat -b isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat customiso/
[0]: https://nixaid.com/linux-on-macbookpro/ https://nixaid.com/linux-on-macbookpro/
[1]: https://github.com/roadrunner2/macbook12-spi-driver https://github.com/roadrunner2/macbook12-spi-driver
[2]: https://bugzilla.kernel.org/show_bug.cgi?id=193121 https://bugzilla.kernel.org/show_bug.cgi?id=193121
[3]: https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6...
[4]: https://github.com/Dunedan/mbp-2016-linux https://github.com/Dunedan/mbp-2016-linux