I have a couple of Apple Power Mac G5 machines that I have deployed as servers: they're running GNU+Linux, connected to the world only via an ethernet cable.
When I need to restart these machines, they will hang at some early stage; eventually the fans will switch to full-speed and the noise will draw someone's attention and they will call on me. I then connect a monitor and keyboard, restart the machine, and it boots fine. Further diagnosis shows that the machine will not boot properly unless a keyboard and monitor are connected.
This has nothing to do with MacOS, since it's not on the machine any more. It also has nothing to do with GNU+Linux, since it hangs very early, before the point where the OS is involved. Is it a BIOS setting? (Update 2009-11-29: morgant's answer suggests that it could be a failure in the boot loader; I'll investigate this.)
How can I change it to boot correctly without monitor or keyboard?
As far as I know, they will fail when trying to boot up without a monitor connected, and there is no way to change that, in OpenFirmware or otherwise. The keyboard should be irrelevant.
Here is a post that describes a way to solder yourself a device that tricks the GPU into detecting a non-present monitor.
Another idea I never tried would be to see if it boots up when there is no gpu at all installed.
I have many G4, G5, and Intel Xserves, plus PowerMac G4s & G5s an Mac Pros that are run completely headless and boot and operate sans keyboard and/or monitor without issue, but they're all running Mac OS X or Mac OS X Server. I have a couple PCs and a couple Intel Macs running various Linux installs (unfortunately I don't recall which boot loader my coworker used, off the top of my head) and some of them do have issues booting without keyboards attached (monitors haven't usually seemed to make a difference, but one is an iMac). So, my guess would be that the issue is with either the EFI boot loader you're using or with the distro & version of Linux.
The accepted answer is wrong.
The behaviour you see has nothing to do with Open Firmware and everything to do with yaboot. By default a small script (the "l for Linux, c for CDROM" screen) will be booted (via the tbxi attribute) before yaboot. That scripts blocks if no monitor is connected.
The solution is pretty simple, edit the OF variable
boot-device
to not point to<somedevice>,\\:tbxi
but to<somedevice>,\\yaboot
instead. This can be done from Linux with the NVRAM commands (nvsetenv
) or on the OF shell withsetenv
.