Recovering from a Blinking "?"

* Prelude to a "?" on startup

How did we get here? You are staring at a gray screen with a floppy disk and a blinking question mark. You try restarting, zapping the PRAM, holding down the option key, but nothing seems to work. Alas, in the past you've booted from a Mac OS 9 CD and simply set the startup disk to solve this problem. In desperation you try this, but the hard drive doesn't even mount on the desktop! What's going on?!

Here is the scenario. In your desire to forget altogether that Mac OS 9 ever even happened, you decided to not "Install Mac OS 9 drivers" when you formatted the disk. As such, you can still use Classic for the Apple Printer Utility and what not, but you cannot boot into OS 9 from any partition on this disk. And now, you are faced with the misery that results from doing whatever you did to set the computer to start from a Mac OS 9 System Folder the last time your computer was actually working.

* The fix

So, how does one fix such a problem? First of all, remember that you can always boot your system into target disk mode and connect it to another Mac to retrieve your home directory (assuming you have 1) another Mac and 2) firewire) if you fear data loss.

The first thing to try is to hold down the "X" key on startup.  If that doesn't work, continue reading.

Zapping the PRAM probably won't fix it because only the partition and disk number of the startup disk is stored in the PRAM. The computer boots whatever blessed system it finds on that volume. Check this out:

boot-device mac-io/ata-4@1f000/@0:2,\\:tbxi

That is the nvram startup-disk setting for my laptop (non-volatile RAM holds open firmware settings). The only thing that changes when you choose a different startup disk is the "0:2" (which means partition 2 on disk 0). If you simply change the System used, but not the disk (e.g., you choose to boot from Mac OS 9.2.2 on "Macintosh HD" as opposed to Mac OS 10.2.2 on "Macintosh HD"), none of the nvram settings change. Why? The "\\:tbxi" is a shortcut for "whatever the boot file is on this volume".

So the trick is to figure out how to change the setting on a particular disk/partition that makes it boot into 9 or X. We can do this at the Open Firmware prompt by explicitly specifying the boot file, overriding whatever the default OS 9 boot file is.

This is FUN! Mac OS X brought a command line to our Desktop, but we always had the "security blanket" of the GUI. Bah! If you want to grow some hair, you'd throw some commands at the OF prompt! OK, here is your security blanket: all of the OF settings can be reset to their defaults, so *you can't screw anything up too bad* (I'm still not responsible if you do, though, this is at your own risk).

First I would read this great page about the Mac's open firmware. When you are done reading the grueling details, read this page too.

Now that you know how open firmware works and how to interface with it, do this:

  1. Boot into Open Firmware (OF) by holding down the Command+Option+O+F keys during startup.
  2. Type "printenv" at the prompt
  3. look for the boot-device setting. Write this down. Be accurate, the command line is unforgiving.
  4. Type the following, assuming "mac-io/ata-4@1f000/@0:2,\\:tbxi" is your current setting:

    setenv boot-device mac-io/ata-4@1f000/@0:2,\System\Library\CoreServices\BootX

    then hit return. The only thing I changed was the "\\:tbxi" at the end, everything else stays the same. Also note that these are backslashes, not forward slashes!

  5. Type "mac-boot"
  6. Rejoice, because you're booting into X. Hopefully everyone gets to this step.
  7. Now GO TO THE STARTUP DISK PREF PANE AND SET YOUR STARTUP DISK. You'll notice that it is still set to the OS 9 System Folder. That's because the GUI isn't designed to understand how we've tricked it. Just set the startup disk to your X disk. If you typed "nvram -p" in the Terminal before/after setting the startup disk, you'd see that it removes the \System\Lib... stuff and replaces it with \\:tbxi.

* Using the bless command properly

When you use the bless command, it can "steal" the bless of one system to give to the other (that's the easy way to think of it). To get two systems blessed simultaneously, you should bless them in one command. For example:

System + System Folder:

sudo bless -folder9 /Volumes/diskname/'System Folder' -bootBlocks -folder /Volumes/diskname/System/Library/CoreServices -bootinfo /usr/standalone/ppc/bootx.bootinfo -label "diskname"

System only

bless -folder /Volumes/diskname/System/Library/CoreServices -bootinfo /usr/standalone/ppc/bootx.bootinfo -label "diskname"

System Folder only:

bless -folder9 /Volumes/diskname/'System Folder' -label "diskname" -bootBlocks

Two notes:

  1. Each of these commands should go on one line (no line breaks)
  2. "/Volumes/diskname/" should be just "/" if you are blessing your bootdisk.

Just leave the -setOF flag alone!!! Its only purpose is to set that volume as the startup disk, which you can do much more safely in the Startup Disk Pref Pane. Also note that the -bootBlocks option is not required for Classic, only if you plan to boot into OS 9 from the System Folder that you are blessing. Keep in mind that it sets the startup disk to that System Folder, and can land you right back in this mess if you use it improperly. To be safe, just leave that part off.

footer shadow