Installation on MacBook Pro Intel (x86)
From openSUSE
| This article is under review! The contents are currently being evaluated and edited by User:Jonathan_R. Others should not make major changes in the meantime. Thanks for the cooperation. |
| Documentation: |
|---|
| Installation - Package management - Configuration - Hardware - HOWTOs - Users_FAQ |
| For more recent generic install instructions, please read the main openSUSE on a Mac page. Details form this page should be migrated there, and a single page created for specific Macbook Pro hardware details.
This page will help you to install openSUSE on a MacBook or MacBook Pro. This procedure puts your Mac OSX operating system and all data on your drive at risk. Back up your data. If you are not familiar with disk partitioning, this is not for you. The original material for this page is now on the Talk page. |
Contents |
Disk Preparation
We assume you've OSX installed on your hard-drive and use the whole hard-drive for OSX. So the first step is to shrink the partition containing OSX and create new partitions for your new OS.
Resize OEM Partition
Use Boot Camp to resize the original Mac OSX partition. This process is done from within OSX.
Alternative procedure
If you don't want to use Boot Camp, try the following method. We assume you want to create
- one partition containing Mac OSX
- one partition containing openSUSE
- one partition containing Windows or your SWAP partition
Together with the EFI Bootloader in Partition one, this would result in the following schema:
| Partition number | Harddisc name in diskutil (OSX) | Harddisc name in openSUSE | Planned OS for this partition | Size used in our examples |
|---|---|---|---|---|
| 1 | disk0s1 | /dev/sda1 | EFI Bootloader | 210MB |
| 2 | disk0s2 | /dev/sda2 | Mac OSX | 50 GB |
| 3 | disk0s3 | /dev/sda3 | openSUSE | 40 GB |
| 4 | disk0s4 | /dev/sda4 | Windows or Linux SWAP | ~30GB |
The sizes depend on your needs. If you don't want Windows, partition 4 might be a bit to big for you. But we will use the sizes in our examples - so please use the table for reference and adapt the commandline options to your needs.
We will use the following tools to get what we want:
- diskutil on OSX
- parted on openSUSE
Disable Journaling
diskutil is part of OSX - and parted can be found in any openSUSE version. You can also boot the rescue system - it also contains parted.
The first step is to disable the journaling of your HFS+ partition. This is needed because parted can't work on a partition with enabled journaling. So boot your Mac OSX, start a console and enter the following command:
That's it. Now you can go on installing rEFIt.
| Don't forget to enable journaling afterwards with again. |
Partitioning
If you haven't installed any other OS, you can start installing openSUSE. If you've already installed another OS - or like to resize your partitions after a few months of testing, proceed here.
The easiest way is to boot the openSUSE rescue system from your media. After selecting the entry in the first bootsplash, the rescue system will be loaded and you will be prompted to login as root. Now use parted to resize/delete/create your partitions as needed.
This shrinks the OSX partition to 50 GB.
This will create a 40 GB partition.
Assuming you've a 120GB harddisc, this will create a partition with 30GB.
Will show you informations about your device including the new paritions.
That's it. Just typeInstall rEFIt
rEFIt is a boot menu program designed for the Macintosh EFI (BIOS alternative).
Installation
Install openSUSE
Reboot MacBook with openSUSE install dvd/cdrom in drive. You can either use a standard install DVD, or use the Live CD and then use the install link on the desktop.
Linux icon should appear in refit screen representative of the install cd. Select it. SuSE install CD boots.
Partitioning
Apple's EFI system allows a maximum of 4 partitions on the primary hard drive. You should use the Expert Partitioning in YaST to set/check your settings manually.
| Warning
| Do not delete sda1 and sda2 in the partitioner unless you want to completely remove OSX! |
Depending on how you used Boot Camp to re-size, Partition 3 may already be reserved for Linux.
In most cases, the best configuration is to create two partitions: a root partition and a swap partition. Make root sda3, and format as Ext3. Make sda4 the swap partition, and size equal to your system's memory.
Double-check your setup to make sure that partitions 1 & 2 are not set to be formatted.
| As Intel Macs use GPT (part of EFI), the expert partitioner will warn you that most BIOS versions can't use GPT. In this case you can ignore the warning as Intel Macs use EFI as BIOS. Proceed without changing your partition setup again (click "No"). |
| If you decided to install also Windows on your Mac, be shure to reserve the last partition for Windows and don't create a SWAP partition. You can use a SWAP-file later instead. So answer "No" if YaST asks you about creating a SWAP partition. |
Boot Loader
Since openSUSE 10.2 it's no more necessary to use LILO as bootloader. Just check if GRUB will be installed in your Linux partition (in our example /dev/sda3'). If you want to use LILO anyway, just have a look at the end of this page.
| Warning
| When prompted about any issues with your MBR after the first installation step, do not have the installer fix the MBR! |
Update MBR in rEFIt
- When rEFIt menu opens, select Partitioning (below the Apple and Tux boot icons). When prompted to "sync the MBR with GPT", select Yes.
- Reboot
- Select Linux from rEFIt menu.
Now power off your Mac for at least 5 seconds. Otherwise the changes will not shown up in the rEFIt menu.
Re-install the bootloader if needed
If your openSUSE Partition will not start, boot the system using the install medium again and select rescue from the installation menu.
This will launch a rescue shell. When you have shell and logged in as root do as follows within the shell:
- mount the linux partition
- mount the needed /proc and /dev directories
- chroot in to the environment
- check the correct settings for the grub menu
This should show you something like:
# Modified by YaST2. Last modification on Tue Apr 17 14:25:10 CEST 2007
default 0
timeout 8
##YaST - generic_mbr
gfxmenu (hd0,2)/boot/message
##YaST - activate
title openSUSE
root (hd0,2)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160812AS_5LS5X8C0-part2 vga=0x31a resume=/dev/sda1 splash=silent showopts
initrd /boot/initrd-2.6.22.17-0.1-default
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE
root (hd0,2)
kernel /boot/vmlinuz-2.6.22.17-0.1-default root=/dev/disk/by-id/scsi-SATA_ST3160812AS_5LS5X8C0-part2 vga=normal showopts ide=nodma apm=off acpi=off noresume nosmp noapic maxcpus=0 edd=off 3
initrd /boot/initrd-2.6.22.17-0.1-default
If not, just open the file /boot/grub/menu.lst with vi:
and change the settings to your needs.
- check the grub config
This should show you something like:
setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2) quit
Be sure that the entries for hd are correct. In the above example, grub will be installed in the first hard drive (hd0) on the third partition (hd0,2) – which is our example configuration. Edit these settings if needed.
- Install Grub correctly
Look at the output of the command – it should show you:
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> setup --stage2=/boot/grub/stage2 (hd0,2) (hd0,2)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0,3)"... failed (this is not fatal)
Running "embed /boot/grub/e2fs_stage1_5 (hd0,3)"... failed (this is not fatal)
Running "install --stage2=/boot/grub/stage2 /boot/grub/stage1 (hd0,2) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit
The last line beginning with "Running" is the important one: Running "install[...] succeeded"
- now reboot and run sync MBR to GPT in rEFIt again.
Now you should be able to boot your openSUSE from rEFIt – afterwards grub starts and you can select the correct kernel (important for future kernel updates...).
Configuration / specific Hardware
Please consult MacBook_Pro_Specials for a bunch of helpful tips.
Using LILO instead of GRUB
Since openSUSE 10.3 it's not necessary to use LILO. You can use the default bootloader GRUB instead. But if you like, booting with LILO is also possible...
Procedure to Modify LILO
If openSUSE does not boot after selecting Linux from the rEFIt boot menu, you may need to configure LILO. You can do this by booting from either the Live CD or the Install DVD and follow these steps
- Boot using the openSUSE media.
- Select the rescue option from menu. This will launch a rescue shell.
- At the prompt, log in as root.
- Mount your Linux partition with these steps, replacing /dev/sda3 with the correct partition id:
mount /dev/sda3 /mnt
- Mount proc and dev
mount -t proc none /mnt/proc mount -o bind /dev /mnt/dev
- Switch environment to use the hard disk
chroot /mnt /bin/bash
- Copy the partition table info to mtab:
grep -v rootfs /proc/mounts > /etc/mtab
Now you have a Linux environment to work from.
- Create lilo.conf script. This should reside in /etc directory. Therefore follow these steps:
cd /etc touch lilo.conf vi lilo.conf
- Edit lilo.conf as follows
boot=/dev/sda3 prompt default=Linux timeout=5 image=/boot/vmlinuz initrd=/boot/initrd label=Linux read-only root=/dev/sda3
If you know the basic hot keys for using VI on a MacBook keyboard (such as Ins to enter edit mode), then please add the information here.
- Save lilo.conf. Install lilo by simply running
lilo
This will put bootloader on to /dev/sda3. Success is indicated by something like "Added Linux *".

