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 boeckmann, Aachen, Germany, 23.11.2022, 15:38

> You can do that, but of course when they see a disk >8GB in CHS mode it
> will just look like it's 8GB. I personally think the default view should
> be LBA and CHS should just be for "informational" purposes (but things
> should appear red when the numbers don't agree).
>
My current implementation is that in CHS mode you see the adjusted CHS values (cylinder can be over 1023) calculated from LBA value. Otherwise the values would always "be red" because of CHS LBA disagree. When storing the MBR to disk the CHS value gets set to the largest possible value 1023/255/63 if the 8GB bounds gets excceded to indicate an error condition. I am not 100% sure yet it is the best possible solution. But initial testing shows it is working well. In the next time I will examine how MS-DOS 7.1 FDISK is handling this case. I think it is best to follow the Microsoft way here.

> I discovered as I have been writing by USBDRIVE program that you really
> can't trust much of anything a disk tells you, particularly when comparing
> LBA to the various CHS values (MBR, PBR/VBR, GPT, BPB, ...). You will find
> the same entries for various places even on the same disk don't agree with
> each other. I've even found some USB disks that don't report the correct
> LBA value. That is, one of the parameters that is returned by the
> low-level functions is the Maximum LBA which should always be an odd number
> since the total number of sectors should always be even and LBA numbering
> starts at zero. Some disks actually return the total number of sectors
> (which is the Maximum LBA + 1) which must be adjusted.
Thanks that is a very good hint. I will incorporate that to the LBA disk size detection.

 

Complete thread:

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