This handbook has been replaced by a newer version and is not maintained anymore.
[ << ]
[ < ]
[ Home ]
[ > ]
[ >> ]
10. Configuring the Bootloader
10.a. Making your Choice
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 until grub2 is
10.b. Using yaBoot
For a 64bit userland use yaboot-static instead of yaboot, because yaboot won't
compile on 64bit userland systems. For a 32bit userland use yaboot as you
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.
If you are installing on a G5 using an online install and have not used the
G5 optimized stages you must change what profile you are linked to now. If you
do not you will not get dependencies necessary for yaboot to run on Apple
equipment. In the command below replace (userland) with your chosen
userland bit level. If you are installing on a G5 using an offline install
you have to install these packages by hand.
Code Listing 2.1: (ONLINE INSTALL FOR G5 USERS ONLY) Changing your profile
# rm /etc/make.profile
# ln -sf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/970/pmac /etc/make.profile
Code Listing 2.2: (OFFLINE INSTALL FOR G5 USERS ONLY) Installing Necessary File System Tools
# emerge hfsutils hfsplusutils
Code Listing 2.3: Installing the bootloader
# emerge --update yaboot-static
# emerge --update yaboot
yabootconfig/ybin won't work on IBM. You have to install yaboot another way:
Using yaboot on IBM hardware
If your root filesystem uses the JFS filesystem, be sure to add ro as a
kernel parameter. JFS must be able to replay its log in read-only mode before it
gets mounted read-write.
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
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.
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
Now continue with Rebooting your System.
Alternative: Manual yaBoot Configuration
Below you find a completed yaboot.conf file. Alter it at
Code Listing 2.4: /etc/yaboot.conf
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! Confirm when mkofboot asks you to create a new
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
10.c. Using yaboot on IBM hardware
On IBM hardware you cannot run yabootconfig or ybin. You must proceed with the
- Install yaboot-static
- Run 'dd if=/usr/lib/yaboot/yaboot.chrp of=/dev/sdXX' (fill in XX
with your disk and partition for the PReP partition; this was in our
- Next construct your own yaboot.conf file and place into /etc.
(Take a look at the config above, look into the man page of
yaboot.conf or look at the below yaboot.conf example)
- Assuming your boot device in OF is pointing to the harddrive you
prep boot partition is on then it'll just work, otherwise at IPL time,
go into the multiboot menu and set the boot device to the one with
your prep boot partition.
- That's it!
Code Listing 3.1: yaboot.conf for IBM hardware
For POWER4, POWER5, and blade-based hardware where the PReP disk partition
and the disk partition that contains your kernel are on the same physical disk,
you can use a simplified yaboot.conf. The following should be sufficient:
Code Listing 3.2: yaboot.conf for PReP hardware
default = linux
timeout = 100
root = /dev/sda2
To verify that yaboot has been copied to the PReP partition:
Code Listing 3.3: Verifying the yaboot install on PReP
# dd if=/dev/sda1 count=10 | grep ELF
Binary file (standard input) matches
10+0 records in
10+0 records out
A match signifies that yaboot was installed correctly.
10.d. 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.
Code Listing 4.1: Exiting the chroot, unmounting all partitions and rebooting
~# umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
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.
[ << ]
[ < ]
[ Home ]
[ > ]
[ >> ]
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.