Installing Arch Linux on a MacBook is quite similar to installing it on any other computer. However, due to the specific hardware configuration on a MacBook, there are a few deviations and special considerations which warrant a separate guide. For more background information, please see the Official Arch Linux Install Guide, Beginners Guide, Beginners Guide Appendix, and Post Installation Tips. This guide contains installation-instructions that can be used on any Apple computer whose hardware is supported by the Linux kernel. If you have a Macbook5,2 (Polycarbonate, Non-Unibody) and are having additional issues, please see Macbook5,2 for additional help.

If you do not know which option to pick, we recommend the dual boot so you can still return to Mac OS X whenever you want.

Arch Linux Only

This situation is the easiest to deal with. Mostly, partitioning is the same as any other hardware that Arch Linux can be installed on. The only special consideration is the MacBook firmware boot sound. To ensure that this sound is off: mute the volume in Mac OS X before continuing further. The MacBook firmware relies on the value in Mac OS X, if available. Note that if you choose to get rid of the OS X partition, there is no easy way to update your machines firmware unless you use an external drive to boot Mac OS X.
You can boot in EFI mode (recommended) or bios-compatibility mode, if in doubt choose EFI.

EFI

This requires GRUB 2 to work

Boot installation medium and switch to a free tty.

Run cgdisk (gptfdisk package).

Create the necessary partitions.

Simple example (no LVM, crypto):

Note: The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a swap file can be created later, see Swap file.

BIOS-compatibility

Boot installation medium and switch to a free tty.

Run parted. The simplest way is to change the partition table to msdos and then partition as normal. If you decide to use the GPT format, GRUB will not be able to recognize the partitioning scheme. GRUB2 is compatible with GPT.

Mac OS X with Arch Linux

The easiest way to partition your hard drive, so that Mac OS X and Arch Linux will co-exist, is to use partitioning tools in Mac OS X and then finish with Arch Linux tools.

Warning: It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results.

Note: If you have any problems, try using gparted (i.e. instead of using Disk Utility and/or cgdisk). It is capable of shrinking the OS X partition and creating Linux partitions ready for installation.

Procedure:

In Mac OS X, run Disk Utility.app (located in /Applications/Utilities)

Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the partition tab on the right.

Select the volume to be resized in the Volume scheme.

Decide how much space you wish to have for your Mac OS X partition, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, depending on the number of software applications and files.

Finally, type the new (smaller) size for the Mac OS X partition in the size box and click Apply. This will create a new partition out of the empty space. You will delete this partition later.

Note: if you wish to have a shared partition between Mac OS X and Arch Linux, then additional steps will need to happen here. Please see Shared Partition.

If the above completed successfully, then you can continue. If not, then you may need to fix your partitions from within Mac OS X first.

Boot the Arch install CD by holding down the alt key during Boot. Follow one of the procedures below according to your choice of boot-method.

EFI

Run cgdisk

Delete the partition you made in Disk Utility.app and create the necessary partitions for Arch Linux. Mac OS X likes to see a 128MiB gap after partitions, so when you create the first partition after the last Mac OS X-partition, type in +128M when cgdisk asks for the first sector for the partition. A simple example (no LVM, crypto):

Note: The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a swap file can be created later, see Swap file.

Note: If you want to be able to boot GRUB from the Apple boot loader, you can create a small hfs+ partition (for convenience, use mac osx to format it in Disk Utility.app afterwards). Follow the grub efi install procedure, and mount your /boot/efi directory to the hfs+ partition you created. Finally, finish up again in mac osx by blessing the partition. This will set grub as the default boot option (holding alt at startup goes to the mac boot options screen still)

BIOS-compatibility

Run parted

# parted

Delete the empty space partition and partition the space as you would for any other installation. Note that MBR is limited to 4 primary partitions (including the efi partition). That leaves 2 primary partitions for arch. One strategy is to have a system and home partition, and use a swap file (I have not tried to use logical partitions). Another is to dedicate one partition to a shared partition (see below).

Next, create new filesystems on those partitions which need them, especially the partition which will contain /boot. If you're not sure how to do this using mkfs.ext2 (or whatever), run /arch/setup and work through until you get to Prepare Hard Drive and use the "Manually configure block devices..." option, then exit the installer. This is necessary so that rEFIt will set the right partition type in the MBR in the next step (without an existing filesystem, it seems to ignore the partition type set by parted), without which grub will refuse to install to the right partition.

