Does anyone know a way to reliably map an arcpath’s rdisk(x) value to a
device name (e.g., \device\harddiskx)? On pure IDE machines harddisk0
always maps to rdisk(0), harddisk1 to rdisk(1), etc. However, this is not
always true on mixed ide/scsi machines.
The need arises on two fronts:
-
creating and deleting partitions can change the partition number of the
boot (OS) partition.
-
the boot.ini is a good way to quickly identify systems on a multi-boot
machine.
Example where the mapping is ambiguos: If \device\harddisk1 contains the
boot.ini, and the system is on \device\harddisk0, then rdisk(0) is
actually harddisk1.
thanks, russ
> Does anyone know a way to reliably map an arcpath’s rdisk(x) value
to a
device name (e.g., \device\harddiskx)? On pure IDE machines
harddisk0
Early on boot, NT creates the \ArcName object directory, which
contains the ARC-syntax symlinks to the NT device names.
The creation is done on the following bases:
- NTLDR have read all boot sector signatures from all disks known to
it (all int 13h disks or all disks available via NtBootDd.sys).
- NTLDR passes an array of all ARC names of all known disks together
with their signatures to the kernel.
- the kernel also reads these boot sector signatures and matches them
to the array passed by the NTLDR.
- by the described matching, the \ArcName object directory is built.
It is then used to find the \SystemRoot disk.
Max