How operating systems determine the location of the system volume when bootstrapped

You've come to this page because you've asked a question similar to the following:

How does an operating system decide which volume is the "system" volume (a.k.a. "system partition") when it is bootstrapped?

This is the Frequently Given Answer to such questions. (How operating systems determine the location of the boot volume is a different Frequently Given Answer, note.)

When an operating system is bootstrapped it must decide which volume is to be the system volume. There are two basic ways in which operating systems do this:

True system volumes

The ARC System Partition and the EFI System Partition are true system volumes, mandatory on systems with ARC or EFI firmwares, and reserved to the platform. The location of the ARC System Partition is designated by the value of the SystemPartition variable in the ARC firmware environment variables. The location of the EFI System Partition is simply read from the partition table.

The UEFI Specification specifies that the EFI System Partition have a particular, standard, type ID. So locating it involves reading the partition tables of all partitionable discs, and looking for partitions with that ID. Version 2 of the specification defined a "hidden" attribute, so that in cases where several discs on a system have an EFI System Partition, all bar the one that the system administrator intends to be the system partition for that machine can be marked "hidden", and will not be recognized as EFI System Partitions.

The same simple procedure for locating an EFI System Partition thus applies to everyone: to the EFI firmware itself, to operating system boot loaders, and to utility programs that deal with the system partition.

Poor Man's equivalents for system volumes

For old machines with PC/AT and PC98 firmwares, Microsoft provides a Poor Man's equivalent to the EFI system partition and the ARC System Partition: the System Reserved Partition. This doesn't have a standard type ID for the partition table. It doesn't have well defined, standard, contents, such as the standard directory structure of the EFI System Partition; nor even a standard identifier like a well-known volume label. In fact, it's just another Microsoft Data Partition as far as pretty much everything is concerned.

Microsoft tools such as Microsoft Windows' Disc Management identify the System Reserved Partition by relying upon the "active" attribute for partitions that is used for the old PC/AT and PC98 bootstrap process. The System Reserved Partition is defined as being a Microsoft Data Partition that is a primary partition with the "active" attribute. The "System" flag displayed by Microsoft Windows' Disc Management, and by the list partition command in Microsoft's diskpart, thus isn't a real partition table attribute that is stored on disc. It's a marker in the user interface for the volume that the tool has decided is the system volume today.

The flakiness of Microsoft's System Reserved Partition

This mechanism for locating the System Reserved Partition isn't a very robust one, it suffering from several problems:


© Copyright 2011 Jonathan de Boyne Pollard. "Moral" rights asserted.
Permission is hereby granted to copy and to distribute this web page in its original, unmodified form as long as its last modification datestamp is preserved.