Installing Linux on a MacBook

The tip is for those who got sick of Apple’s original macOS system;
Or would just like to try a new system.

Introduction

There are cases where a person appreciates a certain company, the hardware it produces and its software.
And there are separate cases in which the user gets sick of the system or simply prefers the hardware, but wants to change the software, for whatever reason.

I won’t get into the details, because taste is taste and there’s no arguing.
The creator of Linux himself, our beloved Linus Torvalds, admitted.

And if you, macOS user and Linux enthusiast, want to do as Torvalds did and change your system, this is your tutorial.

Preparation

Tutorial tested in:

  • Ubuntu MATE 16.04.2 LTS installation
  • MacbookAir6 2 – 13″ 2015
    Intel Core i5
    8Gb of RAM

As far as I know, it works with any MacBook of any model and year.

You will need a USB stick of at least 8Gb.
The Ubuntu and Fedora flavors for example are 8GB.

For those who use Windows or Linux on some computer and are going to install Linux on a MacBook, follow the common procedure of burning the .ISO to the USB stick. Linux people can use Gnome Disks or even dd for this.

If you only have macOS and need to burn the .ISO to the USB stick using this system, follow the steps below!

  • Download and install an application called Etcher from etcher.io. It will copy your GNU/Linux .ISO to the USB stick.
  • Open Etcher, click on Settings in the icon in the upper right corner. Check the “Unsafe Mode” option and click Yes.
  • Select the .ISO image you downloaded.

Insert the USB stick that will be used to install the system.
Remember that the USB stick will be FULLY formatted for this.

  • Press “Change” in “Select Drive”.

Look carefully if the name matches that of the USB stick.
It should be /dev/disk1 if you only have 1 disk in your Macbook or /dev/disk2, /dev/disk3 and so on (if you have more than 1 HDD plugged in). Do not use /dev/disk0. This is your Mac’s default HDD. If you use disk0 you will format your MacOS prematurely! Caution.

  • Press “flash”. Wait for the .ISO to be written to the USB stick.
    Remove the stick and shut down your macOS.

Installation

Plug in the USB stick and turn on your Mac while holding down the Option key.
Choose “EFI Boot” corresponding to the USB stick and press Return.

You will be presented with the boot screen of your chosen Linux.

Optional: Don’t choose anything for the moment. Press “e” and edit the boot entry.
Edit the line that starts with Linux and put the word “nomodeset” after “quiet splash”.
The whole line will look like this:
“linux /casper/vmlinuz.efi file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash nomodeset –

As for the Optional step, I PERSONALLY don’t recommend it.
It was not necessary for the LiveUSB boot, so much that, with the parameter “nomodeset” I saw more errors during the boot. Without the parameter the boot went normally with functions like video, audio and internet driver working normally.

Press F10, initiating the boot from the USB stick.

Your system will now enter Test Without Install mode depending on the distro you have chosen. Or direct install, this is up to the user’s taste. From here, just click “Install…” on the desktop and follow the steps as they are presented, just like an ordinary PC installation.

Note
The modem of the Macbook Air model I tested was a BCM 4360, whose driver was disabled post-boot. Its driver is in LiveUSB, just do the command:

$ sudo apt install –reinstall bcmwl-kernel-source

that the driver (in the case of the BCM family) was picked up from liveUSB and enabled;
Wifi worked normally.

If it doesn’t work, explode the contents of LiveUSB, go to the “pool > restricted > b > bcmwl” folder and grab the .deb driver located there.

Post Installation

Wifi will not work!
But relax. The answer lies in the LiveUSB you used:
Start your newly installed system and plug your USB stick with the LiveUSB on it.
You will explore the files on it.

Open the folder “pool > restricted > b > bcmwl”.
And copy all the files to the desktop.
Also copy the “pool > main > d > dkms”.

Do:

$ cd ~/Desktop

$ sudo dpkg -i *.deb

If you see a dependency error, check which package is missing (GCC for example) and install it first by grabbing it from LiveUSB.

After that, try reinstalling the “bcmwl-kernel-source” package as normal.

If all went well, wifi will work right away.
If it doesn’t work right away, enable the wifi module:

$ sudo modprobe wl

Extra tip: Disabling MaBook’s boot “chime”!

Some people don’t like the “chime”, the loud sound that the MacBook BIOS plays whenever it turns on. In Linux installed on a MacBook this is easily fixed with the following command as root user:

# printf “x07x00x00x00x00” > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82

Concluding Remarks

The Linux kernel supports every MacBook accessory and module well, but 1 thing doesn’t work:
The WebCam. Natively Linux does NOT support the MacBook’s built-in screen webcam driver in any way. You can try your luck looking for “beta” code modules on GitHub, but I can’t guarantee anything.
If you really need to use Skype for example, I recommend to continue using the native macOS.

I didn’t see any hardware limitations: The games ran with similar performance to machines of similar hardware. In this case, this MacBook ran with the same performance – and even a little better – than the games I tested on my ASUS Notebook with Core i5. WINE games ran with equal performance.

Tutorial based on:
MacWorld



Advertisement


Add a Comment

Your email address will not be published. Required fields are marked *