I am attempting to write a procedure that will return the size of a given IDE drive.
I've looked through the ATA/ATAPI-6 specification and think that the READ NATIVE MAX ADDRESS and/or READ NATIVE MAX ADDRESS EXT are what I'm looking for.
Unfortunately, I'm unsure as to how to use them, or if I'm even on the right track. Any help would be greatly appreciated.
Determining the size of an IDE drive
Re:Determining the size of an IDE drive
Hi,
You should look at the identify command. It contains the total amount of cylinders, heads and sectors. More information is available in the ATA/ATAPI-6 specification.
DennisCGc.
You should look at the identify command. It contains the total amount of cylinders, heads and sectors. More information is available in the ATA/ATAPI-6 specification.
DennisCGc.
Re:Determining the size of an IDE drive
I've gotten Identify Device (for pulling the drive model), but I thought that the size gotten from C/H/S was limited? I need this to work for large drives (200Gb+). Thanks for the help.
Re:Determining the size of an IDE drive
Hi,
HTH,
DennisCGc.
Well, IIRC in the new specification some fields are obsolete. (which indeed contained the CHS information). From my experience the CHS information is still there. But if you want to have support for harddisks > 128 GB, you should rely on the "WORD 100-103" field.jair wrote: I've gotten Identify Device (for pulling the drive model), but I thought that the size gotten from C/H/S was limited? I need this to work for large drives (200Gb+). Thanks for the help.
So in short: normally you should read the Max. user lba.... field, but to be backwards-compatible you also should read the 'obsolete' fields. Which I don't remember (thought word 1,3 and 6, will have a look at my driver)100-103 O V Maximum user LBA for 48-bit Address feature set.
HTH,
DennisCGc.
Re:Determining the size of an IDE drive
Heh, didn't know that was in there... Guess I should read more carefully ::) I'll it a shot. Thanks!DennisCGc wrote:100-103 O V Maximum user LBA for 48-bit Address feature set.