Making your Choice Introduction

Now that your kernel is configured and compiled and the necessary system configuration files are filled in correctly, it is time to install a program that will fire up your kernel when you start the system. Such a program is called a bootloader.

On Linux/PPC64 we have only yaBoot as a bootloader untill grub2 is finished.

Using yaBoot Introduction You have to use yaboot-static instead of yaboot, because yaboot won't compile on PPC64.

There are two ways to configure yaBoot for your system. You can use the new and improved yabootconfig included with yaboot-1.3.8-r1 and later to automatically set up yaboot. If for some reason you do not want to run yabootconfig to automatically set up /etc/yaboot.conf or you are installing Gentoo on a G5 (on which yabootconfig does not always work), you can just edit the sample file already installed on your system.

yabootconfig/ybin won't work on IBM. You have to install yaboot another way: Using yaboot on IBM
  • Default: Using yabootconfig
  • Alternative: Manual yaBoot Configuration
Default: Using yabootconfig

yabootconfig will auto-detect the partitions on your machine and will set up dual and triple boot combinations with Linux, Mac OS, and Mac OS X.

To use yabootconfig, your drive must have a bootstrap partition, and /etc/fstab must be configured with your Linux partitions. Both of these should have been done already in the steps above. To start, ensure that you have the latest version of yaboot installed by running emerge --update yaboot-static. This is necessary as the latest version will be available via Portage, but it may not have made it into the stage files.

# emerge --update yaboot-static

Now run yabootconfig. The program will run and it will confirm the location of the bootstrap partition. Type Y if it is correct. If not, double check /etc/fstab. yabootconfig will then scan your system setup, create /etc/yaboot.conf and run mkofboot for you. mkofboot is used to format the bootstrap partition, and install the yaboot configuration file into it.

You might want to verify the contents of /etc/yaboot.conf. If you make changes to /etc/yaboot.conf (like setting the default/boot OS), make sure to rerun ybin -v to apply changes to the bootstrap partition.

Now continue with Rebooting your System.

Alternative: Manual yaBoot Configuration

First make sure you have the latest yaboot-static installed on your system:

# emerge --update yaboot-static

Below you find a completed yaboot.conf file. Alter it at will.

## /etc/yaboot.conf
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

## our bootstrap partition:

boot=/dev/sda2

## ofboot is the openfirmware way to specify the bootstrap partition.
## If this isn't defined, yaboot fails on the G5 (unless you pass the necessary
## arguments to the mkofboot/ybin program).
## hd:X means /dev/sdaX (or /dev/hdaX).
## 
## G5 users should uncomment this line!!

ofboot=hd:2

##hd: is open firmware speak for sda
device=hd:
partition=4

delay=5
defaultos=macosx
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

#################
## This section can be duplicated if you have more than one kernel or set of
## boot options
#################
image=/boot/kernel-2.6.7-gentoo-r8
  label=Linux
  root=/dev/sda4
  sysmap=/boot/System.map-2.6.7
  read-only
##################

macos=hd:5
macosx=hd:6
enablecdboot
enableofboot

Once yaboot.conf is set up the way you want it, you run mkofboot -v to install the settings in the bootstrap partition. Don't forget this! If all goes well, and you have the same options as the sample above, your next reboot will give you a simple, five-entry boot menu. If you update your yaboot config later on, you'll just need to run ybin -v to update the bootstrap partition - mkofboot is for initial setup only.

For more information on yaboot, take a look at the yaboot project. For now, continue the installation with Rebooting your System.

Using yaboot on IBM

On IBM hardware you cannot run yabootconfig or ybin. You have to proceed the folowing steps:

Rebooting the System

Exit the chrooted environment and unmount all mounted partitions. Then type in that one magical command you have been waiting for: reboot.

# exit
cdimage ~# cd
cdimage ~# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
cdimage ~# reboot

Of course, don't forget to remove the bootable CD, otherwise the CD will be booted again instead of your new Gentoo system.

Once rebooted in your Gentoo installation, finish up with Finalizing your Gentoo Installation.