EmailEmail
PrintPrint
TechMan: Everything you want to know on booting up
Sunday, August 29, 2010

Today's letter from an imaginary reader asks: "When I push the power button on my computer, it flashes stuff on the screen before Windows starts. What is it doing?"

Excellent question, imaginary reader. This can get a little geeky, so stay with me.

Your computer goes through a process called booting or booting up, which comes from bootstrapping which comes from "pull yourself up by your bootstraps," which is impossible if you actually try it.

When the power goes on, the computer activates its chips and tries to get the central processing unit (CPU) running. If this process fails, the computer will just sit there with its fans running. It may or may not beep, just to irritate you.

Sometimes USB or other devices will cause this, so you can try unplugging all nonessential devices. If this doesn't work your computer may be dead, deceased, finis.

If the CPU is multicore, the classic question has to be asked, "Who's on first?" One processor is chosen to be the bootstrap processor and turns on first while others are left asleep. The chosen processor then runs the rest of the Abbott and Costello routine (just kidding).

The processor then hands off to the BIOS, basic input/output system. The BIOS, which is a piece of code, begins to power up the computer hardware. It runs a POST (Power-on Self Test) that checks out various components.

If the video card fails to function, the computer will emit a mournful beep because that's all it can do. Without a functioning video card, it can't display any messages. Once the video card is up, things begin to flash across the screen, and if another component fails, let's say the keyboard is missing, an error message will appear on the screen.

Of course this won't be in English, like "Where's my keyboard?" It'll probably be something like "Input device has failed to initialize."

After the POST is complete, the BIOS goes looking for a boot device. It will look on the hard drive, the CD or DVD drive, even on a flash USB drive. The order that it looks in these places can be set.

If it can't find a boot device, it will print an error message. Again this won't be something understandable like "I've lost my hard drive and I can't start up." It will probably be "Non-System Disk or Disk Error." This may mean your hard drive is dead, deceased, finis.

If the BIOS finds a boot device, it hands off control to the MBR, master boot record.

The MBR contains a little bootstrapping program for the OS, operating system (Windows, let's say). It also has a partition table for the disk. You don't really need to worry about that unless you are running two operating systems. (If you are, you must be insane. Isn't Windows enough trouble? Apple has its own startup routines, but they're a secret. Again, just kidding.)

The code in the MBR could be called the Windows MBR loader according to Microsoft's boring naming system, or the more imaginative Linux names of LILO or GRUB.

This looks for the boot sector. If it can't find it, you'll again get an error message. But it won't be "Anyone seen my boot sector?" but instead "Invalid Partition Table," or the surprisingly understandable but grim-sounding, "Missing Operating System."

Finally we're ready to jump to Early Kernel Initialization where the operating system begins to start up and soon we hear that catchy Windows music.

So let's review. To start your computer, the user (that's you) pushes the OB (on button) and booting begins. The CPU wakes up and the cores decide who is in charge using an old comedy routine. Then control is handed off to the BIOS, which runs a POST, finds a boot device, then hands off to the MBR. The MBR or LILO or GRUB then finds the boot sector which then jumps to the Early Kernel Initialization (EKI) routine.

So it's OB to CPU to BIOS to POST to MBR (or LILO or GRUB) to EKI. OK?

Then your computer starts up. Maybe. And you've forgotten your password to log on.

Read TechMan's blog at post-gazette.com/techman. Watch TechTalk at post-gazette.com/multimedia or listen to the audio version at post-gazette.com/podcast. Follow pgtechman on Twitter.

Looking for more from the Post-Gazette? Join PG+, our members-only web site. You'll get exclusive sports content, opinion, financial information, discounts from retailers and restaurants, and more. Our introduction to PG+ gives you all the details.
First published on August 29, 2010 at 12:00 am