Page 1 of 1
Reading big Hard Drives?
Posted: Wed Mar 05, 2003 9:03 pm
by Unspoken_Magi
How can I read a huge hard drive? (120Gig)
BIOS calls won't work...
Using ports doesn't work... (I think)
Do I have to use a "manufacturer's specified" way? (such as reading a different port, etc.)
Also, how can I partition drives bigger than the LBA field allows? The LBA only allows for 4 Gig.
Can a MBR load a partition that is somewhere above 4Gig?
If so, how?
Re:Reading big Hard Drives?
Posted: Thu Mar 06, 2003 4:41 pm
by Unspoken_Magi
Anyone? I really need this soon, its holding me up. I don't want to use a cheap hack for the MBR anymore...
Re:Reading big Hard Drives?
Posted: Thu Mar 06, 2003 7:11 pm
by Tim
Program the IDE controller directly. Forget the BIOS.
If you're talking about your MBR code, put in a disclaimer that says, "we don't support booting from partitions beyond xxx MB".
Re:Reading big Hard Drives?
Posted: Thu Mar 06, 2003 7:28 pm
by Unspoken_Magi
Tim Robinson wrote:
Program the IDE controller directly. Forget the BIOS.
If you're talking about your MBR code, put in a disclaimer that says, "we don't support booting from partitions beyond xxx MB".
Yes, but how can you even HAVE partitions past 4Gb or larger than 4 Gb... The LBA fields in the MBR are dwords...
Re:Reading big Hard Drives?
Posted: Thu Mar 06, 2003 9:05 pm
by Curufir
The last two fields in the partition entry in a standard MBR are offset into drive, and size of partition. Both are 4 bytes long, and measured in sectors.
This gives you a maximum partition size of 2^32 sectors, with the final partition being offset a possible 2^32 sectors into the disk.
Therefore the maximum size disk you can describe with the MBR is 4 Terabytes (Offset plus size) with a maximum partition size of 2 Terabytes (Assuming 512 byte sectors). I you happen to possess a 4 terabyte drive then hire someone else to write your OS, apparently you're rich enough ;D.
Int 13h uses CHS so it hits a limit which means communicating directly through the IDE ports to load sectors beyond the so called BIOS limit as Tim has already suggested.