The disk-assignment numbers may not necessarily match the corresponding SATA or RAID channel numbers.
The BIOS may or may not enumerate disks in a specific order. There is no direct relationship between the BIOS order, and the order in which Windows numbers the disks. During startup, Windows switches from using the BIOS INT13 support to native Windows drivers to access disks. Windows waits for several seconds for the system disk to enumerate through Plug and Play. When there is a match within the time-out period, normal startup will proceed. Otherwise, the system will trigger a bug check with Stop error code of 0x7B. Windows uses other mechanisms to differentiate disks, as Windows has no control over the disk-numbering process before startup. Windows has no information about any changes to hardware when the computer is turned off. Therefore, Windows initiates its own query for device enumeration.
The disk numbers that are assigned by Windows after it switches to native Windows storage controller drivers during startup are dependent solely on the order in which the disks are enumerated and processed by Plug and Play. Windows will enumerate available fixed disks, followed by removable disks, assuming that the correct native Windows drivers are already present and installed on the system. Various uncontrollable timing factors may affect the enumeration order. For example, most IDE controllers are designed to specifically enumerate the Master channel, wait two seconds, and then enumerate the Slave channel. This has the effect of providing an apparently consistent enumeration order, but it is actually a side effect of the hardware implementation. SATA controllers have a different behavior and do not experience this same side effect.
Devices are presented in the order in which they are enumerated. Therefore, the disk assignment numbers may change between startups. For example, assume that you run Windows or Windows Server Setup on a computer that has two unformatted SATA or RAID hard disks. In this situation, Windows may present the second hard disk as Disk 0 when you are prompted for the disk on which to install the operating system. The enumeration order may change over time between system boots, depending on timing factors such as aging hard disks taking slightly longer to spin up.