Adding Failover Capability

If the primary OS fails to boot, you can use a failover algorithm to make the Microsoft Windows Powered server appliance failover to another OS in a variety of ways. The algorithm must detect a boot failure, and then boot the server appliance from another partition/volume.

The following example process—consisting of a list of requirements along with a process flow chart—illustrates how to add a failover algorithm to the BIOS. Because adding a failover algorithm to the BIOS is a complex process, Microsoft recommends that you print this topic for reference before you begin designing the failover BIOS. In the event you are using another means of providing failover support, you may use the following process as a guide in your efforts.

Requirements

The following list illustrates what is required if the BIOS includes a failover algorithm:

  1. Your Windows Powered server appliance must include nonvolatile RAM (NVRAM), a watchdog timer, and associated drivers.

  2. The BIOS must detect whether a reboot is from an internal or external source. For example, a power failure is an external source.

  3. If your target hardware includes a watchdog timer and the BIOS sets the initial counter value, then set the initial watchdog timer counter value to two minutes + (2 x T). "T" represents the length of time the watchdog timer is enabled before the BIOS attempts to run the boot sector.

  4. The BIOS must determine which disk drive to boot from by searching for a bootable partition/volume on the main disk drive, and then searching for the same on the backup disk drive. On Advanced Technology Attachment (ATA) systems, the primary device 0 is searched first, and the secondary device 0 is searched second.

  5. The BIOS must use the following procedure to determine the system partition/volume from which to boot:

    1. Search for an active partition/volume with a system ID equal to 0x07, 0x87, or 0xc7 in the partition/volume table. The partition/volume table is located in the master boot record, which is the System1 partition/volume.
    2. Search for the boot counter value in the NVRAM that is associated with the System1 partition/volume.
    3. Determine if the boot counter associated with the partition/volume is less than, greater than, or equal to the boot counter threshold value:
    • If the boot counter is less than the threshold, the BIOS must increase the boot counter by 1 in the NVRAM associated with System1, and then attempt to boot from the partition/volume.
    • If the boot counter is greater than or equal to the threshold, the BIOS must attempt to boot from the first non-active partition/volume with system identifier 0x07, 0x87, or 0xc7 in the partition/volume table in the master boot record.
    • If both partition/volumes on the main disk fail to boot, then the BIOS follows the same procedure on the backup disk.
  6. The BIOS must set the drive number to 0x80 after it determines the disk from which the OS will boot.

  7. If the OS fails to boot, the watchdog timer restarts the BIOS algorithm.

    –Or–

    If the OS successfully boots, the OS uses the NVRAM driver to clear the boot counter stored in the NVRAM.

  8. If the server appliance reboots from an external source, the BIOS must reset all boot counters and then restart the BIOS algorithm.

The following flow chart, used in conjunction with the preceding list of requirements, illustrates how to create the failover algorithm.