Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
The first post of this thread is a WikiPost and can be edited by anyone with the appropiate permissions. Your edits will be public.

z970

macrumors 68040
Original poster
Jun 2, 2017
3,592
4,547
Figured I'd start another public resource initiative to encourage greater fluency with the underpinnings of a PowerPC computer, so that there isn't so much struggle and confusion just to boot an operating system (namely USB disks), check attached devices and resources, or perhaps even run system diagnostics. I'll be adding to this over time, otherwise anyone else interested is encouraged to add as they please in the meantime, provided all added info is relevant, useful, simple to understand, and cleanly organized. :)

Any and all help is highly encouraged, very excellent, and greatly appreciated. Thank you.

-


Open Firmware is a boot environment developed using the Forth programming language. Open Firmware exists to provide a machine independent means of loading operating systems, from a variety of boot devices. Open Firmware probes the PCI bus for devices and possible Open Firmware device drivers for those devices. These drivers can either be integrated into the Open Firmware or provided on an external device, thus providing plug and play capabilities for new boot devices. Open Firmware is then capable of using these drivers to load an operating system from the device.

Apple's Open Firmware is part of their ROM-in-RAM design approach originally used in the first iMac systems. The approach uses a small ROM that contains sufficient code to initialize the hardware and load an operating system. The rest of the system code, that on previous Mac systems (old world) resided on a physical ROM (chip) is now loaded from disk or from network into RAM. Open Firmware is part of this "New World" boot system.

On the latest revision of Apple systems Open Firmware provides a variety of functions. One of the key functions of Open Firmware is to configure the UniNorth and Keylargo ICs, to construct a device tree, probe devices, include any device drivers and finally select a boot device.

-

The boot process starts with the PowerPC processor executing its reset vector as specified by the Hardware Initialization code. The boot ROM stored in NVRAM provides power on self test (POST - diagnostics), and initializes enough of the system to load Open Firmware. These POST tests are run in native PowerPC code and involve checksum testing, memory testing, detection of the manufacturing test pin and test manager support. With the new family of iMac systems, additional pre-firmware diagnostics are performed due to the addition of the UniNorth and KeyLargo ICs. When enough initialization has occurred to execute Open Firmware, the boot chime is played and Open Firmware is loaded.

Open Firmware will then probe the system's I/O buses to determine the device configuration and build a device tree, which describes the hardware it has located. The system will then examine the values of its environment variables. If the auto-boot? variable is flagged as true, the system will then read the value contained within the boot-device variable and attempt to boot from that device. If additional information is required the boot-file variable is read. If the auto-boot? variable is flagged as false, the system will halt the boot process and drop to the Open Firmware user interface.

The default boot device on Apple systems is "hd:,\\:tbxi". The system will automatically convert "hd" into the appropriate device path, as hd is simply an alias. The notation "" tells the system to start searching for "blessed" folders (directories) starting on the first HFS or HFS+ partition found on the system. The final part, "tbxi", tells the system to look for files of type tbxi. All versions of MacOS have a folder known as System Folder that is "blessed", and contains a MacOS Boot ROM file which is of type tbxi. The Boot ROM file is simply a stripped ELF executable image wrapped with a forth boot script. A "blessed" folder is simply one with a special attribute (or flag) set on it. The system will search all HFS partitions for a blessed folder and a file of type tbxi within it, if none are located, the boot will fail. The system will always select the first one found, unless the boot-device is modified to a specific partition id.


Source: http://macos9lives.com/smforum/index.php?topic=1965.0


Open Firmware Version History



? - Power Macintosh 7500 ("Power Macintosh", "AAPL,7500", "28f1")
1.0.5 - Power Macintosh 9500 ("Power Macintosh", "AAPL,9500", "Open Firmware, 1.0.5")
1.0.5 - Power Macintosh 8600 ("Power Macintosh", "AAPL,8500", "Open Firmware, 1.0.5")

2.0 - Power Macintosh 5400 ("Power Macintosh", "AAPL,Hooper", "Open Firmware, 2.0")
2.0f1 - Power Macintosh G3 Beige ("Power Macintosh", "AAPL,e407", "Open Firmware, 2.0f1")
2.0.1 - PowerBook ? ("PowerBook", "AAPL,PowerBook1998", "Open Firmware, 2.0.1")