At this point you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select update partition table, then press Y.

Mac OS X, Windows XP, & Arch Linux Triple boot

This may not work for everyone but it has been successfully tested on a Macbook from late 2009.

The easiest way to partition your hard drive, so that all these operating systems can co-exist, is to use disk utility in Mac OS X, use the formatter on windows XP install CP, and then finish with Arch Linux tools.

Warning: It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results. At least back your stuff up with timemachine or clonezilla before you begin.

Procedure:

In Mac OS X, run Disk Utility (located in /Applications/Utilities)

Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the partition tab on the right.

Select the volume to be resized in the volume scheme.

Decide how much space you wish to have for your Mac OS X partition, how much fo XP, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, and XP about the same, depending on the number of software applications and files. Something like OSX 200Gb, XP 25Gb, Arch 25Gb should be fine.

Put your decisions into action by pressing the + button and adding the new partitions, Label them as you like and make sure that your XP partition is the last one on the disk and is formatted for FAT32. It is probably best to have Arch formatted in HFS format as to not confuse you later, it will be reformatted anyway.

So in linux terms your partitions will be something like:

sda (disk)

sda1 (Mac boot partition - you cannot see this one in OSX)

sda2 (OSX install in HFS+)

sda3 (Arch install temporarly in HFS)

sda4 (XP install in FAT32)

Finally, click apply. This will create a new partition out of the empty space.

Note: Using this method you may not be able to have a shared partition between Mac OS X and Arch Linux, this is because the mac will only allow for 4 active partitions. You will however be able to mount a HFS partition in Arch for one workaround. There are other workarounds possible also.

If the above completed successfully, you can continue. If not, then you may need to fix your partitions from within Mac OS X first.

You will not be needing boot camp this way, the program rEFIt is much more flexible (though not as flexible as Grub). Download and install rEFIt [[1]]

Go into a terminal in OS X and perform the following, this will enable the rEFIt boot manager.

cd /efi/refit
./enable.sh

Reboot to check the rEFIt is working, it should appear on boot. When it comes up go to the rEFIt partition manager and agree to the changes.

Put your XP install CD and boot it with rEFIt - You may have to reboot a few times until it is recognized by the boot loader. Install XP and once it is installed use the OSX install CD to get your drivers running nicely in XP.

Note: when installing XP make sure you select your XP partition and format it again inside the XP installer. If you do not reformat it will not work.

Boot the Arch install CD, log in as root and run /arch/setup

Follow the install as normal but note that you will have to tell that arch installer to mount sda3 as the root partition and format it as ext3, there will not be a /boot or swap partition so ignore those warnings.

At this point, if you are dual booting, you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select update partition table, then press Y.

Booting Directly from GRUB

It is possible to boot directly from GRUB2 in efi mode without using refit. These instructions are known to work on a Macbook 7,1. It is advisable to host GRUB on either a fat32 or HFS+ partition, but ext2 or ext3 may also work. GRUB's appleloader command does not currently work with the 7,1, but support can be added with the patch available here.

After the GRUB install is in the desired location, the firmware needs to be instructed to boot from that location. This can be done from either an existing OS X install or an OS X install disk. The following command assumes that the GRUB install is in /efi/grub on an existing OS X partition:

Note: Some MacBook users report strange keyboard output such as long delays and character doubling. To fix this problem, boot with the following options: arch noapic irqpoll acpi=force

Log in as root

Note: If you want to do a netinstall rather than installing the possibly outdated packages on the iso and depend on a wireless network that is encrypted, you should change to a free tty and connect manually before proceeding, see Beginners_Guide

(for booting with BIOS-compatibility) In the install boot loader stage, edit the menu.lst file and add reboot=pci to the end of the kernel lines, for example:

kernel /vmlinuz26 root=/dev/sda5 ro reboot=pci

This will allow your MacBook to reboot correctly from Arch.

(for booting with BIOS-compatibility) Also in the install boot loader stage, install GRUB on whatever partition that /boot is on.

