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), 16.01.2021, 12:01

> Would't you try to compare the partition creation using MS-DOS 6.2x FDISK
> (on smaller partition) if it lead to same problem?
>
> BI Type                    Start-C/H/S   End-C/H/S     Sector     Size   
> MB  abs. Start/End
> ----------------------------------------------------------------------------------------------
> 80 0e Prim. DOS,FAT16,LBA     0/  1/ 1  975/ 63/32         32    4096000
> 2000 32-4096031
> 00 0c Prim. DOS,FAT32,LBA   976/  0/ 1  534/ 63/32    4096000  120731648
> 58951
>

> Well I see the problem here. It's tricky that cylinder value already
> overflows 10bit storage in partition entry. One simple approach would be to
> start next partition just by incrementing the cylinder of previous end
> value (975+1)&0x3FF=976.

fortunately, this is not the way FDISK works. all internal work is done with (unfortunately signed) 32 bit cylinders.
otherwise, it would have failed much earlier.

> Other approach would be to calculate CHS from LBA
> value. Last LBA is 4096031 so next partition should start at LBA 4096032 or
> further. If one do simple calculation like 4096032/64/32=2000.015625 and
> truncate it to 2000 then & 3FF = 976 and things goes wrong. It should check
> the reminder and round up to 2001 then & 3FF = 977. Back to LBA it would
> give 4098048 so ~1MB wasted gap but better than overlap.


impressive insights.
however, FDISK already tries to work this way; I'm simply not able to spot where it fails.

 

Complete thread:

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