Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Bug confirmed (Users)

posted by tom Homepage, Germany (West), 06.01.2021, 17:31

> The division has no remainder. And so I conclude: FD fdisk tries to align
> the partition's start sector (and size) to a "cylinder" boundary, either
> rounding or skipping remainders. This indeed works - as long as FD fdisk
> handles the MBR exclusively. Linux fdisk, however, doesn't seem to care
> about cylinder boundaries, at least not if the partition type is
> FAT32-LBA.

after taking a look into FDISKs code (PCOMPUTE.C, create_primary_partition() and Determine_Free_Space() )

a) it's really ugly code
b) it looks ok in this respect;
at least it tries to start the next partition at the
end cylinder of the previous partition + 1.
this should automatically round up.
at least that's what I see.
c) all calculations are done with cylinders, with sector=1, head=0.
c) this is a candidate for obfuscated C code contest.


could you post a dump of the partition table or verify yourself if the
ending cylinder of the 2'nd partition corresponds to the LBA value.

 

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