Writing a GPT driver for Windows XP

I saw an OSR article inviting people to email questions about Windows file system driver development. After emailing OSR, Dan Root suggested that I post my message here. I’d like to ask if anyone can tell me a bit about writing a GPT driver for Windows XP. I realize that’s a little different because it’s a partition table rather than a file system, but I know it’s possible because Paragon used to offer such a driver.

I know Windows XP supports 48-bit LBA, but I remember hearing that the 32-bit version can only use 32 bits out of 48. Is it possible for a driver on Windows XP x86 to address hard drive sectors using all 48 bits? If so, how hard would it be to write a GPT driver for Windows XP?

writing a GPT driver for Windows XP

We don’t write drivers in Windows for partitions… we write them for devices, like disks or whatever.

Step back a moment, please, and tell us … from the beginning… what you’re trying to do and why you think you need to write a “GPT driver”.

Peter

I would like to create a GPT reader for Windows XP and it seems like writing a driver is how it’s done. I know that Windows XP x86 is limited with how it handles drives above 2.2 TiB. Is Windows XP x86 able to access only 32 bits when doing LBA, or can it use all 48 bits? If it can, then I might be able to create a GPT loader for big drives.

Is Windows XP x86 able to access only 32 bits when doing LBA

Windows XP? Seriously?

OK… OK… so… no. Windows XP 32-bit does not support GPT disks. Full stop. You can’t write a “GPT driver” or any other type of driver to overcome this limitation. It’s baked into too many pieces of the software. We don’t have drivers for disk formats on Windows. IIRC, Windows XP 64-bit does allow you to access some GPT disks, but the support isn’t complete, or something. I don’t remember.

You have to know that I’m going to ask why you’d care about XP, right? I mean… it’s an ancient bit of software that doesn’t support anything remotely considered “modern.”

Peter

I was wondering if there was a way to just present a drive letter and have my driver handle all accesses. I’m not sure if that makes sense or is even possible.

Regarding why I want to target XP, I still use it sometimes for old computers and for doing backups with a WinPE disc. I have a Seagate 8TB drive from 2015 that is Windows XP-compatible, but Seagate stopped making them like that so I hoped there would be a way, other than NAS, to access 512-byte sectors above 2.2 TiB.

OK… so, now I’m (finally) starting to understand what you want to do. And you’re adopting this terminology “GPT Loader” from the Paragon utility of that name.

so I hoped there would be a way, other than NAS, to access 512-byte sectors above 2.2 TiB

Well, you could just attach the drive and read its contents using SCSI Pass Through (SPTI), I guess.

I dunno. If it were me, I’d plug the drive into a Win10 system and be done with it. I’m not sure why that’s not an option for you.

P

Can you tell me about how a driver would read disk sectors? There must be functions for finding out how many sectors there are, and specifying which ones to access during a read operation. I just wonder if the API calls are limited to 32 bits.

You can do it all in user mode.

Google SCSI Pass Through and the various disk ioctls (IOCTL_DISK_GET__LENGTH_INFO).

To be clear, you’ll be directly reading sectors from the drive this way… I’m assuming that’s what you want to do…

Peter

Thank you for the advice. I Googled SPTI earlier but I found a bit more about it just now. I’m not sure yet but it looks like I could issue these commands to a SATA rather than SCSI drive.