I recently restored a Black MacBook2,1 Mid 2007 sporting a 2.16 GHz Intel Core 2 Duo chip. Back in the day, this is the MacBook I really wanted, but since I had a White MacBook1,1 from 2006, I didn’t satisfy my urges back then. Now, I have a near mint condition Black MacBook that I painstakingly restored to its former glory. The latest version of Mac OS X that can run on it natively is 10.7 Lion. It is possible to install 10.8 - 10.11 via hacks such as NexPostFacto, but in today’s world that does not offer much in the way of expanded usability. I wanted to surf the modern web and do as many modern things on it that I can. It’s a real beauty.
Therefore, I decided to take the plunge and install Linux on it. Moreover, I wanted to be able to dual-boot into Mac OS X and Linux. I chose Arch Linux as a good option. Although I have a unix-y background in my past, it has been since the mid-1990’s that I installed Linux on anything. Back then, I installed Red Hat Linux on an IBM Thinkpad flown on a NASA Space Shuttle mission so that the astronauts could run the exact same monitoring software we were using in Mission Control for that mission (a story for another time). Therefore, I was coming into this with some basic but rusty Linux installation skills.
First, I prepared the MacBook by using Disk Utility before the Lion install to set up a 50 GB partition for Lion and the rest set aside for the Linux install on a 250 GB SSD I put into the MacBook during the restoration.
Next, I grabbed a copy of an Arch Linux installation ISO on my modern Mac that I grabbed from here: https://archlinux.org/download/. The latest version I got was archlinux-2023.02.01-x86_64.iso.
I then copied the download to a USB stick on my modern Mac.
Googling around I found instructions for installing Arch Linux on a MacBook for dual booting with Mac OS X.
https://ianmcdowell.net/projects/macbook-arch/
http://codylittlewood.com/arch-linux-on-macbook-pro-installation/
https://medium.com/@philpl/arch-linux-running-on-my-macbook-2ea525ebefe3#.ai90cnihe
I booted up the USB stick on the MacBook and mainly followed the first guide. I set up the following partitioning scheme using cgdisk, where I didn’t touch the first three partitions, deleted the empty fourth partition I had set aside using Disk Utility, and created a 500 MB fourth partition to hold the Arch Linux boot information and devoted the remaining space to a fifth partition for the Arch Linux install:
/dev/sda1 200M EFI System - contains Apple boot information from Lion install
/dev/sda2 46G Apple HFS/HFS+ - contains Mac OS X Lion
/dev/sda3 620M Apple boot - contains Recovery disk installed by Lion
/dev/sda4 500M EFI System - target for Arch Linux boot information
/dev/sda5 191G Linux filesystem - target for Arch Linux install
I followed the first guide to install Arch Linux on the fifth partition, then followed the “setting up the bootloader” instructions in the first guide on the fourth partition.
However, when it came time to boot from the copy installed on my internal drive, the system wouldn’t boot into Linux. I could still boot from the USB, and booting into Mac OS X Lion worked fine.
I found a post that talked about the same problem on a MacBook4,1. The hint in the post that set me on the track for a solution has to do with the EFI implementation on the early Intel MacBooks: pre-2008 Macs mostly have 32-bit EFI firmware while 2008 and later Macs have mostly 64-bit EFI. All the guides I followed assumed the EFI was 64 bit.
To find out whether the EFI firmware in a Mac is 32-bit or 64-bit, this Arch Linux wiki page said to type following into the Mac OS X terminal:
$ ioreg -l -p IODeviceTree | grep firmware-abi
If the command returns EFI32 then it is IA32 (32-bit) EFI firmware. If it returns EFI64 then it is x86_64 EFI firmware.
MacBook2,1 returned IA32. Suspicion confirmed - I was installing a 64-bit EFI where I needed to be installing a 32-bit EFI. This meant I needed to modify the bootloader installation instructions in the first guide to use i386-efi wherever x86_64 appeared. Through some trial and error, I used the following three commands to install and configure the bootloader:
$ grub-install --target=i386-efi --efi-directory=/boot --bootloader-id=GRUB
$ grub-mkconfig -o /boot/grub/grub.cfg
$ grub-mkstandalone -o /boot/System/Library/CoreServices/boot.efi -d /usr/lib/grub/i386-efi -O i386-efi /boot/grub/grub.cfg
I rebooted the MacBook, held down the Option key, selected the EFI Boot disk in the boot options, and BAM - I was greeted with Arch Linux booting from the install on the MacBook.
There may be a better way to handle the bootloader, but at least the above is what I got to work. If anyone has any suggestions on how to make this better, I welcome the feedback.
I immediately installed GNOME as a desktop and started playing around. It was nice to surf the modern web on the MacBook, which is near impossible under Mac OS X Lion. I’m looking forward to more playing around with the Black MacBook2,1, perhaps even untethered at the local coffee shop. It should be an attention-getter.
Therefore, I decided to take the plunge and install Linux on it. Moreover, I wanted to be able to dual-boot into Mac OS X and Linux. I chose Arch Linux as a good option. Although I have a unix-y background in my past, it has been since the mid-1990’s that I installed Linux on anything. Back then, I installed Red Hat Linux on an IBM Thinkpad flown on a NASA Space Shuttle mission so that the astronauts could run the exact same monitoring software we were using in Mission Control for that mission (a story for another time). Therefore, I was coming into this with some basic but rusty Linux installation skills.
First, I prepared the MacBook by using Disk Utility before the Lion install to set up a 50 GB partition for Lion and the rest set aside for the Linux install on a 250 GB SSD I put into the MacBook during the restoration.
Next, I grabbed a copy of an Arch Linux installation ISO on my modern Mac that I grabbed from here: https://archlinux.org/download/. The latest version I got was archlinux-2023.02.01-x86_64.iso.
I then copied the download to a USB stick on my modern Mac.
Googling around I found instructions for installing Arch Linux on a MacBook for dual booting with Mac OS X.
https://ianmcdowell.net/projects/macbook-arch/
http://codylittlewood.com/arch-linux-on-macbook-pro-installation/
https://medium.com/@philpl/arch-linux-running-on-my-macbook-2ea525ebefe3#.ai90cnihe
I booted up the USB stick on the MacBook and mainly followed the first guide. I set up the following partitioning scheme using cgdisk, where I didn’t touch the first three partitions, deleted the empty fourth partition I had set aside using Disk Utility, and created a 500 MB fourth partition to hold the Arch Linux boot information and devoted the remaining space to a fifth partition for the Arch Linux install:
/dev/sda1 200M EFI System - contains Apple boot information from Lion install
/dev/sda2 46G Apple HFS/HFS+ - contains Mac OS X Lion
/dev/sda3 620M Apple boot - contains Recovery disk installed by Lion
/dev/sda4 500M EFI System - target for Arch Linux boot information
/dev/sda5 191G Linux filesystem - target for Arch Linux install
I followed the first guide to install Arch Linux on the fifth partition, then followed the “setting up the bootloader” instructions in the first guide on the fourth partition.
However, when it came time to boot from the copy installed on my internal drive, the system wouldn’t boot into Linux. I could still boot from the USB, and booting into Mac OS X Lion worked fine.
I found a post that talked about the same problem on a MacBook4,1. The hint in the post that set me on the track for a solution has to do with the EFI implementation on the early Intel MacBooks: pre-2008 Macs mostly have 32-bit EFI firmware while 2008 and later Macs have mostly 64-bit EFI. All the guides I followed assumed the EFI was 64 bit.
To find out whether the EFI firmware in a Mac is 32-bit or 64-bit, this Arch Linux wiki page said to type following into the Mac OS X terminal:
$ ioreg -l -p IODeviceTree | grep firmware-abi
If the command returns EFI32 then it is IA32 (32-bit) EFI firmware. If it returns EFI64 then it is x86_64 EFI firmware.
MacBook2,1 returned IA32. Suspicion confirmed - I was installing a 64-bit EFI where I needed to be installing a 32-bit EFI. This meant I needed to modify the bootloader installation instructions in the first guide to use i386-efi wherever x86_64 appeared. Through some trial and error, I used the following three commands to install and configure the bootloader:
$ grub-install --target=i386-efi --efi-directory=/boot --bootloader-id=GRUB
$ grub-mkconfig -o /boot/grub/grub.cfg
$ grub-mkstandalone -o /boot/System/Library/CoreServices/boot.efi -d /usr/lib/grub/i386-efi -O i386-efi /boot/grub/grub.cfg
I rebooted the MacBook, held down the Option key, selected the EFI Boot disk in the boot options, and BAM - I was greeted with Arch Linux booting from the install on the MacBook.
There may be a better way to handle the bootloader, but at least the above is what I got to work. If anyone has any suggestions on how to make this better, I welcome the feedback.
I immediately installed GNOME as a desktop and started playing around. It was nice to surf the modern web on the MacBook, which is near impossible under Mac OS X Lion. I’m looking forward to more playing around with the Black MacBook2,1, perhaps even untethered at the local coffee shop. It should be an attention-getter.