A number of users have found a problem with recent iMac models where the systems seem to hang at the grey boot screen with the Apple logo. Additionally, if these computers are put to sleep they sometimes will not come out of sleep, requiring a hard reset of the computer.
Apple discussion board user "Mulderscully" describes the problem as not being able to boot, followed by other odd behavior that eventually calms down:
"When the iMac does boot up without the initial freeze, it freezes when the desktop is launched. I then have to hold down the button and shut it down. After I've started it up the second time there are no issues."
When the computer is displaying the grey screen, it is trying to initialize hardware devices, including peripherals, and load the system kernel so the OS can continue booting. If there is a problem with one device or a conflict between multiple devices you have attached to your system, the system may hang during this initialization process. This could happen during hardware detection, or could also happen when the system tries loading the boot cache, which is a temporary store of all previously used system components such as drivers, settings, and system configurations.
There are a few of ways to approach boot problems such as this:
Remove peripheral hardware
If you have USB or Firewire devices attached to your system, unplug them and try booting without them attached. Holding down the shift key may also help prevent unnecessary kernel extensions from loading. A number of people with this problem have found that certain devices plugged into their USB ports seem to have been contributing to this problem.
Clear boot caches
Use a system cleaning program such as OnyX, MainMenu, or MacCleanse to empty the boot cache, forcing the system to refresh it with the drivers necessary for system use. The first reboot after doing this will take longer as the system finds and loads the necessary drivers into the new cache.
Reset PRAM and SMC
The PRAM and SMC contain a number of boot arguments and settings for the system hardware, which may contribute to boot hangs if they are not set correctly. Try resetting the PRAM and SMC for your system, and see if the problem goes away.
Resetting the PRAM
Restart the computer with the options-command-P-R keys held down. The system will continually reset and make the boot chimes while these keys are held. Let it to cycle a couple of times and then release the keys and allow it to boot normally.
Resetting the SMC
The system management controller can be reset for iMacs by turning off the computer and unplugging all connections from it for at least 15 seconds, as per the instructions in this Apple KB article.
Try different peripheral connections
If the system boots fine with no peripherals attached, try attaching them one at a time and rebooting to troubleshoot which one is causing the problem. It may be that a specific USB or Firewire port configuration is to blame, so when you find the device that's causing the problem, try putting it in a different port and try again. This is particularly true if you have devices daisy-chained together, which can sometimes lead to device conflicts or power issues.