Bring an old MacBook back to life with Linux

It takes about an hour to make an outdated Mac useful again with Fedora.
120 readers like this.
Digital images of a computer desktop

Opensource.com

Recently, I stumbled on an old MacBook Pro 13" from late 2011, with a 125GB SSD and 8GB RAM. I've taken this machine on trips around the world, and back in the day, I ran many a session, workshop, or demo to share all the AppDev goodness from JBoss technologies.

After verifying that its battery works, charging it up, and reinstalling a new OS X, it turns out that the Safari browser version is limited to an old security specification, which means it can't connect to a lot of HTTPS sites now. This renders this solution defunct.

What to do with this old thing?

It's been a few years since I worked solely on Linux workstations as a developer. I specifically worked on Fedora, so I decided to try to install the latest version on this MacBook Pro.

It took me just over an hour to get Fedora 33 working on this laptop with the steps below.

Download Fedora 33 and create a live USB

The first step is to find the right way to install Fedora. This machine has a CD slot, so you could burn an ISO and boot from it, but I chose to go straight to a bootable USB option.

I got on my other MacBook and visited the Fedora Workstation site, which links to Fedora Media Writer. Click on the icon for your machine type (in my case, the Apple logo), and you get an installation package.

Start installing it to see a graphical user interface (GUI) that guides you through the process. Select the Fedora Workstation 33 option:

Next, select the Create Live USB option in the top-right corner:

The image will start to download, and you will see a drop-down menu to select where to install it:

Plug in a USB stick with enough space available, then after the download finishes, you can select and install the image on it. Once it's finished, close the GUI and remove the USB stick.

Install Linux

Insert the USB stick you created into the port on the left side of your MacBook Pro, and restart it while holding down the Option (or Alt) key just to the left of the Cmd key. This opens a menu of options to start the machine; use the EFI option, as that's the USB image.

The laptop will boot from the USB device, and you can follow the normal Fedora installation process. It helps if you can plug the MacBook Pro into a network cable connection, as the Broadcom WiFi device will not work out of the box.

You should get the opportunity to install Fedora to your hard drive and put it on your machine permanently.

Once the installer completes, reboot your machine, and Fedora 33 should now be the option to boot from.

The only thing missing is a WiFi driver, so keep your network cable connected to install the development packages for the kernel you are running and to build the broadcom-wl driver for that kernel.

Verify the card you need for WiFi:

$ lspci -vnn -d 14e4:

There will be several items in the output, including something like:

Network controller [0280]: Broadcom Inc. and subsidiaries....

Subsystem: Apple Inc. AirPort Extreme...

Install a repository to pull the Broadcom stuff:

$ su -c 'dnf install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'

The next part is interesting: As you look at the running kernel, you'll see v5.9.8-200.fc33, but you will use the development kernel packages to build your Broadcom wireless driver. So, you need to install v5.8.15-301.fc33 (available at the time of this writing). Check them using uname -r, and list the installed kernel packages using sudo dnf list kernel:

$ sudo dnf list kernel

kernel.x86_64                     5.8.15-301.fc33

kernel.x86_64                     5.9.8-200.fc33

Install the development packages:

$ sudo dnf install -y akmods kernel-devel-5.8.15-301.fc33

Install the Broadcom wireless package:

$ sudo dnf install -y broadcom-wl

Build the kernel module:

$ sudo akmods

Reboot your machine, and you should be able to view the wireless driver (wl) with:

$ lsmod | grep wl

Set up your wireless connection in Fedora:

This article is a bit out of the ordinary for me, but I hope it might help someone else enjoy some fun on the weekend with some old hardware!


This originally appeared on Schabell.org and is republished with permission.

What to read next
Tags
User profile image.
Eric is Red Hat’s Portfolio Architect Technical Director. He's renowned in the development community as a speaker, lecturer, author, and baseball expert. In his current role allows him to share his knowledge of Red Hat’s open source technologies and cloud computing.

16 Comments

I literally just did the same thing with my 2011 MacBook Air this month but chose ElementaryOS for my Linux distro. It worked without any configuration right out of the box. I did want to dual boot it but I couldn't figure out how to properly repartition the drive so I figured I'd just wipe it and worst case use the Mac's built in "run home to momma" network install if I ended up needing to go back to macOS.

I was given a very old 2006 iMac that laid unused for some years is someone's closet for the same reason as the article, Safari was too old. Installing Linux on these old dinosaurs can only be done using optical media, so I burned MX-19.2_AHS_x64 to a dvd, booted the live system, everything worked but the WiFi and the Sound, however after a bit of searching I found the solutions and got both were working splendidly, but with only 1GB installed, the machine began to choke so I ran the installer and rebooted. These machines run a 32bit efi firmware and have a 64bit processor so your think they would be able to use more RAM, but unfortunately, they're are firmware locked to 3GB, so I found 2 x 2GB modules, installed them and my son's been using it for most of this year. It does sometimes start choking, but it's generally OK for everything he does, online games, videos and sometimes, his schoolwork. He prefers the iMac over his Chromebook

Thanks for the information. I have a 2011 MacBook Pro that has been "sunset" by Apple in which I know that I'm going to have the OS replaced. I have not reached the point in which I am having certificate problems in Safari probably because I am on Firefox most of the time. At least this handy guide let's me know that it's doable.

I'm writing to you from a late 2008 MacBook pro - 8 Gb RAM and SSD

1. I have mac os High Sierra, using a method to install on unsupported macs (just google it).
2. It supports Windows 7 via Bootcamp and I've made the upgrade to Windows 10 (keeping Win7 drivers).

All works. Not great, but works.
I've also opened the case and changed the processor paste.

So, the best way to keep an old MacBook alive is... actually Windows!

My early 2008 MacPro, 3,1 and Mid-2010 MBP, 7,1 are running great on Mojave 10.14.6. I haven't tried it yet on my 4,1 MBP. Since I have too many 32bit apps, this is the end for me. Plus I need to run about 9-10 other OSs.

how can I get mac os like trackpad gestures on fedora?

There are a lot of options out there, just search for the how to articles would be my suggestion. Often depends on your desktop of choice it looks like.

In reply to by arnabs21

Perfect timing! I have a 2011 Macbook Pro that will be transitioned to Linux this year. Thanks for a great article.

This is a great way to reuse old laptops. However, when I tried this with my old 2013 MacBook Pro with Retina display, I could not get Linux to work well with the retina display. I tried a bunch of different display managers and Linux variations (although to be honest I don't recall trying Fedora). It just seems that some programs refuse to play nice with the dpi settings from the window manager...and some window managers have a hard time dealing with it themselves...
Sadly, I ended up going back to OS X, as I'm only just unable to move on to Big Sur, so not too far behind....

Thank you for this excellent article. I've never gotten much of a chance to refurbish old Macs so it's nice to see it's doable and get a good lesson in how to do it. One thing I wonder about -- how was performance? Based on the specs you provided, I assume Fedora worked pretty well on it?

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.