3.1.0 - Power Macintosh G3 (B&W) ("Apple PowerMac1,1 1.0f5 BootROM built on 02/15/99 at 18:06:39", "OpenFirmware 3.1.0")
3.1.1 - Power Macintosh G3 (B&W) ("Apple PowerMac1,1 1.1f4 BootROM built on 04/09/99 at 13:57:32", "OpenFirmware 3.1.1")

3 - Power Macintosh G4 (AGP) ("Apple PowerMac3,1 1.3f1 BootROM built on 10/28/99 at 18:10:16", "OpenFirmware 3")
3 - PowerBook G3 (Pizmo) ("Apple PowerBook3,1 2.1f1 BootROM built on 01/29/00 at 22:38:07", "OpenFirmware 3")
3 - iMac G3 350 ("Apple PowerMac2,1 4.1.9f1 BootROM built on 09/14/01 at 13:18:04", "OpenFirmware 3")
3 - iBook G3 ("Apple PowerBook4,1 4.2.7f1 BootROM built on 09/12/01 at 17:47:15", "OpenFirmware 3")
3 - Power Macintosh G4 733 (Digital Audio) ("Apple PowerMac3,4 4.2.8f1 BootROM built on 10/11/01 at 14:12:47", "OpenFirmware 3")
3 - Power Macintosh G4 (MDD) ("Apple PowerMac3,6 4.4.8f2 BootROM built on 09/30/02 at 10:24:31", "OpenFirmware 3")
3 - PowerBook G4 (FW800 - Al) ("Apple PowerBook5,2 4.7.1f1 BootROM built on 09/04/03 at 13:39:26", "OpenFirmware 3")
3 - PowerBook G4 1.33 17" (Al) ("Apple PowerBook5,3 4.7.1f1 BootROM built on 09/04/03 at 13:39:26", "OpenFirmware 3")
3 - iMac G4 1.25 17" "FP" (USB 2.0) ("Apple PowerMac6,3 4.7.8f1 BootROM built on 11/05/03 at 07:54:33", "OpenFirmware 3")
3 - PowerBook G4 1.33 12" (Al) ("Apple PowerBook6,4 4.8.3f1 BootROM built on 04/01/04 at 16:52:06", "OpenFirmware 3")
3 - PowerBook G4 1.67 15" (Al) ("Apple PowerBook5,6 4.9.1f1 BootROM built on 01/21/05 at 10:51:16", "OpenFirmware 3")

4 - Power Macintosh G5 (PCI or PCI-X) ("Apple PowerMac7,2 5.1.5f1 BootROM built on 08/25/04 at 10:43:05", "OpenFirmware 4")
4 - Power Macintosh G5 (Quad Core) ("Apple PowerMac11,2 5.2.7f1 BootROM built on 09/30/05 at 15:31:03", "OpenFirmware 4")


The following are BootROM versions:

4.1.8 - Power Macintosh G4 (Digital Audio, January 2001)
4.2.0 - iBook G3 (Dual USB, May 2001)
4.4.8 - Power Macintosh G4 (Mirror Drive Doors, June 2003)
4.6.2 - PowerBook G4 (February 2003)
4.8.6 - PowerBook G4 (April 2004)
4.8.9 - Mac Mini G4 (January 2005)
4.9.0 - PowerBook G4 12" (January 2005)
4.9.1 - PowerBook G4 (January 2005)
4.9.3 - iBook G4 (July 2005)
5.1.5 - Power Macintosh G5 (Omega, June 2003)
5.2.7 - Power Macintosh G5 (Cypher, October 2005)


Versions 4.9 and 5.2 Feature Set: 'UD' Device Aliasing, Boot Picker Arrow Key Support ...


Accessing Open Firmware


Method I: At the chime, hold down the Option key. The Boot Picker comes up. Press Control + Z to switch to Open Firmware.

Method II: At the chime, hold down Command + Option + O + F until you've arrived at the Open Firmware prompt.



Running System Diagnostics


