Beruflich Dokumente
Kultur Dokumente
org/Installation_on_MacBook
Õpetus – http://en.opensuse.org/Installation_on_MacBook
• bootcamp peale ja MacOSi partitsioon väiksemaks
• refit peale, mis on nii boot manager kui ka gptmbr tõlk
• käivita CD/DVD pealt linux ja partitsioonid tee partediga
• taaskäivita arvuti ja refitiga gptmbr sünkroniseerimine
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/CDRom 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
harddrive option', just reboot your Laptop. A fix workaround: connect an USBKeyboard 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 SWAPFile on this partition – this can be
done later)
• Linux and MacOSX => one SwapPartition, one Linux and one MacPartition
• 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
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
3 / 8
http://en.opensuse.org/Installation_on_MacBook
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
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/CDRom 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
harddrive option', just reboot your Laptop. A fix workaround: connect an USBKeyboard 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 SWAPFile on this partition – this can be
done later)
• Linux and MacOSX => one SwapPartition, one Linux and one MacPartition
• 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)
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
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
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...).
8 / 8