Here's the best I can do. Please
be careful -- I'm giving directions that require playing with dangerous tools.
Also, my OS X box, which I'm using remotely seems to have crashed or something so I can't check these instructions to make sure they're exactly right...
In order to make these scripts, you have to have a working "system disk" preference pane in OS X. I know, sort of a chicken and egg thing. Anyhow, Speedy, I'm a bit worried about the fact that you can't authorize yourself in the System Disk pane. It is strange indeed that you can login but not authorize with the little lock button... will "root" and the password authorize? How about making a new user with admin priviledges? (Of course, that requires authorizing in the Multiple Users app... does it not work in any pane/application, or just in the System Disk? Is caps lock on?)
OK, once you get that straightened out, here goes the "recipe:"
Caveat This could quite possibly break something. Especially since I don't have an OS X machine in front of me to check my work. You should be comfortable with the terminal, and OS X, and the prospect of reinstalling it if this goes wrong. Your disk should be backed up. Also, if you are unfamiliar with any command, type
man command (where "command" is replaced with the command you want to learn about).
Note that the command "nvram" may not be in your path. If typing
nvram -help into the terminal doesn't spew out a list of options and instead returns "command not found" you'll have to type "/usr/sbin/nvram" every time I tell you to type "nvram" -- sorry, but I'm working from memory here.
Also, you might need root priviledges to even run nvram, so if the terminal says something to that effect, you'll have to type "sudo nvram" or "sudo /usr/bin/nvram" and then enter the root password whenever you want to run nvram.
Without further ado:
1) Set the system to reboot into OS X in the System Disk prefs panel.
2) Open the terminal.
3) Type
nvram -p > osXboot.nvram
(This runs the command "nvram -p" which prints out the contents of the nvram, where the boot variables are stored. The command then redirects the output from the screen into the file osXboot.nvram. The file name is unimportant.)
4) Set the system to reboot into OS 9.
5) Type
nvram -p > os9boot.nvram in the terminal.
6) Type
diff osXboot.nvram os9boot.nvram
(This compares the differences between two files. If differences are found, then it prints the line number that the difference was found on, and if it was a change or a deletion, etc. Then it prints "<" and the changed line from the
first file. Then you get three dashes. Then it prints ">" and the changed line in the
second file. Check the man pages on diff if this is unclear.)
So you should get an output like:
Code:
22c22
< boot-device /pci@f2000000/pci-bridge@d/mac-io@7/ata-4@1f000/@0:10,\\:tbxi
---
> boot-device /pci@f2000000/pci-bridge@D/mac-io@7/ata-4@1f000/@0:9,\\:tbxi
This is telling you that the nvram variable "boot-device" is different for booting into X and 9. The confusing garble afterward is what makes it boot into X (top line) or 9 (bottom line).
The output looks like this if you are on a B&W G3 or later. A beige G3 and maybe some early iMacs will spit out something totally different. Don't worry. It's still correct.
There may be additional changes, too, if you need to boot off a different partition or disk. If there are, you need to take them into account, too.
7) OK, still with me? Now, open up a new terminal window and type
pico 9boot.command -- this opens an easy text editor and makes a new file called "9boot.command". You could do it in text edit, but I'm not sure if it saves with UNIX hard returns correct. Pico does.
8) OK, now we're editing our script -- basically a text file with shell commands that gets run whenever you run it from the terminal, or (if its name ends with ".command") when you double-click it from the finder.
Now, type
sudo nvram boot-var="contents" into pico, where "boot-var" was the changed variable and "contents" is the contents of that variable that the
bottom line of the diff output gives. (Bottom line = second file = os 9 booting nvram).
You may not need to quotation marks if there are no spaces in the boot variable's contents. Also, if you need to change multiple variables, you might be able to do this like
sudo nvram boot-var1="contents1" boot-var2="contents2", or you might need to do it on separate lines. I can't remember -- you'll have to experiment.
9) If you want the script to automatically restart (not recommended until you get it debugged) you need to include the line
sudo shutdown -r now at the end.
Note that each time the script calls the sudo command, you have to type the root password,
unless you edit the file /etc/sudoers (I think?) and add your username. Then you just have to type it once, I think...
10) Now, type control-O to save the file. (here on out, control is abbreviated as ^, to go along with UNIX convention). Press return if you need to confirm the name. Type ^-X to exit.
11) Now, the system does not think that the script is an executable! To make it so, type
chmod +ax 9boot.command. "chmod" changes the file data so that "a"ll users are given (hence the "+") the e"x"ecute priviledge on the file.
12) To run the script, type
./9boot.command into the terminal (from the directory in which the file is saved). You need to include the "./" so that the system knows to look for the command in the current directory (known as "."). Or you can double-click it from the finder.
IMPORTANT DEBUG TIPS
1) Repeat this and make a script to reset the boot-vars back to the OS X state. This may be helpful.
2) Reset the boot system to OS X from the preferences panel. Now, try running the 9boot script (without the restart option!) and then dump the nvram contents into a different file. (ie:
nvram -p > 9script.nvram Use diff to compare the 9script.nvram file with the 9boot.nvram file, which we know to be accurate. If there are any differences, you're in trouble! Do the same for the X boot script.
If your system becomes farked after this, here's what to do:
1) Restart with the OS 9 CD.
2) Restart holding command-option-P-R and let the machine chime a couple of times before letting go.
Thus concludes the recipe.
Note well: This may lead to a damaged or unbootable (though not unfixable) system. My instructions may contain errors. They probably do. I'm working from memory. So don't do this until you feel comfortable with every command listed here. DO NOT follow these instructions without understanding what they do! There are many OS X UNIX FAQ's to get you up to speed on all of the cryptic garbage I've thrown at you.
Also, there's probably ways to do most of this in Aqua and not the terminal. Sorry.
Zach