o To reset the system NVRAM, enter reset-nvram

o To reset all changes made to Open Firmware, enter set-defaults

o To reset the machine, enter reset-all

o To display a list of all central device aliases, enter devalias

o To display information for a device, enter dev <device alias> .properties


( i.e. dev /cpus .properties | dev screen .properties | dev /memory .properties etc. )

( Note: The capacity values output by dev /memory .properties are saved in the hexadecimal format and will need to be converted to be understood by most. )

o To display a list of all utilities, enter printenv

( WARNING, DO NOT RUN setenv little-endian? true ! This will brick your machine beyond trivial repair! )

o To check the system hard disk and its partitions without extracting it from the machine, enter target-mode into the prompt. Target Disk Mode comes up. Connect a FireWire cable from the subject machine to another compatible machine. The subject machine's partitions will appear on the other machine, ready for review or remote boot.


Booting an Operating System


o To automatically enter Open Firmware upon boot, enter setenv auto-boot? false

( Enter setenv auto-boot? true to revert to default. )

o To set a default boot volume, enter setenv boot-device <volume>:<partition ID>,<path>

( i.e. setenv boot-device hd:1,\\:tbxi | setenv boot-device cd:,\\yaboot | setenv boot-device ud:,ofwboot | etc. )

( If no partition ID is provided, the system will look for the first available OS on the specified volume. If none are found, the system will either revert back to Open Firmware, or display a "do not cross" symbol. )


o To boot between locally installed operating systems, enter multi-boot into the prompt. The Boot Picker comes up.

Note: The utility's interface and control methods may vary between versions.

o To boot from a USB disk, enter one of the following depending on the targeted OS (OF V. 4.9 / 5.2 Only) -

Mac OS X: boot ud:,\\:tbxi

Linux: boot ud:,\\yaboot

Linux (GRUB): boot ud:,\\grub.img

OpenBSD: boot ud:,ofwboot


o To boot from a USB disk on OF V. 4.8 / 5.1 and lower, replace 'ud:,' with 'usb0/disk@1:'. Increase the digit immediately following 'usb' incrementally until successful. Alternatively, also increase the digit immediately following 'disk@' until successful, depending on the OS chosen.

If you are unable to boot Mac OS X using the provided methods, try replacing ':tbxi' with ':3,\System\Library\CoreServices\BootX'.

Alternatively, one user reports consistent success using a USB hub.


Tricks


• To initialize The Boot Picker faster, enter setenv skip-netboot? true. This will disable scanning for a bootable network OS. To turn NetBoot back on, enter setenv skip-netboot? false.

• To set up a personalized welcome message for Open Firmware to repeat upon activation, enter setenv oem-banner < enter a custom message here > , and setenv oem-banner? true .

• To spoof machine model - replacing "PowerMac3,5" with the suitable model name for your needs. Note the use of spaces after opening quotation marks is required.
Code:
dev /
.properties
" PowerMac3,5" encode-string " model" property
" PowerMac3,5" encode-string " MacRISC" encode-string encode+ " MacRISC2" encode-string encode+ " Power Macintosh" encode-string encode+ " compatible" property
mac-boot


Actions


mac-boot: boots either the specified default or first available operating system environment

shut-down: saves all changes and turns off the machine

eject cd: ejects the disc tray or loaded optical disc


-


[ Additional Resources ]


Resource 1:
http://web.archive.org/web/20200529...ook/bonus/ancient/whatismacosx/arch_boot.html

Resource 2: http://www.firmworks.com/QuickRef.html


To-Do For Volunteers:

I,
Integrate collected (+ actively verified) information from gathered resources into locally embedded format.

II, Discover and document obscure, powerful, and highly useful capabilities of OF to be utilized by the end user.


-

This is a public Wiki -
Please contribute if you know something about Open Firmware that can make people's lives easier.
Thank you.
 
Last edited:
A few tips you can add, if the don't know already:

 
  • Like
Reactions: z970
I'd just like to chime in here really quick. iBooks / Powerbooks manufactured before 2005 will not assign the devalias 'ud' to a bootable flash disk. Machines manufactured prior to 2005 will boot a Yaboot boot loader Linux image with
Code:
boot usb0/disk@1:,\\yaboot
or
Code:
boot usb1/disk@1:,\\yaboot

