Is there any way to know whether a GPT disk is the boot disk in the system?

I want to know whether the disk IO is sent to the bootable disk in the disk class filter driver. For MBR style disk, using IOCTL_DISK_GET_PARTITION_INFO_EX can get this information in the target OS(windows7 or later), but for GPT style disk, there is no BootIndicator member in PARTITION_INFORMATION_GPT structure, how can i know whether the GPT style partition disk is the boot disk?

Thanks very much.

Hi,

maybe this helps:

http://msdn.microsoft.com/en-us/library/windows/hardware/gg463525.aspx

http://www.rodsbooks.com/gdisk/booting.html
http://www.rodsbooks.com/gdisk/index.html

best

K.

Well, i try using IOCTL_DISK_GET_DRIVE_LAYOUT_EX and IoGetBootDiskInformation to compare the signature of mbr partition or GUID of gpt partition, but it seems they are never equal, that’s strange, any idea?

Update the status, now i found the problem, in the disk class filter driver, you must call IoGetBootDiskInformation when the IRP_MN_START_DEVICE returned by the lower layer, otherwise, you may can’t get the right boot or system device signature.