Upgrading And Repairing PCs 21st Edition: PC Diagnostics

DOS And Windows 9x/Me Boot Processes And Windows 2000/XP Startup

The DOS Boot Process

MS-DOS and similar operating systems (PC-DOS, DR-DOS, and Freedos) use the following boot process:

  1. The initial system file (called IO.SYS or IBMBIO.COM) is loaded, and the initialization code copies itself into the highest region of contiguous DOS memory and transfers control to the copy.
  2. The initialization code loads MSDOS.SYS (or IBMDOS.COM), which initializes the base device drivers, determines equipment status, resets the disk system, resets and initializes attached devices, and sets the system default parameters.
  3. CONFIG.SYS is read multiple times. On the first pass any DEVICE statements are processed in the order in which they appear; the drivers named are loaded and executed. Then, any INSTALL statements are processed in the order in which they appear; the programs named are loaded and executed. The SHELL statement is processed and loads the specified command processor with the specified parameters. If the CONFIG.SYS file contains no SHELL statement, the default COMMAND.COM processor is loaded with default parameters. Loading the command processor overwrites the initialization code in memory (because the job of the initialization code is finished).
  4. If AUTOEXEC.BAT is present, COMMAND.COM loads and runs AUTOEXEC.BAT. After the commands in AUTOEXEC.BAT have been executed, the DOS prompt appears (unless AUTOEXEC.BAT calls an application program or shell of some kind, in which case the user might operate the system without ever seeing a DOS prompt). If no AUTOEXEC.BAT file is present, COMMAND.COM executes the internal DATE and TIME commands, displays a copyright message, and displays the DOS prompt.

The Windows 9x/Me Boot Process

The Windows 9x/Me boot process involves two files: IO.SYS and WIN.COM.

Windows 2000/XP Startup

When you start a Windows 2000 or XP system (which is based on the same set of integral code that originated with Windows NT), the boot process is different from that of a DOS or Windows 9x/Me system. Instead of accessing the IO.SYS and MSDOS.SYS files used by 9x/Me, these operating systems use an OS loader program called Ntldr.

The basic startup process is described in the following step-by-step procedures:

  1. The partition boot sector loads Ntldr (NT Loader). It then switches the processor to protected mode, starts the file system, and reads the contents of Boot.ini. The information in Boot.ini determines the startup options and initial boot menu selections (dual-booting, for example). If dual-booting is enabled and a non-NT/2000/XP OS is chosen, Bootsec.dos is loaded. If SCSI drives are present, Ntbootdd.sys is loaded, which contains the SCSI boot drivers.
  2. Ntdetect.com gathers hardware configuration data and passes this information to Ntldr. If more than one hardware profile exists, Windows uses the correct one for the current configuration. If the ROM BIOS is ACPI compliant, Windows uses ACPI to enumerate and initialize devices.
  3. The kernel loads. Ntldr passes information collected by Ntdetect.com to Ntoskrnl.exe. Ntoskrnl then loads the kernel, Hardware Abstraction Layer (Hal.dll), and Registry information. An indicator near the bottom of the screen details progress.
  4. Drivers load and the user logs on. Networking-related components (for example, TCP/IP) load simultaneously with other services, and the Begin Logon prompt appears onscreen. After a user logs on successfully, Windows updates the Last Known Good Configuration information to reflect the current configuration state.
  5. PnP detects and configures new devices. If new devices are detected, they are assigned resources. Windows extracts the necessary driver files from Driver.cab. If the driver files are not found, the user is prompted to provide them. Device detection occurs simultaneously with the operating system logon process.

The following files are processed during startup:

  • Ntldr
  • Boot.ini
  • Bootsect.dos (multiple-boot systems only)
  • Ntbootdd.sys (loaded only for SCSI drives)
  • Ntdetect.com
  • Ntoskrnl.exe
  • Hal.dll
  • Files in systemroot System32 Config (Registry)
  • Files in systemroot System32 Drivers (drivers)

Note: If you see error messages during startup or your system doesn’t start properly, restart the system, press the F8 key to open the startup menu, and select Enable Boot Logging to create a file called Ntbtlog.txt. This file records events during startup and can help you determine which files or processes are not loading correctly.

Image
Upgrading and Repairing PCs: 21st Edtion