The english openSUSE wiki has been moved and updated recently. If you encounter any issue, please let us know by mail to firstname.lastname@example.org.
SDB:Installation on a Mac
tagline: From openSUSE
This is the home page for instructions on installing openSUSE on an Apple Computer. The instructions here were originally made for openSUSE version 11.1 and are being updated to openSUSE Leap 42.2.
This page will describe the background and common procedures for installing Linux on an Intel Mac, and any special issues with the general openSUSE installation procedure.
While there are several different ways to set-up a Mactel to run Linux, the procedure described here is the most commonly used and most widely supported as at September 2016.
- 1 Preparation
- 1.1 Update OS X
- 1.2 rEFInd
- 1.3 Re-size The OSX Partition
- 1.4 Download WiFi drivers
- 1.5 Making a bootable USB pen drive on macOS
- 2 Booting From Install CD / DVD
- 3 Partitioning
- 4 Triple-Booting With Windows (pre 2012)
- 5 openSUSE Installation
This chapter describes the steps you should do before you install openSUSE on your MacBook.
Remember to always back-up your data first!
You can choose to install only openSUSE, dual-boot OS X and openSUSE, or triple-boot OS X, Windows and openSUSE. It is recommended that you keep OS X even if you don't intend to use it, as this will allow you to install any firmware updates the Apple releases.
If you intend to install only openSUSE, you can skip all the Preparation steps.
Update OS X
In OS X run the Software Update tool to check for OS and Firmware updates.
rEFInd manages the EFI based boot process. It is installed into a small partition at the start of the disk. openSUSE Leap 42.1 and 42.2 overwrite the default EFI boot manager, and it is no longer possible to load MacOS. Therefore it is necessary to install rEFInd after installing Linux. On some of the mac hardware a special WiFi driver is needed (see below), so better download the zip file beforehand.
rEFInd is a fork of the abandoned rEFIt.
NOTE: rEFIt requires one clean boot cycle to properly install. You don't need to even login to OSX, just click shutdown and the next boot screen should be rEFIt. If you have Oracle's VirtualBox installed in OSX, it will prevent that boot cycle from succeeding. Simply move /Library/StartupItems/VirtualBox (directory) out of the StartupItems, do the boot cycle, and put it back later. Ouila! Be advised other 3rd party programs may similarly prevent the full boot cycle. (May 2012)
rEFIt includes a useful tool to synchronize the GPT and MBR partition details. You should run this after any change to your partitioning scheme either in Mac, Linux or Windows. From the rEFIt initial boot screen, choose "Start Partitioning Tool", carefully read the output, and type 'y' to confirm. Be aware that rEFIt assumes an American keyboard layout. (before 2012, migrated from the old wiki)
Re-size The OSX Partition
The OS X partition has to be re-sized to make space for Linux (and Windows if you want to triple-boot). This can be achieved using the graphical Disk Utility. You should shrink the large system partition. Do NOT TOUCH the EFI and Recovery partions.
Using Disk Utility in OS X 10.5 Leopard or OS X 10.6 Snow Leopard (pre 2012)
This is the recommended method as it both natively shrinks the HFS+ partition and writes a guaranteed valid GPT partition table. Under Applications / Utilities or using Spotlight launch the Disk Utility and resize the OSX partition to the required size. It is also recommended that you set up your chosen partition scheme for Linux and Windows here as well to ensure your GPT partition table is valid. Simply create all the required partitions in the required size and set the type to HFS+, except for your intended Windows partition which you should make FAT. See the notes on Partition Schemes below.
Using BootCamp in OS X 10.5 Leopard or OS X 10.6 Snow Leopard (pre 2012)
Bootcamp provides a simple GUI to split the exisiting OSX drive into two partitions, non-destructively shrinking the first partition for OSX and creating a second partition as FAT32, which can be re-partitioned later as you require. Once finished partitioning, exit BootCamp without installing Windows, even if you plan a triple-boot set-up. The Disk Utility method is preferred as it is more flexible.
Using diskutil in OS X 10.4.6 or later (pre 2012)
BootCamp was originally released in beta form for OS X 10.4, but is no longer available for download. An alternative is to use the Mac OS X program diskutil. The ability to non-destructively re-size volumes was added to diskutil in OS X 10.4.6 (for more information see macgeekery.com).
The following command example assumes that "disk0s2" is the OS X partition and will resize it to 60 gigabytes):
$ sudo diskutil resizeVolume disk0s2 60G Started resizing on disk disk0s2 Mac OS X Verifying Resizing Volume Adjusting Partitions [ + 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..100% ] Finished resizing on disk disk0s2 Mac OS X /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *149.1 Gi disk0 1: EFI 200.0 Mi disk0s1 2: Apple_HFS Mac OS X 59.9 Gi disk0s2 $
Warning: this may or may not work depending if your partition has been re-sized before.
Disable journaling in MacOS, boot to Linux, use Parted to re-size the MacOS partition and turn journaling back on in MacOS and have the filesystem checked.
Download WiFi drivers
Some of the mac wireless cards are not supported by open source drivers. if you have no wired connection to the internet, you should download the driver beforehand. otherwise you can skip the following and use yast later. There is a relatively complete list of macs and their hardware support on ubuntu help. You can find your mac version by:
- Open "About This Mac" under the Apple menu
- Click the "System Report" button
- The "Model Identifier" will be in the default dialog.
The closed source driver is called broadcom-wl in openSUSE and bcmwl-kernel-source in Ubuntu based distributions. There are two (!) packages to install, one of them is a kernel module and needs to match the kernel version. What I did is download the RPMs directly and install them manually.
- the kernel version on the installation media of leap 42.1 is 4.1.12-1, for me the build service packages from fmherschel worked. after you have internet, you can update the kernel and use the packman repository.
- the kernel version on the installation media of leap 42.2 beta is 4.4.21-2. fmherschel provided working rpms for me again.
- the kernel version on the installation media of leap 42.2 will probably be 4.4.22-1. those should work (they are built automatically against the stock kernel.
Making a bootable USB pen drive on macOS
On macOS you can also use dd, but the command is slightly different:
dd if=/downloaded/iso/file.iso of=/dev/rdisk42 bs=1m
Note that of goes to rdisk (otherwise it can take hours) and the bs takes small letters instead of capital ones.
Booting From Install CD / DVD
To make your Mac boot from a Linux or Windows CD or DVD, you need to hold down the 'c' key as the Mac starts up, keep holding it down until it is obvious the CD is booting (pre 2012).
On a macBook Air (booting from a pen drive) the alt/option key needs to be pressed. Boot to the installation via the EFI method (you should see a selection after pressing the alt/option key).
There is a myth that you can only have 4 partitions on an Intel Mac, this is no longer true. The limitation is that Windows and GRUB only know how to read the MBR and not the GPT and are thus limited to the first four primary partitions. Both OSX and modern Linux kernels know how to read the GPT and so are not restricted once booted.
All that is thus needed is to ensure that:
- The first partition (/dev/sda1) is kept for the EFI boot partition, do NOT delete or format. However it MUST be mounted in /boot/efi during linux installation.
- The second partition (/dev/sda2) is kept for OS X, do not delete or format.
- The third partition (/dev/sda3) is kept for GRUB, so use for either Linux / or /boot
- The fourth partition (/dev/sda4) is kept for Windows
- The fifth and subsequent partitions are used for Linux as required, e.g. /, /home, /tmp, swap, etc.
- After partitioning, always run the rEFIt GPT/MBR re-sync tool (note from Sep. 2016: This is for keeping the old mbr table up to date. I think this might be done automatically by YaST).
- There is a an EFI Grub option that should be selected automatically in Leap 42. However, ensure that it is. Do NOT under ANY circumstances overwrite the MBR or the first partition. Go through EVERY page in the GRUB page of the installer and make sure of that. (In case you wonder what would happen: As far as I understand, EFI boot managers stop working, which includes the one from macOS. I was able to boot into recovery, then crashed the complete EFI partition (also called ESP) and somehow managed to restore it in just a day.)
- OS X can actually be on any partition, but is easiest left where it already is.
- It is reported that Windows must go on the 'last' partition in the MBR, otherwise you may experience problems when re-installing Windows when it inevitably needs it (I think this is old information from the times of Win7. Starting from Win8, microsoft supports UEFI, and therefore I think they shouldn't need the MBR any more. Sep. 2016).
- You need to use a partitioning tool such as Free FDisk (contained on e.g. Ultimate Boot CD) to make the Windows partition the active one, otherwise your Windows installation will fail (pre 2012).
- You could use elilo instead of GRUB to boot Linux without using the MBR, but this would also bypass the BIOS which is required by various video drivers for accelerated 3D graphics (pre 2012).
GPT support was introduced into the kernel in version x.x.x.x and is enabled at compile-time with the CONFIG_EFI_PARTITION option. This support has been enabled in openSUSE since xx.x. The procedure for older versions of Linux is no longer documented here as it is assumed new installs will be for recent enough versions (pre 2012).
Triple-Booting With Windows (pre 2012)
You can triple-boot your Mac with OS X, Windows XP/Vista, and Linux. If you want to do this, it is best to install Windows first before openSUSE. You will need to re-partition the hard-drive to your chosen scheme for Windows AND openSUSE before you install Windows.
It is strongly recommended to use the built-in OSX Disk Utility as this will guarantee a valid GPT table. Alternatively use a Linux Live CD with a GPT capable partition tool (parted > x.x.x), such as openSUSE >= 11.1 or Ubuntu >= 8.10 or Mandriva >= 2010 (Mandriva 2009 is know not to work properly), to boot your Mac and set up your partition scheme (see partitioning below). Reboot and in rEFIt choose the GPT Re-sync tool to confirm the GPT and MBR records are synchronized.
Now proceed with your Windows install. You cannot use BootCamp to do this, as it only supports a Mac/Windows partition scheme. Instead boot your Windows install CD directly. Ensure you have either a full Windows install disk, or if you have an upgrade disk a second external CD drive, as you cannot manually eject the main install CD on most Macs when required to insert your original licensed disk. Afterwards install the Mac drivers from your OSX install DVD. Note that running Apples unified driver installer the drivers requires at least XP SP2. If you only have a SP1 version of XP you should download the SP2 redistributable installer first and install that.
While installing WinXP SP2 or SP3 you will get the following message:
"There is not enough disk space on C:\WINDOWS\$NtServicePackUninstall$ to install Service Pack 3 Setup requires an additional 4 megabytes of free space or if you also want to archive the files for uninstallation, Setup requires 4 additional megabytes of free space. Free additional space on your hard disk and then try again."
This happens because OSX uses the EFI file format which Windows XP does not support. To workaround this problem, add a registry key as follows:
1. Click Start - Run - Type “regedit” and press enter.
2. Navigate to
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup] HKEY_LOCAL_MACHINE \Software \Microsoft \Windows \CurrentVersion \Setup 3. In the right pane, Right-click and select New - String value
4. Name it as “BootDir” and set its value to “C:\”
Once Windows is installed, you can then proceed with your Linux install.
The normal openSUSE installation process is followed so is not covered here in detail. This section will only discuss where the Mac install differs from the normal.
kepp in mind that
- The first partition (/dev/sda1) is kept for the EFI boot partition, do NOT delete or format. It MUST be mounted in /boot/efi during installation.
- Install into the space that you previously made in macOS.
- In the summary before starting the actual installation process, open the GRUB page. There is a an EFI Grub option that should be selected automatically in Leap 42. However, ensure that it is. Do NOT under ANY circumstances overwrite the MBR or the first partition. Go through EVERY tab in the GRUB page of the installer and make sure of that.
when the system is installed, unpack the refind zip and run refind-install as root
Once the installation process is finished, you may encounter a boot message about firmware issues, like the one below:
b43-phy0 ERROR: Firmware file "b43/ucode16_mimo.fw" not found b43-phy0 ERROR: Firmware file "b43-open/ucode16_mimo.fw" not found b43-phy0 ERROR: Please open a terminal and enter the command "sudo /usr/sbin/install_bcm43xx_firmware" to download the correct firmware for this driver version. For an off-line installation, go to http://en.opensuse.org/HCL/Network_Adapters_(Wireless)/Broadcom_BCM43xx and follow the instructions in the "Installing firmware from the RPM packages" section.
As of this writing, these instructions are not entirely complete: after installing the firmware as directed, you must run sudo mkinitrd to ensure that the firmware is loaded at the appropriate time during the boot process. (This extra step may be resolved in a future bugfix.)
Once that's done, you can install the WiFi drivers from the USB pen drive via Software Management (right click and open on the rpms in dolphin works only in 42.2) or zypper. Note that the packaging system will complain that the rpms are broken. this is because the signing key is not installed in the system. Note also, that Software Management will complain about missing dependencies (the two packages require each other and Software Manager does not look into the directory), just press ignore.
if you have problems with wifi after a suspend, this needs to be executed
rmmod wl; modprobe wl;
on mint pm-utils deals with calling it, but i believe suse uses a different system.
On certain models (like MBP 2015) the wifi driver is installed by default. Sometimes YaST doesn't recognize it during the installation though. The solution for this is opening YaST, then Network Configuration and selecting "use Network Manager" instead of wicked service. After the reboot, WiFi should work.
Keyboard Issues (pre 2012)
It has been reported that sometimes the built-in keyboard of the MacBook and Macbook Pro is not recognized during the boot. If the openSUSE install menu (with install/rescue/options) hangs on the 'boot from hard-drive option', try rebooting your MacBook. A workaround is connecting a USB keyboard to your MacBook when the installation menu starts.
The keyboard backlighting will certainly work but needs some help. I have successfully compiled lightum. You will need to add these packages (pre 2012, worked fine in Leap):
Compile as root, run it as user. Test with a "-f" for foreground -> lightum -f
Suspend to RAM
I encountered problems with the kernel 4.4.21 in Leap 42.2 beta. The laptop wouldn't wake up any more. It works with 4.4.22, so update your kernel (new one is in the official repos).
There is an issue with the backlight in macBook Airs 6-x as the brightness setting stops working, documented here, including a solution. there are OBS packages for Leap 42.1, 42.2 and Tumbleweed, you can install via one click install.
If you are testing suspend and the display is dark after wake up, try to make it brighter with the keyboard. Try with and without Fn key, because the function can be swapped. Try pressing it often, because you don't see whether it's changing something or not.
i had problems with the laptop waking up seconds after the suspend.
for i in $(cat /proc/acpi/wakeup | grep enabled | grep -o -E "^[A-Z0-9]+"); do echo $i > /proc/acpi/wakeup; done
this needs to be executed at every start of the system. i switched to mint and put it into /etc/rc.local, not sure it also works in suse. the laptop does not wake up automatically anymore if you open the screen or press a random button, but the power button does work. not that on some hardware you could get problems because you are basically switching off the events that can wake the system up. but in the worst case you have to wait until the system drains the battery, and the hardware reset should always work.
- To reduce energy consumption, I recommend the installation and activation of tlp (it is in the default repositories, but needs manual activation in system services).
- there are more power saving options for mac laptops here (that is specific for MacBookAir6-2, but others are probably similar. i'm still testing).
- there is more documentation on the apple keyboard, including a link to a patch for switching Fn and Ctrl buttons. Not that if you only want to switch command and alt button, that's also possible by default in KDE's System Settings -> Input devices -> Advanced -> Configure keyboard options -> Alt/Win key behaviour -> Alt is swapped with Win.