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
The bootloader that you use will depend upon the type of PPC machine you have.
If you are using a NewWorld Apple or IBM machine, you need to use
In order to find the boot devices, yaboot needs access to the device nodes
created by udev on startup and the sysfs filesystem. These two filesystems
are found at
# exit # this will exit the chroot # mount --rbind /dev /mnt/gentoo/dev # mount --rbind /sys /mnt/gentoo/sys # chroot /mnt/gentoo /bin/bash # /usr/sbin/env-update && source /etc/profile
To set up yaboot, you can use
########################################################### ## This section can be duplicated if you have more than one ## kernel or set of boot options - replace the image and initrd ## with the exact filename of your kernel and initrd image. ########################################################### image=/boot/label=Linux root=/dev/ram0 partition=3 initrd=/boot/ # You can add additional kernel arguments to append such as # rootdelay=10 for a USB/Firewire Boot append="real_root=/dev/sda3" read-only##########################################################
To use
# emerge yaboot
Now exit the chroot and run
# chroot /mnt/gentoo /bin/bash # /usr/sbin/env-update && source /etc/profile
You should verify the contents of
Now continue with
First, install
# emerge yaboot
An example
## /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/sdaX, macos=/dev/sdaY, macosx=/dev/sdaZ ## The bootstrap partition: boot=/dev/sda2## ofboot is the Open Firmware way to specify the bootstrap partition. ## If this isn't defined, yaboot fails on the G5 and some G4s (unless ## you pass the necessary arguments to the mkofboot/ybin program). ## hd:X means /dev/sdaX. ## ## G5 users should uncomment this line!! #ofboot=hd:2 ## Users booting from firewire should use something like this line: # ofboot=fw/node/sbp-2/disk@0: ## Users booting from USB should use something like this line: # ofboot=usb/disk@0: ## hd: is shorthand for the first hard drive Open Firmware sees device=hd:## Firewire and USB users will need to specify the whole OF device name ## This can be found using ofpath, which is included with yaboot. # device=fw/node@0001d200e00d0207/sbp-2@c000/disk@0: 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 - replace the image variable ## with the exact filename of your kernel. ########################################################### image=/boot/label=Linux root=/dev/sda3 partition=3 # append="rootdelay=10" # Required for booting USB/Firewire read-only################## ## G5 users and some G4 users should set ## macos=hd:13/ ## macosx=hd:12 ## instead of the example values. macos=/dev/sda13 macosx=/dev/sda12 enablecdboot enableofboot
Once
# mkofboot -v
For more information on yaboot, take a look at the
Since BootX boots Linux from within MacOS, the kernel will need to be copied
from the Linux Partition to the MacOS partition. First, mount the MacOS
partition from outside of the chroot. Use
# exit cdimage ~# mkdir /mnt/mac cdimage ~# mount /dev/sda6 /mnt/mac -t hfs cdimage ~# cp /mnt/gentoo/usr/src/linux/vmlinux "/mnt/mac/System Folder/Linux Kernels/"
If genkernel is used, both the kernel and initrd will need to be copied to the MacOS partition.
# exit cdimage ~# mkdir /mnt/mac cdimage ~# mount /dev/sda6 /mnt/mac -t hfs cdimage ~# cp /mnt/gentoo/boot/"/mnt/mac/System Folder/Linux Kernels" cdimage ~# cp /mnt/gentoo/boot/ "/mnt/mac/System Folder"
Now that the kernel is copied over, we'll need to reboot to set up BootX.
cdimage ~# cd /
cdimage ~# umount -l /mnt/gentoo/dev{/pts,/shm,}
cdimage ~# umount -l /mnt/gentoo{/proc,/sys,}
cdimage ~# umount -l /mnt/mac
cdimage ~# reboot
Of course, don't forget to remove the bootable CD, otherwise the CD will be booted again instead of MacOS.
Once the machine has booted into MacOS, open the BootX control panel. If you're
not using genkernel, select
BootX can be configured to start Linux upon boot. If you do this, you will first
see your machine boot into MacOS then, during startup, BootX will load and start
Linux. See the
Now reboot again and boot into Linux, then continue with
First, we'll need to install
# emerge quik
Next, we'll need to set it up. Edit
# Example of quik.conf init-message = "Gentoo Linux\n"# This is the boot partition partition = 2 root = /dev/sda4 timeout = 30 default = gentoo# This is your kernel image = /label = gentoo
Your
# mv /etc/quik.conf /boot/quik.conf
We will now set your boot variables so that quik loads on boot. To do this,
we'll use a program called
# nvsetenv auto-boot true# Set to false if you want to boot into OF, not all models can display the OF output # nvsetenv output-device video# Check the quirks page, there are many variations here # nvsetenv input-device kbd # nvsetenv boot-device scsi/sd@1:0# For SCSI # nvsetenv boot-device ata/ata-disk@0:0# For ATA # nvsetenv boot-file /boot/root=/dev/sda4 First item is the path to the kernel, the second is the root partition. You may append any kernel options to the end of this line. # nvsetenv boot-command boot# Set this to bye for MacOS and boot for Linux
Now that we've set up our machine to boot, we'll need to make sure the boot
images are installed correctly. Run
Now, continue the installation with
First make sure you have
# emerge bootcreator
Now copy the file
# cp /etc/bootmenu.example /etc/bootmenu # nano -w /etc/bootmenu
Below is a complete
# # Example description file for bootcreator 1.1 # [VERSION] 1 [TITLE] Boot Menu [SETTINGS] AbortOnKey = false Timeout = 9 Default = 1 [SECTION] Local HD -> Morphos (Normal) ide:0 boot2.img ramdebug edebugflags="logkprintf" [SECTION] Local HD -> Linux (Normal) ide:0video=radeonfb:1024x768@70 root=/dev/sda3 [SECTION] Local HD -> Genkernel (Normal) ide:0 root=/dev/ram0 real_root=/dev/sda3 initrd=
Finally the
# bootcreator /etc/bootmenu /boot/menu
For now, continue the installation with
Exit the chrooted environment and unmount all mounted partitions. Then type in
that one magical command you have been waiting for:
# exit
livecd ~# umount -l /mnt/gentoo/dev{/pts,/shm,}
livecd ~# umount -l /mnt/gentoo{/proc,/sys,}
livecd ~# reboot
Once rebooted in your Gentoo installation, finish up with