Mac 101: What's happening when your Mac is starting up?
Recently, in the interest of sleeping soundly through the night, I've been turning off my 27" iMac every night. No, I'm not doing this for energy conservation, but the darned thing used to light up at random intervals in the middle of the night. Since I now have to power up the iMac every morning, I see the bootup process regularly.
You know how it goes. First you hear the startup chime, then you see that gray screen, then the gray screen with the Apple logo and spinning gear on it, then a light blue screen, and finally a login window or the desktop appears. What's actually going on while all of this is showing up on your screen? Well, as those of us who have gone through the training and tests to become Apple Certified Support Professionals are aware, each of those visual cues is an indication that a milestone in the bootup process has been reached.
Follow along as I take you on a tour behind the scenes of the Mac OS X boot process, starting on the next page.
The Startup Chime: When you press the power button on your Mac, the first thing that happens is the Mac's hardware is initialized and the firmware -- BootROM -- is loaded and run. The BootROM is stored on flash memory chips on your Mac's motherboard, and it works as a miniature operating system to get things started before Mac OS X is loaded.
At power on, the firmware runs the Power-On Self Test (POST), which tests the processors, system memory, and network (Wi-Fi, Ethernet) and peripheral (USB, FireWire, Bluetooth) interfaces. If your hardware passes the POST, the startup chime is sounded and a light gray background is displayed on any attached display.
So what happens if your Mac doesn't pass the test? The display(s) either remain blank or off, or you might see error codes displayed. It varies from Mac to Mac, but error codes can be audible tones ("The Chimes of Doom"), flashes from external or internal lights, or a combination of those items. It doesn't take an Apple Genius to know that when your machine doesn't boot, you ought to take it to your AASP (Apple Authorized Support Provider) ASAP!
If life is good to you and your Mac did pass the POST, the firmware then goes on to find the booter file.

The Gray Screen and The Apple Logo: The firmware knows where the system booter file is, since it saves the location in nonvolatile RAM (NVRAM). The choice of booter file can be specified in either System Preferences > Startup Disk or the Boot Camp control panel in Windows. When the booter file is found, EFI (Extensible Firmware Interface) starts the booter process to load Mac OS X or Windows if you're using Boot Camp on a Mac. When booting into Mac OS X, that friendly dark gray Apple logo is displayed. What if the firmware can't find a booter file? That's when you see that folder icon with a question mark in it.
There are, of course, some keyboard modifiers for startup that we're (hopefully) all familiar with. Since some of these modifiers can change which booter file is loaded, these keys must be pressed while you're powering up or rebooting. As a refresher, here are a few of the more notable modifier keys:
- C -- to start up from a bootable DVD or CD in the optical drive
- T -- to start up a Mac with FireWire in Target Disk Mode. This is a great way to access an older Mac's hard disk when using the Migration Assistant utility to move data and settings to a new Mac.
- Option -- this starts the Mac in the Startup Manager, which lets you select which volume to start up from. This is very useful with Boot Camp. This setting isn't stored in NVRAM, so it doesn't persist between startups.
- Shift -- this starts Mac OS X in Safe Mode. A Safe Boot is performed, and the system not only tests startup processes more carefully, it also limits auto-launched processes to a bare minimum.
- Command - V -- now we're starting up Mac OS X in Verbose Mode. In Verbose Mode, you actually get to see what's going on in Unix during startup. Instead of the light gray and blue screens, you see a black screen with white text on it.

- Command-Option-P-R -- this resets NVRAM settings and then restarts the Mac. The "PR" comes from the term "Parameter RAM."
There are more modifiers, but that should give you a taste of what's available without getting into possibly dangerous territory.

The Spinning Gear: The booter process is started by the Mac firmware and it does two things. It loads the Mac OS X kernel, and it loads kernel extensions (KEXTs) so the kernel is able to take over the system and continue startup. When the booter successfully loads the kernel, you'll see the dark gray spinning gear icon below the Apple Logo. After this point, the gear spins while launchd, the parent process for every process that runs on the Mac, is started and other processes are spawned.