Warning: Do not install GRUB onto /dev/sda !!! Doing so is likely to lead to an unstable post-environment.

In the configure system stage, edit /etc/mkinitcpio.conf and add the usbinput hook to the HOOKS line somewhere after the autodetect hook. This will load the drivers for your keyboard in case you need to use it before Arch boots (e.g. entering a LUKS password or using the troubleshooting shell).

When the install process is complete, reboot your computer.

# reboot

If using optical media, hold down the eject key as your MacBook starts, this should eject the Arch Linux install disk.

If dual-booting Mac OS X and Arch Linux, hold down the alt (option) key while the system boots to use the Mac bootloader to select which OS to boot.

Additional steps for Arch Linux only install

Note: Do this after you tested that your setup is working. This procedure has been tested on a MacBook 4,1 with an msdos partition table. It may not work on newer versions. Please update if it works for you.

In order for Linux to boot up straight away, you will have to tell the firmware that your /boot partition is bootable, or you will always have to hold down the option (alt) key whenever you want to start up your computer.

In order to do this you will need the original Mac OS X install disk

Boot into it (you may need to hold the option (alt) key during boot again to access it)

Open Terminal.app (found under the Utilities menu in the menu bar), and type:

# diskutil list

Find the device name of your /boot partition (this is your root (/) partition, if you don't have it separate). The format should be /dev/disk0sX, where X is a number from 1 to infinity

NVIDIA note

Tip: MBP 6.2 - With the proprietary NVIDIA drivers, support for Pure Video HD is available for hardware video decoding.

For MacBooks with NVIDIA graphics, for the backlight to work properly you may need the nvidia-bl package found in the AUR.

Tip: If backlight control doesn't work after installing nvidia-bl, you should blacklist apple_bl kernel module.

Macbook 6.2+ - EFI

As of 4/30/2011, the proprietary nvidia driver is not known to work under X with this model in efi mode. The nouveau driver should work out of the box, but dri should be installed from the mesa-git package.

MacbookPro 5.5 has an NVIDIA 9400m graphics card. This problem might apply to other devices as well.

Touchpad

The touchpad should have basic functionality by default. A true multitouch driver which behaves very similarly to native OSX can be installed from the AUR: xf86-input-multitouch-git. It supports 1, 2 and 3 finger gestures, including differentiation between horizontal and vertical 3 finger swipe. Additional details are available at the driver's project page.

xf86-input-multitouch-git does not support any sort of configuration without editing the driver's source. Some users are also experiencing issues with false clicks from palm touches. There is now a much more configurable fork available as xf86-input-mtrack-git. Configuration options are documented in the readme.

The following mtrack options work well on a Macbook 7,1:

Option "Thumbsize" "50"
Option "ScrollDistance" "100"

Probably you need also to add:

MatchDevicePath "/dev/input/event10"

Special Note About Older Macbook Models (confirmed on MacBook 2,1): On older Macbook models (pre-multitouch), the touchpad will not function properly until you install the xf86-input-synaptics package. Please see Touchpad Synaptics for more information on installing and configuring this package.

Note on Macbook Pro(5,5): I found it is much simpler to use the xf86-input-synaptics[2] in Extra. Although it does not have much function as 3 finger swipe, this driver provides faster response. Gsynaptics[3] also provides a simple GUI config. Below is a Xorg config file /etc/X11/xorgconfig.d/60-synaptics.conf for reference only.

5.0 and 6.0 generation MacBooks may have a BCM43xx, follow the instructions for the broadcom-wl driver on the Broadcom wireless page. The interfaces can swap during reboot so its best to define them in a udev rule (instructions on the Broadcom wireless page).

8.1 generation MacBooks have BCM4331, for which support is not present in either Linux (3.0 and 3.1) or the proprietary drivers by Broadcom. There is however preliminary support for it in Linux 3.2. To run the drivers on earlier kernels, you will need to use compat-wireless

Note: if your connection frequently drops, you may have to turn off wifi power management. If you are running pm-utils, you may override wireless power management by creating an executable file /etc/pm/wireless with the lines

#!/bin/sh
/sbin/iwconfig wlan0 power off

Power management

Laptop-mode-tools

Because the MacBook is obviously a laptop, you may wish to control its power management features using something like Laptop Mode Tools.

However, Laptop Mode Tools is known to disable the keyboard in console mode after being idle for a few seconds (does not happen when using X). If this happens to you set

CONTROL_USB_AUTOSUSPEND=0

in /etc/laptop-mode/conf.d/usb-autosuspend.conf. See this forum thread for the original workaround.

Suspend to RAM (kernel suspend)

Suspend (the kernel suspend) should work out of the box (I had a problem in which the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by de-selecting the option "event_when_closed_battery" in gconf-editor → gnome-power-manager → actions).

For a macbook2,1 (bought in 2007) s2ram works using

s2ram -f -a 3

To make it work with kde4 you have to create a file named "config" into /etc/pm/config.d containing

SLEEP_MODULE="uswsusp"
S2RAM_OPTS="-f -a 3"

For a MacBook Pro 3,1 (bought in 2008), the following command should work, both in X and in a console:

s2ram -f -a 1

Note: If you use pm-utils suspending lead (at least for me) disk freeze. Try changing /etc/pm/config.d/module to

SLEEP_MODULE=tuxonice

For a macbook5.5, s2ram may work using (be sure to run it in X)

s2ram -f -p -m

Suspend to disk (hibernate)

This article or section is a candidate for merging with Swap#Swap file.

Notes: These part is duplication of Swap file section in Swap. Should check and merge it to Swap. (Discuss in Talk:Mac#)

Hibernate should work if you have a swap partition. If you opted for a swap file because of the MBR limitation to 4 primary partitions, you can still get hibernate functionality by following these instructions (this is mostly taken from http://ubuntuforums.org/showthread.php?t=1042946):

Create a swapfile (here 2G = bs*count):

sudo dd if=/dev/zero of=/swapfile bs=1024 count=2M

It is recommended, but not necessary, to create the swapfile on a newly created partition, so that fragmentation is minimum.

Temperature Sensors

Color Profile

Second copy pre-saved color profiles placed in /Library/ColorSync/Profiles/Displays/ on Mac OS partition to ~/colorprofiles/ for example.

There are color profile files agree with in MacBook models; select the right one:

Color LCD-4271800.icc for MacBook Pro with CoreDuo CPU

Color LCD-4271880.icc for MacBook with Core2Duo

Color LCD-4271780.icc for MacBook (not Pro) based on CoreDuo or Core2Duo.

Tip: also Mac OS allows to save current color profile from Displays -> Color section of the Mac OS System Preferences, in this case file is saved to /Users/<username>/Library/ColorSync/Profiles.

Finally you can activate it by running

# xcalib ~/colorprofile.icc

Warning: previous command set the color profile only for the current session; this mean that you must run it every time you login in your system. For automating it you can execute the command by Autostart Application, concording with your DE (or add the command to your login manager's initialization script, e.g. /etc/gdm/Init/Default).

Note: see xcalib man pages for further information.

Apple Remote

First, to correctly install and configure the lirc software that control IR see Lirc wiki.

Then make LIRC use /dev/usb/hiddev0 (or /dev/hiddev0) by editing /etc/conf.d/lircd. Here is how mine look:

As we see, the "Unknown" partition is our OS X partition, which is located in /dev/sda2.

Create a "mac" folder in /media:

sudo mkdir /media/mac

Add at the end of /etc/fstab this line:

/dev/sda2 /media/mac hfsplus auto,user,rw,exec 0 0

Mount it :

mount /media/mac

and check it:

ls /media/mac

HFS+ Partitions

HFS+ partitions, now the default in Mac OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, it is necessary to disable journaling. This can be accomplished using Mac OS X Disk Utility. Refer to this Apple support page for more information.

Home Sharing

UID Synchronization

In OS X

Note: it is strongly recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.

Step 1: Change UID and GID(s)

Pre-Leopard

Open NetInfo Manager located in the /Applications/Utilities folder.

If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.

Navigate to /users/<new user name> where <new user name> is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.

Change the UID value to 1000 (the value used by default for first user created in Arch).

Also change the GID value to 1000 (the value used by default for user account creation in Arch).

Navigate to /groups/<new user name>, automatically saving the changes you have made so far.

Note: if you get an error message that the transaction is not allowed, log out and log back in.

Leopard

In Leopard, the NetInfo Manager application is not present. A different set of steps is required for UID synchronization:

Open System Preferences.

Click on Accounts.

Unlock the pane if not already done so.

Right-click on the desired user and select Advanced Options.

Write down the value of the User ID field, you will need it later on. Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).

Step 2: Change "Home" Permissions

Open up Terminal in the /Applications/Utilities folder.

Enter the following command to reclaim the permission settings of your home folder, replacing <your user name>, <your user group> and <your old UID> with the user name whose UID and GID values you just changed, the group name whose GID value you just changed and the old UID number, respectively.

Note: if you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.

Open up Terminal and enter:

cd /efi/refit; ./enable.sh

Problems with rEFIt

If you experience problems after the install of Arch or rEFIt, especially is the right OS is not showing up to boot to or if it dumps you at a GRUB prompt stuck like the following:

It can give you a basic idea on how to boot off the Arch live cd, mount the problem Arch install, chroot, use gptsync, and reinstall GRUB. This is probably for more advanced users who can translate the commands from a debian system to an Arch system and also apply it to the partitions on their machine. Be careful not to install GRUB in the wrong spot.

Model-specific information

MacBook Pro

10,1

MacBook Air

Mid 2012 13" - Version 5,2

Kernel panics using default boot media under arch kernel 3.5. Adding 'intremap=off' fixes this. Additionally, there are problems loading the 'applesmc' module (meaning the temperature sensors, fan, and keyboard backlight do not work). These problems are fixed in the linux 3.6-rc4 mainline kernel (I have tested).

Installing using the Archboot 2012.06 image

Several people have reported problems installing Arch Linux on the MBA version 5,2 (See problems booting archlinux on a MacBook Air Mid 2012). A common problem is that the screen is not detected and therefore goes black when the installer boots. To fix this problem one has to select the normal install (Not the LTS) during boot and press tab to edit the boot flags. Then add noapic flag to the boot line. This should fix the screen going black. Install the system as you normally would. It may help later in the configuration process if the support packages are installed already at this stage.

When the install has finished again add the noapic flag to the grub2 boot line (if you use grub2) and also add i915.diescreaming=1 (or perhaps i915.die). This should keep the screen from going black when booting the new system. After you enter the system the wireless driver should be loaded. If you installed the support packages during installation you should have the wifi-menu command. Run it and select the network you want to use. One could also use wpa_supplicant but wifi-menu is quite fast to use at this stage. Now you are ready to upgrade the system. As of writing there have been a lot of changes to Archlinux since the 2012.06 image of Archboot was released (filesystem and glibc). Therefore the upgrade process can be a bit difficult. The current solution has sucessfully upgraded a standart archboot version to a up-to-date version as of October 2012 and this step should be obsolete in future releases of archboot.

First ignore the new "big" changes to Arch Linux,

pacman -Suy --ignore glibc,libarchive,curl,filesystem

If this only upgrades pacman then run the command again. Remember to make sure that pacman is ignoring the packages you don't want upgraded now. Otherwise you may break the system and have to reinstall! Now upgrade to the new filesystem,

pacman -S filesystem --force

As described here (Glibc upgrade guide) there may be conflicts with installed packages that require the /lib directory. Follow the guide and remove any packages that use /lib. The stock 3.4.2 kernel from Archboot should be on this list so first upgrade this,

pacman -S linux

This may give some errors saying that the system may not boot because of missing modules. Ignore this warning for now. The stock install may also contain gcc in the /lib directory so also remove this if needed and any other packages that have conflicts. Now Glibc should be the only package in /lib so run the system upgrade and accept all changes,

pacman -Su

Finally reinstall the kernel so that it can find the correct modules,

pacman -S linux

Now this command shouldn't give any errors like last time. You can also reinstall gcc at this point. After a rebooted the system should startup and the new kernel should have fixed the problem with the screen going black. If want to boot Xorg then you may need to remove the i915.diescreaming=1 line from GRUB2. If not then attach a external screen and try to fix the problem that way. Some people have reported commands that may help on the forum.

Mid 2011 - Version 4,x

Works out-of-the-box since kernel 3.2. It is recommended to use Archboot, install GRUB2 and use EFI.