Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Current FreeDOS fdisk utility (Users)

posted by mceric, Germany, 11.01.2021, 22:20

> I think I understand the problem now, and it's not easy to fix.
>
> for ease of arithmetic, assume a cylinder size of 1000 sectors.
>
> if an existing 4500 sector partition extends from 5200 to 9700, FDISK will
> "round down" this partition to 5000 through 9999, will create the next
> partition at 10000, and everybody is happy.
>
> if an existing 4500 sector partition extends from 5600 to 10100, FDISK will
> "round down" this partition to 5000 through 9999, will create the next
> partition at 10000, and everybody is unhappy (sooner or later).

I do not understand... Why should FDISK "round down" the
start or end of the partition at all? It always has to
round AWAY from the actual start and end of existing
partitions. So in your example, if new partitions are
to have boundaries which are multiples of 1000 sectors,
the previous partition has to end at or before 5000 in
both examples and the next partition has to start at
10000 or later in the first and 11000 or later in the
second example. Rounding to NEAREST cylinder boundaries
seems to be always a bad idea?

Or are you saying the rounding just fails to know whether
it has to be up or rather down at the relevant moment, so
the author decided to simply round to nearest all times?

Regarding your next post: You say it would be hard to mark
clusters in non-FAT filesystems as blocked. My assumption
was that the FDISK bug only makes the END of FAT partitions
overlap later partitions. I was not expecting the bug to
also make the START of FAT partitions overlap non-FAT ones,
but indeed a FAT-based workaround cannot help you there.

I agree that it is a good thing if the KERNEL detects any
overlaps. Which makes me wonder whether it would be easy
to automatically block access to trailing overlapping FAT
clusters? Of course that still will not help you when the
partitions are also accessed by OTHER operating systems, so
a tool to mark overlapping clusters bad still sounds good.

So yes, I do like the suggestion to make the kernel check,
at least as a part of the solution.

---
FreeDOS / DOSEMU2 / ...

 

Complete thread:

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