And even then, I've had 0 success booting 2003, and 2004 model iBook G4's from USB. I've tested most iBook G3 models, barring a couple, and they all worked just fine booting Linux images. The Powerbook A1104, and A1138 will boot a Linux image from USB just fine, but the A1095 fails. This is what I've found, as the owner of roughly 35 of these machines. Support for booting from anything other than an ATA, or Firewire device on these machines is spotty, to say the least.
 
Last edited:
And even then, I've had 0 success booting 2003, and 2004 model iBook G4's from USB.

Can you confirm both the selected USB disk and flash were good and / or known compatible?

Was the lack of ud specific to the laptops or did this extend to all machines?
 
Can you confirm both the selected USB disk and flash were good and / or known compatible?
I've tried the same dd write method on 5 different USB flash drives, and got the same result every time. If someone else could confirm my findings, I'd really appreciate it.

My syntax for dd was
Code:
sudo dd if=/path/to/image.iso of=/path/to/flashdrive
I've tried WITH specifying block size, and without, and achieved the same result. Although, I will say, specifying block size
Code:
bs=4M
seems to yield the greatest write speed.
 
Last edited:
I've tried the same dd write method on 5 different USB flash drives, and got the same result every time.

What did OF keep spitting out each time?

It's not impossible that OF's support for certain USB flash drives could be spotty; not USB in general. Assuming that's the case (which I have reason to believe it is), a compatibility list of known good flash drives should be compiled and pinned right here.
 
What did OF keep spitting out each time?

It's not impossible that OF's support for certain USB flash drives could be spotty; not USB in general. Assuming that's the case (which I have reason to believe it is), a compatibility list of known good flash drives should be compiled and pinned right here.
Code:
can't OPEN usbx/disk@x:,\\yaboot
even though you can clearly see the USB device with
Code:
disk@1
in the tree. I suppose it's possible that it is a compatibility issue with certain flash drives, but I've personally never encountered such a thing. I'd appreciate it if someone with several different models of iBooks / Powerbooks could try this out, and report back with their findings.
 
Added Version History chapter. This will help organize features (like ud) that were only available in certain versions / models.

If anyone wants to add in the OF version number corresponding with their machine, that would be great. It can be found after "Apple <model identifier>", and before "BootROM built on".
 
  • Like
Reactions: RogerWilco6502
Added Version History chapter. This will help organize features (like ud) that were only available in certain versions / models.

If anyone wants to add in the OF version number corresponding with their machine, that would be great. It can be found after "Apple <model identifier>", and before "BootROM built on".
I'll be sure to add the versions for my Power Mac G4, Mini, and iBook when I can. :)
 
  • Like
Reactions: z970
i can confirm what @sparty411 mentions : i have never been able to boot from usb any of the iBooks i owned and the only g4 powerbook that has ALWAYS refused to boot from usb is my A1095.
The only ibooks i own are G3 clamshells and i´m not even sure if these things are supposed to be able to boot from usb ...
To create the boot drive i have used dd and macos disk utility.
In OF the drive was always clearly visible, the only difference is that once i hit enter i get no feedback or error or anything IIRC : the console just sits there with no output. Sometimes the led on the usb started flashing but even after leaving it there for a while nothing happened. I have also tried with different brands but that hasn´t made a difference.
It´s been quite a while since i last tried to boot the A1095, if you want me to test something please let me know.

Thanks for putting together this wiki post BTW, OF has always been something i wanted to explore more deeply.

Thanks
 
  • Like
Reactions: z970 and sparty411
Just added the version information about my machines. I'll say I haven't tried ud on any of them, but I can say that the G4 systems (Mac Mini G4 and Power Mac G4 DA) can boot from USB and the iBook G3 can't. I'll try ud on my systems that can boot USB soon.
 
  • Like
