Booting the Operating System
When the user starts a program, the operating system (OS) first transfers the bits of the program's software from its permanent location (hard drive, CD-ROM, etc.) to the main memory of the computer. The CPU cannot execute the program directly from the hard drive because the drive is much to slow to keep up with the CPU. Main memory is fast enough (with the addition of a cache) to keep up with the CPU. Thus, the OS first finds the desired program on the hard drive, loads the bits of the program into the main memory, and then starts feeding the CPU the bits out of main memory.
This loading process works fine for application programs, but how does the OS itself get loaded? When the computer is first turned on, the main memory does not contain any valid bits. The operating system itself must be loaded from the hard drive to the main memory. This seems like a catch-22! The solution is a progressive sequence of larger and larger booting programs that load the OS.
Startup Program
A very tiny startup program is stored in a special area of computer memory that retains its value even when the computer is turned off. This memory is often called "flash" or "BIOS" memory. The computer hardware is designed to automatically begin running the software instructions from this memory (and NOT from main memory, which will contain nonsense at this point). The tiny program contains just enough instructions to initialize the computer's hardware, display something on the monitor, and load a small number of bits from a specific location on the hard drive (the boot sector). While this tiny program is loading the boot sector bits into main memory, it displays a few informational messages on the computer monitor (or possibly via some other means of communication if the computer does not have a monitor).
The tiny startup program is specifically designed for the computer hardware it runs on. It is operating system neutral, in that it can start up any operating system that is compatible with the computer's hardware.
The Boot Program
The bits from the boot sector of the hard drive form a larger program that contains enough instructions to load the rest of the operating system. Once the tiny startup program discussed above has loaded in the boot sector, it immediately transfers the CPU to this new program. The boot program is usually operating system specific, in that it starts a specific operating system, although some operating systems provide a boot program, called a "boot loader" that allows the user to select from a number of operating systems available on the computer's hard drive. An example of a boot loader is the LILO program available in the Linux operating system.
Sometimes the boot program also displays a logo on the computer monitor to indicate the operating system is loading. Here are some examples of the operating system banner image displayed while the boot program loads the rest of the operating system from the hard drive.