Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Ranish Partition Manager revived (Announce)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 19.11.2022, 21:16

> I am now confused that my BIOS, when querying drive parameters via INT 13
> function 48h returns a totally different geometry in comparison to what
> function 8 returns. While function 8 is giving me CHS values 1024,255,63 as
> expected for a large disk, function 48 seems to passthrough the CHS values
> the IDE controller returns, that is 16383,16,63.
>
> I am now wondering which one to trust when creating partitions and MBR
> entries. My guess would be that I use the geometry returned by function 8
> for compatibility reasons and function 48 to get the disk size (total
> sectors). From both values one could calculate another "virtual" cylinder
> count.
>
> I am missing something essential here or could that be the way to go
> forward?

I think both geometries are essentially fictional.

13.08 is the way to go for things that expect to use CHS access functions, because it should match what these functions (13.02 and 13.03) use. This includes old loaders and OSes. Therefore this also includes the CHS triplets in the MBR partition table entries, as well as the H and S values in a FAT FS's BPB. (But note that one controller + ROM-BIOS combo could use different geometry than another combo for the same disk.)

The 13.48 function is documented as giving a "physical" geometry with three dwords but I believe this is mostly fictional as well. It may fit what the controller uses or not. In any case, there's an amount of total sectors qword which you can use to get the exact size of the disk without any geometry calculations. And for the 13.4x functions you do only need the Logical Block numbers, and therefore only the total blocks amount, not the "physical geometry".

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22632 Postings in 2109 Threads, 402 registered users, 411 users online (0 registered, 411 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum