Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

YSDDT 0.1.2 (DOS Toolkit for Working with Disks & Partitions) (Announce)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 30.09.2025, 20:07

MS-DOS v4 to v6 (and v7 in CHS mode) have to know the CHS geometry, and it may have to match what's found in MBR/EPBR/BPB.

> Btw I tried to manually create a primary partition that started at CHS 0,
> 8, 1 (LBA 504 that is 4k aligned) and CHS 1, 0, 1 but PQ magic still
> complained with error 105 or 110, so I don't try fit CHS alignment...

For my tests and the bootimg/partdisk.asm script I found that the most compatible thing is to start primary and logical partitions on a head boundary (CHS x:y:1), start extended partitions on a cylinder boundary (CHS x:0:1), and end all partitions on a cylinder boundary (CHS x:H-1:S).

Quoting from my sources: https://hg.pushbx.org/ecm/bootimg/file/340b7e5286d4/partdisk.asm#l51

> Size is rounded up to the next full sector. Further, partitions are always placed so that their start is on a head boundary (for primary and logical partitions) or so that their start is on a cylinder boundary (for extended partitions). Moreover, the size is always rounded up so that any partition ends on a cylinder boundary. (Extended partitions of type 5 must start on a cylinder boundary for MS-DOS v4 to v7 at least because their UPBs contain an amount of hidden sector within the innermost extended partition and a cylinder adjustment that is added in only after calculating the CHS from the LBA number.)

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22751 Postings in 2119 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum