Overview
- Use BootCamp to install Windows
- Shrink the Windows partition
- Create additional partitions
- Install Linux via USB stick
- Fix the Windows boot process (error 0xc000000e)
- Install reFind (if you do not want to press ALT key on every startup to select different OS)
- Install ntfs-3g in OSX and Linux to access the shared data partition
NOTE: The following procedure is not without risk. Do not follow it unless you know what you are doing and most of all: create a backup first ! I will not take any responsibility for loss of data or wrecked OS installations (incl. the original OSX).
NOTE2: I strongly recommend to create a MACOS install USB form the running MACOS, with the latest supported MACOS for your Macbook/IMac
Preparation
To make necessary changes to system files, you must disable the integrity checks of BIG SUR
- Reboot your Mac and at the boot chime, press cmd-r to boot into the recovery image.
- Once loaded, in the top menu select Utilities->Terminal
- To disable the integrity protection, enter
csrutil disable
- Type
reboot
to reboot into standard OSX. You can check withcsrutil status
if it’s enabled or not.
Installation of Windows
Preconditions
- There should be only one partition on the disk for OSX – otherwise BootCamp will refuse to do its work.
- On a CD-less Mac, you’ll need the ISO images of Windows 8 or 10, not the CD. To download them without direct access to Microsofts Download center, use TechBench and get e.g. Win10 final ISO)
Steps
- Start BootCamp (Applications/Utilities/Bootcamp Assistant)
- Specify the downloaded ISO and select the partition sizes. Here, only the OSX partition size will be final – let Windows take the rest (for now). I used 100GB for OSX.
- Let Bootcamp install Windows and restart as desired.
- In the Windows Install Screen, delete de Bootcamp partition for Windows (cretead by MACOS), and create a 100GB partition for Windows, another 25GB partition for Ubuntu, another one for Shared Data (220GB, and the rest for rEFInd boot manager. DO NOT change anything on the first two partitions !!! The first one is the EFI partition required to boot the system. The second is the HFS+ partition which contains the OSX
- Once the partitions are configured to your satisfaction, continue the BootCamp installer.
- Under Windows, format all 3 extra partitions created from the Installler
Installation of Linux
Precondition
- You have prepped all partitions as described above.
- You have downloaded a 64bit variant of a Linux distribution (I chose Ubuntu Desktop). Make sure to use the 64-bit variant and not the one built for Macs. The Mac image doesn’t support EFI partitions yet. It will boot up in BIOS mode and write a MBR to the disk instead of the necessary EFI files on the first partition
- You also have a 2GB+ USB stick at hand which can/will be erased.
Steps
- Reboot the Mac and press the Alt key during boot.
- Select the USB stick in the boot selection menu (choose the EFI option).
- When prompted, choose “Try ubuntu” and NOT “Install Ubuntu” – once the desktop has loaded, start “Install Linux” from there.
- IMPORTANT: Once you arrive at the partitioning step, do NOT let Ubuntu repartition your disk. Choose “Do something else” – otherwise you really do something else (like pay a visit to the Mac store to re-install OSX + recovery image).
- Check that the first partition is recognized as EFI boot partition (/dev/sda1).
- Select the partition intended to install Linux (in my setup it was the /dev/sda5, 25GB) and click on “Change”. Format the disk as ext4 partition and assign it to “/”.
- IMPORTANT: before you continue, select the same partiton used for Ubuntu Installation, as target for the bootloader installation.
- Check again in the partition overview that only the partitions you want to install Linux on, or want to use as swap disk, have the “Format?” checkbox checked. If not, start over by clicking “revert”.
- Let the installation finish (do not install updates during installation as the wifi probably won’t work yet). If you did not choose a swap partition, you might get a warning. Ignore it.
- After the installation of Linux, Windows 10 will not boot anymore and stop with a blue screen error 0xd000000e. This is because the Linux installation creates a hybrid MBR which is completely unnecessary. Windows will not boot in EFI mode but in BIOS mode instead and crash.
- Open a terminal and start
sudo gdisk /dev/sda
(if it’s not installed, reboot into Linux, try again or install withsudo apt-get install gdisk
) - Type
p
to view the partition table to verify you’re working on the correct disk. If not, typeq
to quit without saving your changes and try again with another device. - Type
x
to enter the experts’ menu. - Type
n
to create an empty protective MBR. Note that gdisk won’t confirm a change; it’ll just show you a new experts’ prompt. - Type
w
to save your changes. You’ll be asked to confirm this action. Do so. - Reboot into Linux (if not done already)
- Click on System Settings -> Display and set Scale for menu and title bars to 1.50
- Optional: to fix small fonts of grub during boot, execute
sudo grub-mkfont -s 36 -o /boot/grub/DejaVuSansMono.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
and add the following line at the endsudo vi /etc/default/grub
:GRUB_FONT=/boot/grub/DejaVuSansMono.pf2 - To fix freezes with SSD disks edit
/etc/default/grub
so the line with GRUB_CMD_LINUX reads:GRUB_CMDLINE_LINUX=”libata.force=noncq” then executesudo update-grub
Installation of reFind
Steps
- Boot to MACOS
- From Disk Utility, format the last partition (about 5GB) with “Mac OS Extended (Journaled)”, an label rEFInd
- Download the rEFInd Boot Manager software from this SourceForge web site. Enter the following commands to install the software to the “Macintosh HD via rEFInd” volume. Run the following commands from terminal (/dev/disk0s3 is the disk prepped for rEFInd boot manager)
cd ~/Downloads/refind-bin-0.13.2
./refind-install --ownhfs /dev/disk0s3
cd "/Volumes/rEFInd/System/Library/CoreServices"
sudo chmod a+w . refind.conf
Restart the Mac and immediately hold down the option key until the Startup Manager icons appears. Next, hold down the control key and select to boot from the rEFInd
volume.
If the rEFInd menu doea not apear at boot, or you can not select it when pressing the ALT key, use the following command form MACOS (reinstall rEFInd boot file to main EFI boot:
sudo bless --mount /Volumes/rEFInd --setBoot --file /Volumes/rEFInd/System/Library/CoreServices/refind_x64.efi --shortform
In my tests, i had run in to a problem once, where i lost the abilty to boot to MACOS (after installing rEFInd). I simply reinstalled MACOS from the USB key created at the beginning of this tutorial.
Installation of ntfs-3g
To be able to access the shared data partition from all OS, you must install ntfs-3g on OSX
Linux
Linux already comes with ntfs-3g pre-installed.It mounts the Shared DATA drive automatically
OSX
- Download and install OSXFUSE (it’s a pre-condition for ntfs-3g)
- Download and install Open Source ntfs-3g . Although this free edition doesn’t offer caching, it works fine and sufficiently fast. You might also choose the commercial edition maintained by Tuxera
Last info-s (problems):
- Suspending the computer in Windows or Linux will cause the Mac to freeze –> it’s best to disable this in the respective power configuration tools.
- Bluetooth and the facetime camera don’t work properly yet. There are some beta drivers available but they might not work properly yet.
References
- https://www.hongkiat.com/blog/install-windows-on-mac
- https://www.makeuseof.com/tag/install-linux-macbook-pro
- https://www.makeuseof.com/tag/how-to-boot-a-linux-live-usb-stick-on-your-mac/
- https://www.rodsbooks.com/refind/
- https://superuser.com/questions/508026/windows-detects-gpt-disk-as-mbr-in-efi-boot
- https://help.ubuntu.com/community/MacBookPro12–1/Wily