Sie sind auf Seite 1von 8

http://en.opensuse.

org/Installation_on_MacBook

Õpetus – http://en.opensuse.org/Installation_on_MacBook 

• bootcamp peale ja MacOS­i partitsioon väiksemaks
• refit peale, mis on nii boot manager kui ka gpt­mbr tõlk
• käivita CD/DVD pealt linux ja partitsioonid tee parted­iga
• taaskäivita arvuti ja refitiga gpt­mbr sünkroniseerimine

openSUSE 10.3 on an Apple MacBook


This article has been created using openSUSE 10.3 Alpha3. It will hopefully get easier with 
the next official version of openSUSE. 

Preparation
This chapter describes the steps you should do before you install openSUSE on your MacBook 
Pro. 

Resizing
The OS X partition has to be resized. This is most easily done with the help of the Mac OS X 
program diskutil. diskutil is able to nondestructively resize volumes since the version that 
came with 10.4.6 along with BootCamp (find more informations on macgeekery.com). 
The partition can be resized with the command: 
diskutil resizeVolume disk0s2 30G

Assuming disk0s2 contains OS X. 
(Warning: this may or may not work depending if your partition has been resized before. 
Alternate approach: disable journaling in MacOS, boot to Linux, use Parted to resize the 
MacOS partition and turn journaling back on in MacOS and have the filesystem checked.) 
openSUSE 10.3 on an Apple MacBook 
This article has been created using openSUSE 10.3 Alpha3. It will hopefully get easier with 
the next official version of openSUSE. 

Preparation
This chapter describes the steps you should do before you install openSUSE on your MacBook 
Pro. 

1 / 8
http://en.opensuse.org/Installation_on_MacBook

Resizing
The OS X partition has to be resized. This is most easily done with the help of the Mac OS X 
program diskutil. diskutil is able to nondestructively resize volumes since the version that 
came with 10.4.6 along with BootCamp (find more informations on macgeekery.com). 
The partition can be resized with the command: 
diskutil resizeVolume disk0s2 30G

Assuming disk0s2 contains OS X. 
(Warning: this may or may not work depending if your partition has been resized before. 
Alternate approach: disable journaling in MacOS, boot to Linux, use Parted to resize the 
MacOS partition and turn journaling back on in MacOS and have the filesystem checked.) 

