Upgrading And Repairing PCs 21st Edition: PC Diagnostics

The Hardware Boot Process: Operating System Independent

If you have a problem with your system during startup and can determine where in this sequence of events your system has stalled, you know which events have occurred and probably can eliminate each of them as a cause of the problem. The following steps occur in a typical system startup regardless of which operating system you are loading:

  1. You switch on electrical power to the system.
  2. The power supply performs a self-test (known as the POST). When all voltages and current levels are acceptable, the supply indicates that the power is stable and sends the Power_Good signal to the motherboard. The time from switch-on to Power_Good is normally between 0.1 and 0.5 seconds.
  3. The microprocessor timer chip receives the Power_Good signal, which causes it to stop generating a reset signal to the microprocessor.
  4. The microprocessor begins executing the ROM BIOS code, starting at memory address FFFF:0000. Because this location is only 16 bytes from the very end of the available ROM space, it contains a JMP (jump) instruction to the actual ROM BIOS starting address.
  5. The ROM BIOS performs a test of the central hardware to verify basic system functionality. Any errors that occur are indicated by audio beep codes because the video system has not yet been initialized. If the BIOS is Plug and Play (PnP), the following steps are executed; if not, skip to step 10.
  6. The PnP BIOS checks nonvolatile random access memory (NVRAM) for input/output (I/O) port addresses, interrupt request lines (IRQs), direct memory access (DMA) channels, and other settings necessary to configure PnP devices on the computer.
  7. All PnP devices found by the PnP BIOS are disabled to eliminate potential conflicts.
  8. A map of used and unused resources is created.
  9. The PnP devices are configured and reenabled, one at a time. If your computer does not have a PnP BIOS, PnP devices are initialized using their default settings. These devices can be reconfigured dynamically when Windows starts. At that point, Windows queries the PnP BIOS for device information and then queries each PnP device for its configuration.
  10. The BIOS performs a video ROM scan of memory locations C000:0000–C780:0000 looking for video adapter ROM BIOS programs contained on a video adapter found either on a card plugged into a slot or integrated into the motherboard. If the scan locates a video ROM BIOS, it is tested by a checksum procedure. If the video BIOS passes the checksum test, the ROM is executed; then the video ROM code initializes the video adapter and a cursor appears onscreen. If the checksum test fails, the following message appears: C000 ROM Error
  11. If the BIOS finds no video adapter ROM, it uses the motherboard ROM video drivers to initialize the video display hardware, and a cursor appears onscreen.
  12. The motherboard ROM BIOS scans memory locations C800:0000–DF80:0000 in 2KB increments for any other ROMs located on any other adapter cards (such as SCSI adapters). If any ROMs are found, they are checksum-tested and executed. These adapter ROMs can alter existing BIOS routines and establish new ones.
  13. Failure of a checksum test for any of these ROM modules causes the message XXXX ROM Errorto appear, where the address XXXX indicates the segment address of the failed ROM module.
  14. The ROM BIOS checks the word value at memory location 0000:0472 to see whether this start is a cold start or a warm start. A word value of 1234h in this location is a flag that indicates a warm start, which causes the BIOS to skip the memory test portion of the POST. Any other word value in this location indicates a cold start, and the BIOS performs the full POST procedure. Some system BIOSs let you control various aspects of the POST procedure, making it possible to skip the memory test, for example, which can be lengthy on a system with a lot of RAM.
  15. If this is a cold start, the full POST executes; if this is a warm start, a mini-POST executes, minus the RAM test. Any errors found during the POST are reported by a combination of audio and displayed error messages. Successful completion of the POST is indicated by a single beep (with the exception of some Compaq computers, which beep twice).
  16. The ROM BIOS searches for a boot record at cylinder 0, head 0, sector 1 (the very first sector) on the default boot drive. At one time, the default boot drive was always the first floppy disk (or A: drive). However, the BIOSs on today’s systems often enable you to select the default boot device and the order in which the BIOS will look for other devices to boot from if necessary, using a floppy disk, hard disk, or even a CD-ROM drive in any order you choose. This sector is loaded into memory at 0000:7C00 and tested.If a disk is in the drive but the sector can’t be read, or if no disk is present, the BIOS continues with step 19.
    eyJ0eXBlIjoidGV4dCIsImlkIjoiYzRjYzcyOTQtN2NhYy00NWQ3LWEyYzgtZDc3MGI2ZGNlZmE5IiwiZGF0YSI6eyJwYXJhZ3JhcGhzIjpbIkJvb3RpbmcgZnJvbSBPcHRpY2FsLCBVU0IsIG9yIEZsb3BweUlmIHlvdSB3YW50IHRvIGJvb3QgZnJvbSBhbiBvcHRpY2FsIG9yIFVTQiBkcml2ZSwgYmUgc3VyZSB0aGUgZHJpdmUgaXMgbGlzdGVkIGJlZm9yZSB0aGUgaGFyZCBkaXNrIGluIHRoZSBib290IGRldmljZXMgb3Igc2VxdWVuY2UgbWVudSBpbiB5b3VyIEJJT1Mgc2V0dXAuIElmIHlvdSBoYXZlIGEgZmxvcHB5IGRyaXZlIGluc3RhbGxlZCwgeW91IGNhbiBzZXQgdGhhdCB0byBjb21lIGJlZm9yZSB0aGUgaGFyZCBkaXNrIGluIHRoZSBzZXF1ZW5jZSBhcyB3ZWxsLiBUaGlzIGVuYWJsZXMgeW91IHRvIGFsd2F5cyBiZSByZWFkeSBmb3IgYW4gZW1lcmdlbmN5LiBTbyBsb25nIGFzIHlvdSBkbyBub3Qgc3RhcnQgdXAgdGhlIHN5c3RlbSB3aXRoIGEgYm9vdGFibGUgVVNCIGRyaXZlLCBmbG9wcHksIG9yIG9wdGljYWwgZGlzYyBsb2FkZWQsIHRoZSBCSU9TIGJ5cGFzc2VzIHRoZW0gYW5kIGJvb3RzIGZyb20gdGhlIGhhcmQgZHJpdmUgaW5zdGVhZC4iXX19
  17. If you are booting from a floppy disk and the first byte of the volume boot record is less than 06h, or if the first byte is greater than or equal to 06h and the first nine words contain the same data pattern, this error message appears and the system stops: 602-Diskette Boot Record Error
  18. If the volume boot record can’t find or load the system files, or if a problem was encountered loading them, one of the following messages appears: Non-System disk or disk error, Replace and strike any key when ready; Non-System disk or disk error, Replace and press any key when ready; Invalid system disk, Replace the disk, and then press any key; Disk Boot failure; Disk I/O Error

