Subject: Success dual-booting OS X and yaboot
From: Randall Perry (rgp@systame.com)
Date: Mon Apr 16 2001 - 17:10:23 MDT
Tore my hair out for 4 hours trying to figure out yaboot, searching through
this list and other sources. Finally got it working, so I thought I'd share
what I learned.
1st, as was mentioned previously on this list, here's a good place to get
yaboot, yaboot.conf, and the dual-booting script os-chooser, along with an
explanation of how they work:
ftp://ftp.suse.com/pub/suse/ppc/update/BETA/bootonly.hqx
__1) find out which partition # on your drive has linux root, then find
another partition # (HFS or HFS+) to put yaboot (your choice)
__2) place these files on the HFS (or HFS+) partition you chose (see below
for how to create yaboot.conf and os-chooser):
yaboot
yaboot.conf
os-chooser
vmlinux (your current linux kernel, if you want the ability to boot it
off an HFS partition, though it's not necessary as you can boot a kernel
directly from the linux root partition)
__3) Here's my yaboot.conf file:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
default = vmlinux
timeout = 100
# to install from a CD
image = vmlinux
label = install
append = "video=ofonly load_ramdisk=1 fake_initrd"
initrd = ramdisk.image.gz
root = /dev/fd0
# kernel on mac partition
image = hd:9,vmlinux
label = vmlinux
append = "video=aty128fb"
root = /dev/hda10
# your own kernel on the linux side
image = hd:10,/boot/vmlinux
label = boot
append = "video=aty128fb"
root = /dev/hda10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
there are three configurations here, denoted by their 'label = ' line
1 install
2 vmlinux
3 boot
To choose one of these configurations as the default assign their label to
the 'default = ' line. i.e. 'defualt = install'
The first config, install, will work with the YDL install CD. The other two
were customized for my system.
the 'vmlinux' config will boot the kernel 'vmlinux' from my hard drive
partition 9 (with the kernel in the root of the partition):
image = hd:9,vmlinux
substitute your own HFS partition number for the '9'
The 'boot' config (my default) boots the kernel directly off the linux root
partition:
image = hd:10,/boot/vmlinux
substitute your own linux root partition # for the '10'
The 'timeout = ' option above sets the delay before the default config
loads.
According to docs I've read, we're supposed to use 'ultraxxx' (xxx being the
partition #) preceding the partition #, i.e. 'ultra0:9' to denote the 9th
partition of the master IDE drive. 'ultra1:9' would be the 9th partition of
slave IDE drive.
But, ultraxxx didn't work for me. I've used 'hd:xxx' , which I'd seen in
other posts.
NOTE: one thing I don't know how to do with the 'hd:xxx' syntax is boot from
a slave. If someone would like to fill in that gap...
Once in yaboot you can type a configuration label other than the default to
boot that configuration.
__4) Here's my os-chooser dual-boot script:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<CHRP-BOOT>
<COMPATIBLE>
iMac,1 PowerMac1,1 PowerBook1,1 PowerMac2,1 PowerMac3,1 PowerBook2,1
</COMPATIBLE>
<DESCRIPTION>
Linux/PPC Yaboot bootloader
</DESCRIPTION>
<BOOT-SCRIPT>
" get-key-map" " keyboard" open-dev $call-method
dup 20 dump
5 + c@ 08 = if
" Booting Yaboot ..." cr " boot hd:9,yaboot" eval
else
" Booting MacOS ..." cr " boot hd:9,\\:tbxi" eval
then
</BOOT-SCRIPT>
</CHRP-BOOT>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The key info is in the 'if...else...then' statement, specifically:
" Booting Yaboot ..." cr " boot hd:9,yaboot" eval
hd:9 is the drive and partition number, followed by a comma, and yaboot
substitute your own HFS partition number for the '9'
" Booting MacOS ..." cr " boot hd:9,\\:tbxi" eval
here hd:9 stands for the partition containing the mac system you want to
boot, whether it's OS 9, OS X, or another system. I'm assuming the tbxi is a
hidden file used to boot the system.
substitute your own HFS partition number for the '9' , choosing a partition
with a valid mac system folder
In the 'if' statement above, the line after the 'else' will boot by default
(MacOS), whereas the line after 'if' will boot if the space key is held down
(yaboot). To reverse this behavior, switch the lines.
__5) Boot into Open Firmware
Restart the mac holding Cmd-Opt-O-F. Type the following and press 'return':
setenv boot-device hd:9,os-chooser
substitute your partition # with the partition containing yaboot,
yaboot.conf, and os-chooser for the '9'
This tells your mac to us the 'os-chooser' script to boot from. If the file
is moved or deleted you won't be able to boot. Zap your PRAM to get default
boot settings back -- Cmd-Opt-P-R.
then type 'boot' and press return
Whatever you chose for your default os (the line after 'else') should boot.
On restart, the default will boot automatically, or the alternate OS will
boot by holding the spacebar.
Hope this gets people get through the process quicker than I got through it.
HAPPY YABOOTING
-- Randy Perry sysTame Mac Consulting/Sales
This archive was generated by hypermail 2a24 : Mon Apr 16 2001 - 17:14:36 MDT