Reactions: z970
i can confirm what @sparty411 mentions : i have never been able to boot from usb any of the iBooks i owned and the only g4 powerbook that has ALWAYS refused to boot from usb is my A1095.
The only ibooks i own are G3 clamshells and i´m not even sure if these things are supposed to be able to boot from usb ...
To create the boot drive i have used dd and macos disk utility.
In OF the drive was always clearly visible, the only difference is that once i hit enter i get no feedback or error or anything IIRC : the console just sits there with no output. Sometimes the led on the usb started flashing but even after leaving it there for a while nothing happened. I have also tried with different brands but that hasn´t made a difference.
It´s been quite a while since i last tried to boot the A1095, if you want me to test something please let me know.

Thanks for putting together this wiki post BTW, OF has always been something i wanted to explore more deeply.

Thanks
Thanks, I knew I wasn't crazy lol.
 
Now we can start to paint a picture!

Interestingly enough, the Early '05 Mac Mini runs firmware older than hardware released two years prior. I wonder why that is?

It would also be great if people could check their versioning and confirm it matches with what's documented here. Just in case we don't start having PowerBooks on the "wrong" version.

I can also confirm that no matter what I did and how I flashed it, with whatever image I flashed, the '03 G5 would not boot from a promo 2 GB USB stick. However, I just DD an image in OS X to another one, a 1 GB Crucial stick, and suddenly the G5 has no problems at all, and could then see "disk@2" under usb@b.

I really feel like it's not so much some machines cannot boot from USB, so much as it is certain USB drive compatibility between different OF versions.
 
  • Like
Reactions: RogerWilco6502
Now we can start to paint a picture!

Interestingly enough, the Early '05 Mac Mini runs firmware older than hardware released two years prior. I wonder why that is?

It would also be great if people could check their versioning and confirm it matches with what's documented here. Just in case we don't start having PowerBooks on the "wrong" version.

I can also confirm that no matter what I did and how I flashed it, with whatever image I flashed, the '03 G5 would not boot from a promo 2 GB USB stick. However, I just DD an image in OS X to another one, a 1 GB Crucial stick, and suddenly the G5 has no problems at all, and could then see "disk@2" under usb@b.

I really feel like it's not so much some machines cannot boot from USB, so much as it is certain USB drive compatibility between different OF versions.
I wonder if it has anything to do with partition size, or overall disk size. Strange.
 
It might not be older, but because the G5 is PPC64 and the Mini G4 is PPC, they split the versioning? :)

A possibility. In which case, the G5 firmware could have more capabilities than the G4 firmware.

If this trend continues, we might have to reorganize things a little better. Or at least add a little more detail and clarification.
 
  • Like
Reactions: RogerWilco6502
I vaguely remember reading it in part has to do with whether the machine has dual-channel USB ports or not, but I'm not certain on that.
These machines are so temperamental and bizarre, that I always wind up throwing my hands in the air in frustration, and walking away from them for a few months at a time. Complete and utter nonsense. I have Socket A machines from 2002 that can boot from USB A-OK by just striking F12 at post, and selecting the drive I want to boot from. But Apple saw it necessary to implement some archaic, poorly documented firmware, that deviated from industry standards 100%. Typical.
 
  • Like
Reactions: RogerWilco6502
A possibility. In which case, the G5 firmware could have more capabilities than the G4 firmware.

If this trend continues, we might have to reorganize things a little better. Or at least add a little more detail and clarification.
Yeah, maybe differentiating between PPC and PPC64 machines to start out with?
These machines are so temperamental and bizarre, that I always wind up throwing my hands in the air in frustration, and walking away from them for a few months at a time. Complete and utter nonsense. I have Socket A machines from 2002 that can boot from USB A-OK by just striking F12 at post, and selecting the drive I want to boot from. But Apple saw it necessary to implement some archaic, poorly documented firmware, that deviated from industry standards 100%. Typical.
I actually quite enjoy working with OF. It's not the most intuitive, but I do enjoy working with it and I think it works well for what it's designed for. :)

Booting from USB is a headache though.
 
Yeah, maybe differentiating between PPC and PPC64 machines to start out with?

I actually quite enjoy working with OF. It's not the most intuitive, but I do enjoy working with it and I think it works well for what it's designed for. :)

Booting from USB is a headache though.
I would feel much differently about it if there was any official documentation available. Does such a thing exist?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.