All these messages originate in the volume boot record (VBR) and relate to VBR or system file problems.

  1. If no boot record can be read from drive A: (such as when no disk is in the drive), the BIOS then looks for an MBR at cylinder 0, head 0, sector 1 (the first sector) of the first hard disk. If this sector is found, it is loaded into memory address 0000:7C00 and tested for a signature.
  2. If the last two (signature) bytes of the MBR are not equal to 55AAh, software interrupt 18h (Int 18h) is invoked on most systems. This causes the BIOS to display an error message that can vary for different BIOS manufacturers, but which is often similar to one of the following messages, depending on which BIOS you have.
    eyJ0eXBlIjoidGV4dCIsImlkIjoiZGE1NTE1ZjAtMWQxNC00MzhjLWEzNTEtNGY1NTViNTlmNmUzIiwiZGF0YSI6eyJwYXJhZ3JhcGhzIjpbIk5vdGU6IFNvbWUgSUJNIGNvbXB1dGVycyBzaW5jZSAxOTg3IGRpc3BsYXkgYSBzdHJhbmdlIGNoYXJhY3RlciBncmFwaGljIGRlcGljdGluZyB0aGUgZnJvbnQgb2YgYSBmbG9wcHkgZHJpdmUsIGEgMyAxLzItaW5jaCBkaXNrLCBhbmQgYXJyb3dzIHByb21wdGluZyB5b3UgdG8gaW5zZXJ0IGEgZGlzayBpbiB0aGUgZHJpdmUgYW5kIHByZXNzIHRoZSBGMSBrZXkgdG8gcHJvY2VlZC4iXX19

Although the messages vary from BIOS to BIOS, the cause for each relates to specific bytes in the MBR, which is the first sector of a hard disk at the physical location cylinder 0, head 0, sector 1.

The problem involves a disk that either has never been partitioned or has had the Master Boot Sector corrupted. During the boot process, the BIOS checks the last two bytes in the MBR (first sector of the drive) for a signature value of 55AAh. If the last two bytes are not 55AAh, an Interrupt 18h is invoked, which calls the subroutine that displays one of the error messages just shown, which basically instructs the user to insert a bootable floppy to proceed.

The MBR (including the signature bytes) is written to the hard disk by the FDISK, Disk Management, or DISKPART programs. Immediately after a hard disk is low-level formatted, all the sectors are initialized with a pattern of bytes, and the first sector does not contain the 55AAh signature. In other words, these ROM error messages are exactly what you see if you attempt to boot from a hard disk that has been freshly low-level formatted but has not yet been partitioned or if the MBR has been corrupted such that the signature bytes were overwritten.

  1. The MBR searches its built-in partition table entries for a boot indicator byte marking an active partition entry.
  2. If none of the partitions are marked active (bootable), the BIOS invokes software interrupt 18h, which displays an error message (refer to step 20).
  3. If any boot indicator byte in the MBR partition table is invalid, or if more than one indicates an active partition, the following message is displayed and the system stops: Invalid partition table
  4. If an active partition is found in the MBR, the partition boot record from the active partition is loaded and tested.
  5. If the partition boot record can’t be read successfully from the active partition within five retries because of read errors, the following message is displayed and the system stops: Error loading operating system
  6. The hard disk’s partition boot record is tested for a signature. If it does not contain a valid signature of 55AAh as the last two bytes in the sector, the following message is displayed and the system stops: Missing operating system
  7. The volume boot record is executed as a program. This program looks for and loads the operating system kernel or system files. If the volume boot record can’t find or load the system files, or if a problem was encountered loading them, one of the following messages appears: Non-System disk or disk error, Replace and strike any key when ready; Non-System disk or disk error, Replace and press any key when ready; Invalid system disk, Replace the disk, and then press any key; Disk Boot failure; Disk I/O Error

All these messages originate in the volume boot record (VBR) and relate to VBR or system file problems.

From this point forward, what happens depends on which operating system you have. The operating system–dependent boot procedures are discussed in the next several sections.  

Image
Upgrading and Repairing PCs: 21st Edtion