Get Hard Disk Drive Max Heads And Cylinders
- ahmedhalawa
- Member
- Posts: 28
- Joined: Wed Jul 02, 2008 9:28 am
Get Hard Disk Drive Max Heads And Cylinders
How can i get hard disk maximum heads and maximum cylinders?
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Get Hard Disk Drive Max Heads And Cylinders
Read the MBR. It's usually in there, just look for the last block of the last used partition.
Then again, this only works if every chunk of the hard drive is partitioned.
Then again, this only works if every chunk of the hard drive is partitioned.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Get Hard Disk Drive Max Heads And Cylinders
Use the ATA IDENTIFY DEVICE command.
Re: Get Hard Disk Drive Max Heads And Cylinders
And it fails entirely if the MBR uses LBA instead of CHS, or for GPT partitioned drives.Troy Martin wrote:Read the MBR. It's usually in there, just look for the last block of the last used partition.
Then again, this only works if every chunk of the hard drive is partitioned.
A better solution:
- Int 13h AH=08h -- Get Drive Parameters
- Int 13h AH=48h -- Get Extended Drive Parameters
For a little more information: http://en.wikipedia.org/wiki/INT_13