IMac will not start up.Question mark in a box comes up.Also will not boot up from start up disc
The operating system on the hard drive is corrupted, or the hard drive is not available. The procedure for starting from the startup disk varies a bit depending on the model of iMac. On the oldest ones (CRT iMac) and some of the early display-on-a-dome models, hold down the "C" key while starting the computer. This will force the computer to bypass the hard drive and boot directly from the startup optical disk. (If the C key doesn't work, restart and follow the option key procedure in the next paragraph.)
On newer Macs, hold down the option key while pressing the power button until you see that the boot loader is running. You should see an icon for at least one drive on the screen, perhaps followed by another. One of these is for the optical drive. It may take several tens of seconds for the optical drive icon to appear, particularly on older iMacs. Use the arrow or tab keys to select that one, then press return to start loading the system on that disk.
If you only see the optical drive icon, that confirms there is a problem with the hard drive. Try Disk Utility anyway; if it can find the hard drive, there is some possibility of recovering it, or reformatting and loading from your backup. If the hard drive icon appears in the startup option screen, Disk Utility may be able to repair the problem if it is a file system issue affecting system loading. If a fundamental system file is corrupted, you will likely have to reinstall the OS.
In the worst case, the hard drive has a physical problem. Most of the time this is mechanical (sometimes announced with repeated, regular clicking noises as the drive vainly hunts for its starting position). Rattling noises (like the head has separated from its arm and is bouncing around) are also most unwelcome. Occasionally, the problem is with the controller board on the hard drive. In this case, if you can find another drive of the same model, you can swap controller boards (doing so successfully requires observing electrostatic discharge safety procedures to prevent zapping the drive, and properly identifying and operating the latch mechanism for the ribbon cable connector that connects the board to the drive mechanism). Generally, however, you have to replace the hard drive.
Once in a while, the problem is with the cable between the hard drive and the logic board. On the old Macs with IDE drives (40-line ribbon cable connecting both optical drive and hard drive on some, two such cables on other models), there may be a bad connection on one wire because the wire is not properly seated in its two-tined fork inside the connector. To reseat the wires, gently push the cable down right at the connector shell (towards the surface of the connector shell that is pushed onto the pins of the drive or logic board). Do not put a crease bend on the cable there; you're just trying to make sure the wire is in the bottom of its fork. Repeat on the other side of the connector with the end of the cable (use a fingernail to catch the edge of the cable end).