Install refit
After that the new bootmanager rEFIt has to be installed. The easiest is to install the disk 
image in OS X. We used version 0.9 in this description. 
Just be shure that the GPT and MBR have to be synchronized: reboot and choose "sync MBR 
to GPT" in rEFIt. 
Now you are ready to install openSUSE. Shut down and restart or reboot you MacBook Pro. 
Insert the openSUSE install DVD/CD­Rom in drive and boot from it. The installation 
workflow (language and package selection, timezone, ...) is equivalent to the normal 
workflow for openSUSE on other hardware. So we just describe the differences here. 
Sometimes the internal Keyboard of the MacBook Pro is not recognised during the first boot. 
So when the openSUSE install menu (with install/rescue/ options) hangs on the `boot from 
hard­drive option', just reboot your Laptop. A fix workaround: connect an USB­Keyboard to 
your MacBook when the installation menu starts. 

Partitioning
You should have not more than four partitions – and the first one is reserved for rEFIt. So 
this is the time when you decide if you want: 
• Windows, Linux and MacOSX => one Partition for each: 
• Partition 1: rEFIT (dont't format) 
• Partition 2: MacOSX (don't format) 
• Partition 3: Windows (Prepare and install Windows on it bevore you went 
through the next steps) 
• Partition 4: Linux (You should create a SWAP­File on this partition – this can be 
done later) 
• Linux and MacOSX => one Swap­Partition, one Linux and one Mac­Partition 
• Partition 1: rEFIT (dont't format) 
• Partition 2: MacOSX (don't format) 
• Partition 3: SWAP for Linux 
• Partition 4: Linux (we choose the default "ext3" format for this partition here) 

2 / 8
http://en.opensuse.org/Installation_on_MacBook

Location of the Bootloader


This step is very important! 
Be sure that the bootloader is NOT installed in the MBR – just in /dev/sda4 (the
Linux Partition)!

So have a look at the "Expert" Tab in the Installation Overview Dialog in the Section 
Bootloader and check the correct settings. 

Installation
Now you are ready to start the installation. At the end of the installation, the Bootloader 
installation will fail. So you have to skip this part and reboot your MacBook. 
Use the rEFIT GPT/MBR synctool (sync MBR to GPT) to synchronise GPT and MBR again. 
Afterwards boot the system using the install medium again and select rescue from the 
installation menu. 
This will lanch a rescue shell. When you have shell and logged in as root do as follows within 
the shell: 
• mount the linux partition: 
mount /dev/sda4 /mnt

• mount the needed /proc and /dev directories: 
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev

• chroot in to the environment: 
chroot /mnt /bin/bash

• check the correct settings for the grub menu: 
cat /boot/grub/menu.lst

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,3)/boot/message
##YaST - activate

title openSUSE FACTORY 10.3 -- Kernel-2.6.21-rc7-2


root (hd0,3)
kernel /boot/vmlinuz-2.6.21-rc7-2-default root=/dev/disk/by-id/scsi-
SATA_FUJITSU_MHW2120_NZ0ST712CTP5-part4 vga=0x355 resume=/dev/sda3 splash=silent
showopts
initrd /boot/initrd-2.6.21-rc7-2-default

3 / 8
http://en.opensuse.org/Installation_on_MacBook

###Don't change this comment - YaST2 identifier: Original name: failsafe###


title Failsafe -- openSUSE FACTORY 10.3
root (hd0,3)
kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-
SATA_FUJITSU_MHW2120_NZ0ST712CTP5-part4 vga=normal showopts ide=nodma apm=off
acpi=off noresume edd=off 3
initrd /boot/initrd

If not, just open the file /boot/grub/menu.lst with vi: 
vi /boot/grub/menu.lst

and change the settings to your needs. 
• check the grub config: 
cat /etc/grub.conf

This should show you something like: 
setup --stage2=/boot/grub/stage2 (hd0,3) (hd0,3)
quit

Be shure that the entries for hd are correct. In the above example, grub will be installed in 
the first harddrive (hd0) on Partition 4 (hd0,3) – which is our example configuration. Edit 
these settings if needed. 
• Install Grub correctly: 
grub --batch < /etc/grub.conf

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,3) (hd0,3)
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,3) /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...). 

4 / 8
http://en.opensuse.org/Installation_on_MacBook

Changes after installation


Here we collect some additional Tips and Tricks which makes the life with openSUSE on a 
MacBook easier. As the Hardware of the MacBook and MacBook Pro is different there are two 
ways to continue: 
•  MacBook Specials  
•  MacBook Pro Specials  

Bugreports concerning the MacBook


• Better support for the touchpad is needed, at the moment there is no right click 
possible: Bug 250427 
• After an update to alpha1plus my lilo did not install, therefore the system wouldn't 
boot: Bug 250251 – fixed for me with perl­Bootloader­0.4.13­3 
• During Installation there is no touchpad available: Bug 223450 
• MBR and GPT are not synchronized Bug 220839 
• Fn+F3 does not mute the speakers Bug 254164 – right clicking on the mixer icon in 
the tray allows to change the main channel, after that it works. 
• /etc/init.d/hotkey­setup gives error Bug 255676 
• Brightness control is not working Bug 255676 – it is working with the dbus command 
from the bugreport, but not from kpowersave ... 

Install refit
After that the new bootmanager rEFIt has to be installed. The easiest is to install the disk 
image in OS X. We used version 0.9 in this description. 
Just be shure that the GPT and MBR have to be synchronized: reboot and choose "sync MBR 
to GPT" in rEFIt. 
Now you are ready to install openSUSE. Shut down and restart or reboot you MacBook Pro. 
Insert the openSUSE install DVD/CD­Rom in drive and boot from it. The installation 
workflow (language and package selection, timezone, ...) is equivalent to the normal 
workflow for openSUSE on other hardware. So we just describe the differences here. 
Sometimes the internal Keyboard of the MacBook Pro is not recognised during the first boot. 
So when the openSUSE install menu (with install/rescue/ options) hangs on the `boot from 
hard­drive option', just reboot your Laptop. A fix workaround: connect an USB­Keyboard to 
your MacBook when the installation menu starts. 

Partitioning
You should have not more than four partitions – and the first one is reserved for rEFIt. So 
this is the time when you decide if you want: 

5 / 8
http://en.opensuse.org/Installation_on_MacBook

