Hey Everyone, I wanted to add to this.
Recently I messed up my OS9 boot and my ibook wasnt booting. It took me a couple of weeks to figure out how to add this script on the nvram in open firmware, because I didnt have any access to any OS. Here is what I did. (All of the commands I am going to post below are in Open Firmware)
In open firmware there is a variable called nvramrc
, this var contains the contents (in open firmware language) of the script shared above. This is the script that patches your ibook G4 to make it bootable.
First thing to check is if you have the var set up in open firmware (if you dont, dont worry, I will explain how to adapt the bash script above to make it work) To do so type:
printenv nvramrc
That should print you something like
------- Partition: common ------ Signature 0x70 -------
nvramrc Defined: use NVEDIT related words to view
ok
if you see the Defined: use NVEDIT....
that means that you have the nvramrc variable set and defined that's good!. if on the contrary you only see ok
and nothing else you dont have the nvramrc var set up.
to set the var you type nvedit
and press enter
Now you type this line by line pressing enter at the end
" /" select-dev
" PowerBook4,3" encode-string " model" property
" PowerBook4,3" encode-string " MacRISC" encode-string encode+ " MacRISC2" encode-string encode+ " MacRISC3" encode-string encode+ " Power Macintosh" encode-string encode+ " compatible" property
00000000 " graphic-options" get-my-property 2drop !
unselect
" /cpus/PowerPC,G4@0" find-package if drop " /cpus/PowerPC,G4@0" find-device 80010201 encode-int " cpu-version" property then
device-end \ PLX-OS9-PATCH
you can move with the arrows up/down across lines in case you made a mistake, after finished press Ctrl + c
to get out of the editor back to Open firmware and then type nvstore
to save what you wrote into the contents of nvramrc.
Just to make sure that you have that var set up; type again printenv nvramrc
and check that you can see that is defined, even restart the machine and when you get back to Open firmware (OF) type printenv nvramrc
just to make sure that the var is there; and make sure the contents are correct with nvedit
Subsequently; if everything is set up correctly; type mac-boot
If you have issues, dont dispair, you got this!; I also tried load nvramrc
and helped myself out back and forth with chatgpt; so you can ask it the output you are getting in OF and it will help you; ChatGPT was quite quite helpful for me (along this page and several others) to get my mac OS 9 on my ibook G4 back and running.
Hopefully this will help someone who is in the same situation that I am and get you back to your OS9 booting again :)