我的问题是,Index=0 的磁盘是否总是包含系统卷的磁盘?
就我而言,答案是 No。我的系统盘索引为 1。
此外,您认为系统磁盘始终可引导的假设也不正确。
$ wmic os get "SystemDrive"
SystemDrive
C:
$ wmic logicaldisk where 'DeviceID="C:"' assoc /resultclass:Win32_DiskPartition
...\\DZEN\ROOT\CIMV2:Win32_DiskPartition.DeviceID="Disk #1, Partition #0"...
wmic diskdrive where 'Index=1' get "Caption"
Caption
OCZ-VERTEX4 // Yes, this is my system disk.
此外,当 bootmanager 位于另一个磁盘上时,您对 BootPartition 用法的假设也不正确,例如我的情况:
wmic partition where 'DeviceID like "Disk_#1%"' get DeviceID,BootPartition
BootPartition DeviceID
FALSE Disk #1, Partition #0
wmic partition where 'BootPartition="TRUE"' get DeviceID,BootPartition
BootPartition DeviceID
TRUE Disk #4, Partition #0
TRUE Disk #3, Partition #0
如您所见,对于我的情况,系统磁盘中的任何一个可引导磁盘都没有 Index=0。实际上,对于非系统和不可启动磁盘之一,我有 Index=0。