7.22. Making the Temporary System Bootable

Some of the idiosyncracies of booting on ppc are discussed in Appendix E. Essentially, there are two options here - either copy the bootloader to an OSX root partition and boot from Open Firmware, or use an install, Live, or rescue CD to set up a bootstrap partition.

7.22.1. Copying the bootloader to OSX and booting from OF.

You must now ensure that /tools/etc/yaboot.conf contains the correct details for the CLFS system. Consult Section 13.3, “Making the CLFS System Bootable.” for details, but note that at this point you do not need the install, magicboot, enablecdboot or macosx parameters because these are not available when you boot from Open Firmware.

By this stage, you should have the temporary system on an ext2 filesystem on your Mac. Now, from within OSX, copy /tools/lib/yaboot/yaboot) and /tools/etc/yaboot.conf) to the OSX / directory.

Each time you want to boot into the temporary system, hold down the option-command-o-f keys to get to Open Firmware, then use the following command, replacing X with the number of the partition containing the OSX root filesystem (typically, this will be '3').

boot hd:X,yaboot

7.22.2. Using a CD to set up the bootstrap partition.

This is particularly appropriate if you cannot write to an ext2 filesystem from OSX. Boot from the CD, and (as necessary) create partitions and filesystems, mount the CLFS partition at /tools and untar the temporary system there.

Now set up /tools/etc/yaboot.conf - see Section 13.3, “Making the CLFS System Bootable.” for details of what should be in it, but note that the install and magicboot specifications should point to/tools/lib/yaboot/ and not /usr/lib/yaboot.

To write the bootloader to the disk, with /tools/sbin first on your path and /proc mounted, run the following command:

[Warning]

Warning

The following command will update the bootstrap partition and the boot variable in Open Firmware. Do not run the command if this is not desired.

PATH_PREFIX=/tools ybin -v -C /tools/etc/yaboot.conf

Alternatively, if the bootstrap partition has not already been initialized, perhaps because you are using a Live CD, you will need to use a different command to install the bootloader for the first time:

PATH_PREFIX=/tools mkofboot