image ResEx Logo
ResExcellence www : Powered by Google
Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets


Files are in Stuffit 5 or greater format.
Free download.

Tell us about a bad link.

Thank You!


Running 19 days
without a restart.

One Button Booting from Classic to MacOS X
Part II: Boot any OS from any partition
by Michael Coyle

Last week, you taught your Mac to look for instructions at boot time from a text file on the hard disk, then based on which key was held down the computer booted MacOS 9 or MacOS X.

In today's updated tutorial, you will learn how to pick any OS (even Linux) from any partition on the internal hard disk by holding a key.

Let's start by looking at the expanded Bootinfo.txt file listed below. Several more options have been added:

<CHRP-BOOT>
<COMPATIBLE>MacRISC</COMPATIBLE>
<BOOT-SCRIPT>
" get-key-map" " keyboard" open-dev $call-method
dup dup dup dup 20 dump

1 + c@ 01 = if
" Booting Linux ....." cr " boot hd:11,\\yaboot" eval
else

3 + c@ 10 = if
" Booting MacOS X .." cr " boot hd:9,\System\Library\CoreServices\:tbxi" eval
else

0 + c@ 02 = if
" Boot from CD......." cr " boot cd:,\\:tbxi" eval
else

2 + c@ 02 = if
" MacOS from part. 2." cr " boot hd:10,\\:tbxi" eval
else

" MacOS from part. 1." cr " boot hd:9,\\:tbxi" eval

then
then
then
then
</BOOT-SCRIPT>
</CHRP-BOOT>

There are now 5 startup options:

  • Hold the 'L' key to boot Linux from partition 11
  • Hold the 'X' key to boot MacOS X from partion 9
  • Hold 'C' to boot from a CD (Linux, Classic, or MacOS X!)
  • Hold 'S' to boot my second MacOS 9 system on partition 10
  • Not holding a key boots my default MacOS 9 system from partition 9

You can add as many options as you like, but each if.. else series must be accompanied by an additional dup (line 5) and a then near the end.

If you want your default OS to be MacOS X, just make sure it's the last line. Think of the Bootinfo.txt file as a bunch of Lego blocks. You can move them around and change the order as long as you stick to the general format:

dup dup dup <--- a dup for each if else

if this key is pressed
then boot from this partition
or else...

if this key is pressed
then boot from this partition
or else...

if this key is pressed
then boot from this partition
or else...

Finally, if no key is pressed boot this partition.

then
then
then <---- same number of thens as dups listed above.



So how do you find the key codes? Look at the letter 'X'. It's code is 3 + c@ 10. Use the table below to find the other letters.

A=0 + c@ 08 J=1 + c@ 04 S=2 + c@ 02
B=0 + c@ 04 K=1 + c@ 02 T=2 + c@ 01
C=0 + c@ 02 L=1 + c@ 01 U=3 + c@ 80
D=0 + c@ 01 M=2 + c@ 80 V=3 + c@ 40
E=1 + c@ 80 N=2 + c@ 40 W=3 + c@ 20
F=1 + c@ 40 O=2 + c@ 20 X=3 + c@ 10
G=1 + c@ 20 P=2 + c@ 10 Y=3 + c@ 08
H=1 + c@ 10 Q=2 + c@ 08 Z=3 + c@ 04
I=1 + c@ 08 R=2 + c@ 04 space=5 + c@ 08

Caveats: Currently, I cannot find a way to boot from another hard disk. I have also totally glossed over how this ties-in with PPC/Linux, so I recommend Linux users read these iMacLinux and PenguinPPC.org articles.


George Krueger, well know for his iTunes skins, writes with the following request: "I was just reading through your two articles on boot scripts. My question is, could you do this so that it prompts you to choose? It would be nice to have it come up and prompt you 'Press X for OSX or 9 for Classic', or something like that. Then other people wouldn't have to know what your special boot keys are."

Well, I have a solution courtesy of SuSE Linux 7.3. This script you can download is more complex than what is covered in the tutorial, and I must admit that I do not understand exactly everything that takes place in it, but if you have successfully completed the previous tutorial, it should be possible for you to modify the more complex script to suit your needs.

Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets

Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement. [an error occurred while processing this directive]