YabootConfigurationForMacintoshPowerPCsDualBoot

Revision 4 as of 2006-03-20 19:15:58

Clear message

Configuring a Macintosh PowerPC computer for dual boot using yaboot & troubleshooting loss of the yaboot menu

Running Multiple OSes on one computer

When you install Ubuntu (or any GNU/Linux) onto your "NewWorld" Apple Macintosh PowerPC G3, G4 or G5 computer you can choose to boot between two or more operating systems. Ubuntu installs a "boot loader" called yaboot (Yet Another BOOTloader) to allow you to select which OS you'd like to boot.

Note: Newer G3, G4 or G5 Macintoshes provide an alternate method to choose which OS boots. Hold down the option key when you turn on or restart your computer and you will be presented with a list of the operating systems installed on your computer. You will be able to select your Apple OSes (OS 9, X) using this method but it seems that the yaboot partition is missed and thus you won't be able to boot Linux using the "option key method".

If you only have Ubuntu installed on your computer, yaboot loads the "kernel" and gets things started. However, if you also have Mac OS (8 or 9) and/or Mac OS X installed yaboot allows you to choose which OS you'd like to boot into.

Setting which OS yaboot automatically loads

After you install Ubuntu you will encounter a list of operating systems when you turn on or restart your computer, and, unfortunately for "newbies", Linux is set as the default. yaboot is the application that controls this list and the list will look something like this (Note: there will be variations determined by what operating systems are installed on your computer):

 l - linux
 x - macosx
 c - cdrom

If you wait a few seconds, linux is automatically selected and you boot into Ubuntu. Fortunately, it is possible to change which OS is automatically selected. If you are using the computer in a multi-user environment and the other users prefer Mac OS X you can (easily) configure yaboot to automatically load Mac OS X or OS 9 instead of Ubuntu.

To configure yaboot you will have to be at a command line in Ubuntu. From Ubuntu's graphical environment (GNOME) select Terminal from the menu Applications:System Tools, or use a non-graphical command line that you can activate with the keypress, control-alt-F1.

Note: If you use ctrl-alt-F1 (or any of the F1-F6 terminals) you can return to the graphical GNOME interface by pressing ctrl-alt-F7. If you really get stuck you can type sudo reboot to cleanly restart the computer.

You can use pico or nano to edit the yaboot.conf file found in the /etc directory. They are simple and easy-to-use non-graphical text editors.

Type:

sudo pico /etc/yaboot.conf

Note: sudo is short for 'super-user do' or 'substitute-user do' and allows you to modify anything.

You will be prompted for your password. Enter it. Note: you must also have "administrator" priviledges to be able to do this. You will have these if you are using the same account that you created when you installed Ubuntu.

Scroll down to the line that looks like:

macosx=/dev/hdxn

Where x is a letter (usually a, b, c or s) and n is a number, likely between 9 and 12.

If you don't have a macosx section, you'll need to know which partition your OSX is on. To find out, open a terminal and run "sudo mac-fdisk -l". Look which partition has a line like this:
/dev/hda3 Apple_HFS Apple_HFS_Untitled_2 20709376 @ 262208   (  9.9G)  HFS
Obivously, the number of gigs, and the block numbers may be different, but this is your Mac OSX partition. In this case OSX is on /dev/hda3 so you'll need to add a line "macosx=/dev/hda3" to your yaboot.conf. It can be at the begining or end of the file.

After it, insert another line that reads:

defaultos=macosx

Press ctrl-x to exit pico and follow the on-screen instructions to save your modifications.

Changing how yaboot chooses the default OS

You must now make these changes permanent by running the ybin application from Ubuntu.

At the command line run the following command:

sudo ybin -v

If prompted for a password, enter it. Your bootloader should now be configured according to your wishes and is ready for action. Restart your computer and wait briefly (<30 seconds). If Mac OS (X) boots, then you did things right. If it doesn't, chances are you'll boot into Ubuntu anyway.

If things don't work the way you think they should, don't panic. You should still be able to get to Mac OS 9 or X by holding down the option (alt) key when you restart your computer. This trick will only work on G4s, G5s and on the [PowerBook G4 1.5 MHz 17] G3 "2000" ("Pismo", "[FireWire - IEEE 1394 - iLink]"), slot-loading iMacs and newer G3 iBooks.

I glossed over a few concepts (e.g. yaboot itself doesn't do all of the stuff I ascribed to it) and I am no expert on configuring GNU/Linux so I suggest that your also read the man pages for the relevant applications and configuration files.

At the command line type the following to learn more:

man yaboot.conf
man yaboot
man ybin

You lost the yaboot menu! Now what?

You used to see the yaboot menu whenever you turned on your computer and now all it wants to do is boot into Mac OS? This (probably) happened because you set a Mac OS partition as the startup disk using Startup Disk.

If all you want to do is access files on your Linux partition and not run the Linux OS, I suggest you check out the Ext2FS Mac OS X tool at http://sourceforge.net/projects/ext2fsx/.

If your yaboot menu partition exists before all other bootable partitions (Mac OS, Mac OS X, *BSD, etc.) all you have to do is reset the PRAM by holding down the following keys while you restart the computer: command-option-P-R. Make sure you keep holding them until your computer restarts again (<15 seconds)! Your computer will now boot into the yaboot menu again.

If Ubuntu is NOT on your FIRST partition, hold down Option (alt) at boot and choose to boot from your ubuntu partition. Once you are logged in run

sudo ybin

from a terminal.

For details see http://www.yellowdoglinux.com/support/solutions/ydl_general/boot_functions.shtml.

Remember: If you use the "Startup Disk" control panel (Mac OS 9) or preferences pane (Mac OS X) you will disable the yaboot boot process and will not be able to use your Linux partition until you "reactivate" the yaboot boot process.

Please feel free to modify this Wiki to fix any errors, improve it, etc.

Sincerely, Eric Dunbar.

CategoryDocumentation CategoryCleanup