Creating a Bootstrap Partition
Newworld Macs (which are based on the CHRP standard) require a "blessed" CHRP openfirmware script to boot on a HFS or HFS+ partition. If you look on your Mac OS partitions, with a program that can see invisable files, you will find this CHRP openfirmware script in your Mac OS System Folder with the name tbxi.
This means, in almost all cases, you need a special bootstrap partition for Linux, as Linux can not reside on a HFS or a HFS+ partition, it requires a ext2 partition.
This "bootstrap" partition should be around 5 to 10 MB. Other guides recommend more space, but it is not neccessary, and just a waste of disk space. The format doesn't matter, as we will reformat it in Linux.
Installing the Required Software
You need to get the following pieces of software:
- yaboot - rpm: Use the yaboot rpm from your distro. deb: apt-get install yaboot
-
ybin - tgz: Everybody should get it from .
yaboot
Install the yaboot RPM like any RPM: rpm -Uvh yaboot*.ppc.rpm.
Debian's apt-get will take care of the downloading and installation for you.
ybin
Open a xterm in the directory, that ybin is in. Expand the archive, and go into the ybin directory:
tar -zxvpf ybin-*.tar.gz
cd ybin-*Type in make install. If all goes well you should see:
installation successful.
Any existing /boot/ofboot.b has been replaced, the old file has been moved to /boot/ofboot.b.preserved.yaboot.conf: Ybin Configuration
/etc/yaboot.conf is yaboot and ybin's main configuration file. The first half of this file for ybin is something totally different from other bootloaders, so read carefully.
Open up this file (as root) in your favorite text editor. For me, it's either joe or kedit.
Setting the boot partition
The "boot" partition is the "bootstrap" partition you created earlier that will be used to put that "blessed" txbi file that controls booting on New World Machines.
boot=/dev/hda8
Danger! This partition will be completely erased when you run mkofboot. It should be in standard Linux syntax, ie. /dev/hda7. Make sure you do not mess up this setting. mkofboot will prompt you before erasing it, to give you a second warning.
Setting the root device
The root device is the main device your Linux partition is on (and where the kernel is found). The device variable should be changed to resemble:
device=hd:5
Note: This must be in a special OpenFirmware format shown below:
- Internal HD - hd:5 where 5 represents the partition number.
- USB Zip drive - zip:5 where 5 represents the partition number.
- External SCSI, Other IDE/ATAPI Configs - Refer to the .
Multiple OS Settings
Ybin and Yaboot are designed to boot between multiple operating systems on you computer.
- timeout=20 - Specfies how many seconds before choosing the "Default OS". This number is in seconds.
- default=macos - Specfies the Default OS. Must be either linux OR macos OR macosx
- macos=hd:8 - Specfies Location of Mac OS. Must be in the OpenFirmware Format.
-
macosx=hd:9 - Specfies Location of Mac OS X. Must be in the OpenFirmware Format.
yaboot.conf: yaboot Configuration
Linux needs to have information on where to find the kernel, and any kernel arguments to pass to it. This is different from the top of the file, which deals with setting up the bootpartition using ybin.
Note: This part of the file resembles quik.conf (used on older Macs) and lilo.conf (used on PCs). You don't have to set up these settings, but if you don't, Linux will prompt you on boot everytime for this info.
Setting the image
The "image" refers to the Linux path to the vmlinux kernel image. You should change it to /boot/vmlinux, as that is the preferred place to store the Linux kernel. It should be changed to look like:
image=/boot/vmlinux
Setting the root device
Again, you have to root device -- but this time in Linux format. Example:
root=/dev/hda5
Setting the partition
Finally, you have to specify (again!) the partition to boot. You do this with the partition= line. Example:
partition=5
More Kernel Arguments
If you want to pass arguments to the kernel (for video settings, keyboard, etc.) use append= at the end of this file.
Remove Uneccessary Lines
There are several lines you may want to remove from this file. They are:
- novideo # This gives you slow offb video. Only use if you are having video problems.
-
read-only # This mounts the Linux partition read-only. Remove it.
Sample yaboot.conf
If you configured yaboot.conf correctly, it should look like:
## example yaboot.conf for ybin and yaboot 0.6 ## see man yaboot.conf for more details. ## change to your bootstrap partition ie /dev/hda2 boot=/dev/hda7 device=hd:5 timeout=20 default=macos macos=hd:8 macosx=hd:9 install=/boot/yaboot magicboot=/boot/ofboot.b image=/boot/vmlinux label=Linux root=/dev/hda5 partition=5 append="video=aty128fb:vmode:17:cmode:32"Setting up the BootStrap
Now that yaboot.conf is configured, you should be able (as root) to run:
mkofboot -v
This will read the settings from yaboot.conf, and setup your partition. You will be warned one last time, that the partition you selected for a bootstrap, is about to be erased, and have the bootstrap installed.
If all goes well, you should see:
mkofboot: Creating HFS filesystem on /dev/hda2... mkofboot: Checking /dev/hda2 for valid HFS filesystem... mkofboot: Copying /boot/yaboot to /dev/hda2... mkofboot: Copying /etc/yaboot.conf to /dev/hda2... mkofboot: Installing first stage bootstrap: ofboot.b... mkofboot: Setting attributes on yaboot.b... mkofboot: Setting attributes on yaboot.conf... mkofboot: Setting attributes on ofboot.b... mkofboot: Blessing /dev/hda2... mkofboot: Cleaning up...Configuring OpenFirmware
To get into OpenFirmware, you need to reboot your computer, holding down the command-option-o-f keys.
Note: nvsetenv currently doesn't work on New World Macs, so you won't be able to use it.
Finally, you need to change the default boot device (the device that gets booted by default).
setenv boot-device hd:7,:tbxi
Note: Replace hd:7 with the correct OpenFirmware device.
You can turn off your machine now, as anything typed into OF is saved as soon as you type it in.
Booting using Yaboot
Newer Machines - iMac DV, PowerBook 2000, All G4s
Hold down the option key on boot to get a graphical boot menu, offering a choice between whatever OS's you configured in yaboot.conf.
If you don't hold down the option key on these machines, it will put up the standard yaboot prompt. This is explained in the section below.
Older Machines - iBooks, Blue G3, iMac Rev. D or Earlier
You will be prompted with the standard yaboot prompt at boot.
Within 20 seconds (or whatever timeout you put in yaboot.conf), you can enter in what OS you want to boot. After 20 seconds, you will get the default OS. Any extra kernel arguments can be typed after the OS's name.
Examples:
linux Linux linux S Linux Single User macos Classic Mac OS macosx Mac OS X macosx init=/bin/sh Mac OS X - No GUI, Single User