The Blue Screen of Happiness: On a Window-based system, a blue screen has always been a cause for cussing, but on Mac OS X, it means that the system initialization process is taking place. When the bright blue screen appears, that means that the launchd process has spawned the very important WindowServer process. That process draws the Mac OS X user interface, hence its importance to what is going on during bootup.
After this point, good old launchd fires off loginwindow.app (which is both a background process and an application), and either displays the login window or speeds directly to the user's desktop.
The End of the Tour: So that is what is going on while your Mac is booting up. One of my favorite things to do to amaze Mac newbies is to show them the "Verbose Mode" startup described above. When they see the list of things happening behind the scenes on their Mac, they get a better understanding of some of the complex processes that Apple does such a good job of hiding in Mac OS X.
Share
Source: http://tuaw.com/category/mac-101
Categories
Recently, in the interest of sleeping soundly through the night, I've been turning off my 27" iMac every night. No, I'm not doing this for...
Add a Comment
WTF? POST does a check for Wifi, Ethernet, USB, Firewire and Bluetooth? Does that mean that I wont be able to use a mac if the Bluetooth adaptor fails?
Either you've got your facts wrong, or Apple has got their priorities wrong. The POST for processor, memory and Boot devices that PCs seem more intelligent to me.
Interesting article, but did you log out before putting your iMac to sleep? Probably not... I sleep my iMac every night and it never wakes on its own unless someone touches the mouse. But then, I always log out first.
October 23 2010 at 10:28 PM Report abuse Permalink rate up rate down ReplyI would like to know what the other startup modifiers you mention are. Where can we find info on thoses?
October 23 2010 at 3:42 PM Report abuse Permalink rate up rate down ReplyEver since I installed Pro Tools and Final Cut on my MacBook Pro yesterday, there's been a loading bar at the Apple screen right below the spinning gear. Sometimes it takes forever, sometimes it loads quickly. Anyone know why?
October 23 2010 at 12:32 PM Report abuse Permalink rate up rate down ReplyThe only time I've seen a progress bar on the startup screen is when doing a firmware update. I wonder if this is a result of an added kernel extension? That's what is going on at that point so might make sence.
The other thought I had is the system might be resetting the kernel extension cache. I believe this is forced when you start in Safe mode with the shift key as mentioned in the article. It shouldn't do this repeatedly tho nor should it do it automatically.
My vote is for an additional kernel extension installed with the apps you mentioned.
@Josh.
No it's related to a software bug periodically waking the computer up on Network Access.
If you turn off "Wake on Network Access" it won't wake up. I'm willing to bet this happens on a Virgin Mac as well.
Great article, would love to see a followup about how it all relates to the current status of instant on.
October 23 2010 at 2:48 AM Report abuse Permalink rate up rate down ReplyIt's not related at all. "Instant On" doesnt' mean "Instant Booting," it means "Instant Waking From Sleep." Completely different process.
October 23 2010 at 10:48 PM Report abuse Permalink rate up rate down ReplyIs that all Apple's instant on is? Just the ability to wake from sleep a tad faster, hmm, a bit misleading.
But I was talking more about booting instantly from cold, as surely there is some developments happening in this area, ie.: http://www.bbc.co.uk/news/technology-11430069
Simple, informative, nice!
I seem to be having all these problems, every day, on my 2006 Intel Core Duo iMac 20"!
My Mac is connected to a UPS, and is on all day. At night, I switch off the Mac and the UPS. In the morning I'll either get 1 or both these problems:
1. Startup chime, but no screen
2. Dark gray to light gray vignetted screen with flashing folder
So I switch-off the Mac, and the UPS repeatedly, and finally the Mac is back on, working perfectly! Has been happening for about 3 months now.
Wonder if it's the battery onboard... but then, date and time would be out of sync (which they are not).
Apple support is pathetic in our country, so your thoughts and advice are welcome : )
Mac user for over a decade, with multiple Macs.
Alright this going to sound stupid bit got to system prefs and check that mac HD is the startup disk. From there if you don't have bootcamp is troblrshoothing the mac. It's either the mac boots or the pc doesn't blame the at culprit 99% of the time it Is that os!
October 23 2010 at 6:26 AM Report abuse Permalink rate up rate down Replyyea that brief light blue screen is totally the same as the solid blue (hex value #0000FF) that you get with a Windows crash and absolutely nothing like the default desktop background color in 2000 and XP
October 23 2010 at 2:08 AM Report abuse Permalink rate up rate down ReplyFantastic writeup! Thanks, Steve!
October 23 2010 at 12:20 AM Report abuse Permalink rate up rate down ReplyI'm so proud to have a linux box. I see the verbose every day I hit the power button. (o:
October 22 2010 at 6:30 PM Report abuse Permalink rate up rate down ReplyAs a Mac user, I hit the power button about once a month.
October 22 2010 at 8:00 PM Report abuse Permalink rate up rate down ReplyThen you are waisting energy ! Standby doesn't mean it don't uses power; so you better use your power button. *smile*
October 22 2010 at 10:04 PM Report abuse Permalink rate up rate down ReplyI have a problem with my Mac on bootup. Right before the blue screen, i get a gray screen with a bunch of jumble black pixels and a big black bar at the bottom for a few seconds. Anybody know what this is about?
October 22 2010 at 5:04 PM Report abuse Permalink rate up rate down ReplyHot Apps on TUAW
Deals of the Day
more deals- Used Apple iPhone 3G 8GB for AT&T for $108 + $5 s&h
- Apple Mac Pro Xeon 6-Core 3.3GHz Desktop w/ 12GB RAM for $3,899 + $28 s&h
- Apple MacBook Pro Core i7 Quad 2.2GHz 15" SSD Laptop for $2,447 + $13 s&h
- Apple Earphones with Remote and Mic for $6 + $2 s&h
- PC Micro Store sale: Up to 50 off
- USB MP3 Player FM Transmitter with remote for $6 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



50 Comments