The Operating System Takes Charge

After the hardware part of the boot sequence has finished, what is loaded next is the operating system. If you have only one operating system, it is easy, because the computer knows immediately how to proceed. If you have more than one operating systems – i.e. Windows and Linux, or two or more Windows or Linux varieties, all this is written in the boot configuration and it takes one more step to load the Windows (or respectively) Linux boot loader and then to choose which of the available varieties of Windows (or Linux) to load.

Basically, the process of loading the operating system involves loading the kernel in memory, loading device drivers, starting services and finally presenting the user with a login screen or a login prompt, if it is not a GUI. It is useful to know what services are loaded at startup because this way you can remove some services (not the core ones, of course) and make your computer boot faster. The process of loading the operating system differs under Linux and Windows and that is why the boot sequence for both operating systems is described separately in the next two sections.

Windows

There are several stages in the Windows boot sequence. NTLDR is the boot loader for Windows for Windows 2000, XP, 2003 (under Vista its functionality is divided between winload.exe and the Windows Boot Manager. NTLDR is located in the root directory of the Windows system partition. NTLDR requires the boot.ini file, where configuration options about the boot process are written. NTLDR goes through the following four phases before the user is presented with the login screen:

Initial Boot Loader Phase. The tasks that NTLDR performs at this stage are memory initialization to enable full memory addressing, as well as initialization of the file system on the primary boot drive. On the primary boot drive NTLDR looks for boot.ini.

  1. Selection which operating system to load. The boot.ini file contains boot settings, like a list of available operating systems and instructions, timeout before loading the default operating systems and so. If you have only one Windows variety installed, it will be booted automatically but if you have two or more Windows varieties coexisting on your computer, you will be presented with a screen where you can select which of them you want to load.
  2. If you are running Windows 2000, XP, or 2003, you can press F8 to interrupt boot sequence and display a list of several options for special cases booting like Safe Mode or Last Known Good Configuration. Safe Mode loads only the most essential drivers and services, while Last Known Good Configuration loads the latest working configuration. Both options are very useful after an unsuccessful driver or application installation, as a result of which you can’t login properly into Windows.
  3. Hardware initialization. The next step in the boot sequence for Windows 2000, XP and 2003 is detection of the installed device drivers and initialization of the respective pieces of hardware. If you have more than one hardware profiles, you will be presented with a screen to choose which one you want to load. If you have only one hardware profile, it will be booted automatically.
  4. Configuration loading. After the hardware has been initialized and the appropriate hardware configuration is loaded, some additional drivers, namely of boot devices, are loaded as well. Then the next step is loading the kernel. After that core subsystems, like the Object Manager, the I/O Manager, and the Process Manager are started as well. Then all services that are labeled for auto start are started as well and if everything goes smoothly, the user is presented with a login screen and this boot sequence is saved as the Last Known Good Configuration. If there are problems at this stage, you may see your Windows halted or rebooted, especially if it is a device driver failure.

The above presentation of the boot sequence in Windows was brief and it covered the main points only. If you need more information, for instance a list of which services are started and in what order, you can find it on the site of Microsoft. After we have briefly examined the boot sequence for Windows, let’s see how it is for Linux.