Legal Information
PC Knowledge Base - DOS Boot

Good Knowledge Is Good2Use

The BIOS, having completed its functions, loads the boot code in the master boot record and transfers control to it. The master boot record code begins execution. If the boot device is a floppy disk, the process continues with step 5. Booting from the floppy disk differs only in the first few steps, because the floppy disk's structures are slightly different. Floppies cannot be partitioned, and hence have no master boot record or partitions. This means that the steps where the master boot record are searched are skipped.

The steps in the DOS boot process:
  1. The master boot code examines the master partition table. It is searching for two things. First, it must determine if there is an extended DOS partition. Second, it must determine if there is a bootable partition specified in the partition table.
  2. If the master boot code finds an extended partition on the disk, it loads the extended partition table that describes the first logical volume in the extended partition. This extended partition table is examined to see if it points to another extended partition table.
    If it does, then that table contains information about the second logical volume in the extended partition, so it is loaded and examined. Logical volumes in the extended partition have their extended partition table chained one to the next. This process is continued until all of the extended partitions have been loaded and recognised by the system.
  3. After loading the extended partition information (if any), the code attempts to boot the primary partition that is marked active (bootable). If there are no partitions marked active, then the boot process will terminate with an error. The error message is often the same one that occurs if the BIOS finds no boot device, and is generally something like "No boot device", but can be the infamous "NO ROM BASIC - SYSTEM HALTED".
  4. If there is a primary partition marked active, the code will boot it. The rest of the steps assume this is a DOS primary partition.
  5. The volume boot sector is loaded into memory and tested, and the boot code that it contains is given control of the remainder of the boot process.
  6. The volume boot code examines the structures on the disk that it is booting to ensure that everything is correct and in the right place. If not, the boot process will end in an error here as well.
  7. The code searches the root directory of the device being booted for the operating system files that contain the operating system. For a system running MS-DOS these are the files "IO.SYS", "MSDOS.SYS" and "COMMAND.COM".
  8. If the operating system files are not found, the boot program will display an error message, which is usually something like "Non-system disk or disk error - Replace and press any key when ready". Some people think that this message means the system was never booted, that the BIOS examined the floppy disk for example and just rejected it because it couldn't boot it. As you can see from this description of the boot process, the volume boot code was indeed loaded and executed, and in fact it is what prints the message when it can't find the operating system files! See here for an explanation of why this distinction is so important.
  9. If the operating system files are found, the boot program will load them into memory and transfer control to them. First, IO.SYS is loaded and its code executed. IO.SYS will then executed MSDOS.SYS (in pure DOS systems--MSDOS.SYS is just a text file in Windows 95 and later.) Then the more complete operating system code loads and initialises the rest of the operating system structures. For MS-DOS, this means loading the command interpreter (COMMAND.COM) and then reading and interpreting the contents of the CONFIG.SYS and AUTOEXEC.BAT system control files.

At this point the operating system code itself has control of the PC. In the case of 32-bit Windows versions like Windows 95/98/ME, the steps above are only the beginning of the process. The initial DOS operating system files control the loading and execution of many more routines as the boot progresses, which perform tasks such as reading the system registry, initialising hardware devices and starting the graphical operating system shell. In fact, it is surprising in some ways just how many different pieces of code have a hand in starting up the PC.

In the case of problems with either the DOS boot process or the resultant Windows boot (WIN.COM), it is possible to conduct diagnostics from the SAFE environment.



Search Knowledge Base Feedback
If you like our web site refer a friend.
Your friends name.
Your friends email address.
Your Name
Your Email Address


© Copyright 1998-1999 GOOD2USE