• Windows, Linux and MacOSX => one Partition for each: 
• Partition 1: rEFIT (dont't format) 
• Partition 2: MacOSX (don't format) 
• Partition 3: Windows (Prepare and install Windows on it bevore you went 
through the next steps) 
• Partition 4: Linux (You should create a SWAP­File on this partition – this can be 
done later) 
• Linux and MacOSX => one Swap­Partition, one Linux and one Mac­Partition 
• Partition 1: rEFIT (dont't format) 
• Partition 2: MacOSX (don't format) 
• Partition 3: SWAP for Linux 
• Partition 4: Linux (we choose the default "ext3" format for this partition here) 

Location of the Bootloader


This step is very important! 
Be sure that the bootloader is NOT installed in the MBR – just in /dev/sda4 (the
Linux Partition)!

So have a look at the "Expert" Tab in the Installation Overview Dialog in the Section 
Bootloader and check the correct settings. 

Installation
Now you are ready to start the installation. At the end of the installation, the Bootloader 
installation will fail. So you have to skip this part and reboot your MacBook. 
Use the rEFIT GPT/MBR synctool (sync MBR to GPT) to synchronise GPT and MBR again. 
Afterwards boot the system using the install medium again and select rescue from the 
installation menu. 
This will lanch a rescue shell. When you have shell and logged in as root do as follows within 
the shell: 
• mount the linux partition: 
mount /dev/sda4 /mnt

• mount the needed /proc and /dev directories: 
mount -t proc none /mnt/proc
mount -o bind /dev /mnt/dev

• chroot in to the environment: 
chroot /mnt /bin/bash

6 / 8
http://en.opensuse.org/Installation_on_MacBook

• check the correct settings for the grub menu: 
cat /boot/grub/menu.lst

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,3)/boot/message
##YaST - activate

title openSUSE FACTORY 10.3 -- Kernel-2.6.21-rc7-2


root (hd0,3)
kernel /boot/vmlinuz-2.6.21-rc7-2-default root=/dev/disk/by-id/scsi-
SATA_FUJITSU_MHW2120_NZ0ST712CTP5-part4 vga=0x355 resume=/dev/sda3 splash=silent
showopts
initrd /boot/initrd-2.6.21-rc7-2-default

###Don't change this comment - YaST2 identifier: Original name: failsafe###


title Failsafe -- openSUSE FACTORY 10.3
root (hd0,3)
kernel /boot/vmlinuz root=/dev/disk/by-id/scsi-
SATA_FUJITSU_MHW2120_NZ0ST712CTP5-part4 vga=normal showopts ide=nodma apm=off
acpi=off noresume edd=off 3
initrd /boot/initrd

If not, just open the file /boot/grub/menu.lst with vi: 
vi /boot/grub/menu.lst

and change the settings to your needs. 
• check the grub config: 
cat /etc/grub.conf

This should show you something like: 
setup --stage2=/boot/grub/stage2 (hd0,3) (hd0,3)
quit

Be shure that the entries for hd are correct. In the above example, grub will be installed in 
the first harddrive (hd0) on Partition 4 (hd0,3) – which is our example configuration. Edit 
these settings if needed. 
• Install Grub correctly: 
grub --batch < /etc/grub.conf

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. ]

7 / 8
http://en.opensuse.org/Installation_on_MacBook

grub> setup --stage2=/boot/grub/stage2 (hd0,3) (hd0,3)


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,3) /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...). 

Changes after installation


Here we collect some additional Tips and Tricks which makes the life with openSUSE on a 
MacBook easier. As the Hardware of the MacBook and MacBook Pro is different there are two 
ways to continue: 
•  MacBook Specials  
•  MacBook Pro Specials  

Bugreports concerning the MacBook


• Better support for the touchpad is needed, at the moment there is no right click 
possible: Bug 250427 
• After an update to alpha1plus my lilo did not install, therefore the system wouldn't 
boot: Bug 250251 – fixed for me with perl­Bootloader­0.4.13­3 
• During Installation there is no touchpad available: Bug 223450 
• MBR and GPT are not synchronized Bug 220839 
• Fn+F3 does not mute the speakers Bug 254164 – right clicking on the mixer icon in 
the tray allows to change the main channel, after that it works. 
• /etc/init.d/hotkey­setup gives error Bug 255676 
• Brightness control is not working Bug 255676 – it is working with the dbus command 
from the bugreport, but not from kpowersave ... 

8 / 8

Das könnte Ihnen auch gefallen