Current FreeDOS fdisk utility (Users)
> exactly. You do not understand.
Indeed. So if it rounds the start of existing partitions
down and the end of existing partitions up, it sounds as
if it would do the right thing, but obviously it does not.
> It could help to read the relevant source code; search for
> Read_Partitiontables().
That would be in PDISKIO.C in version 132 (!) lines 781-1241,
first 919-967 depending on whether LBA is supported AND used:
In the LBA case, Extract_Cylinder_From_LBA_Value is used and
the code just ASSUMES that start is head 0, sect 1, end is
head max, sect max instead of CONVERTING from LBA values, as
a rather crude method for rounding DOWN or UP.
Also 1016-1092 for extended partitions and the logical chain
inside those, again with that fixed down and up rounding trick,
but due to the RELATIVE nature of chained logical partitions,
this seems more problematic than for primary partitions? Then,
a THIRD very similar copy of the same code from 1100-1166 and
again the same rounding style and AGAIN RELATIVE chaining.
(also, there is a silly typo: "easilly")
Note that Extract_Cylinder_From_LBA_Value seems to use long
instead of unsigned long for the LBA value?? The formula:
( ( (lba_value-(sector-1)) / total_sectors ) - head ) / (total_heads+1)
So if my intuition is right, one would want the Extract_...
code to use UNSIGNED LONG lba_value and would want to make
the processing of LOGICAL partitions use EXACT LBA values
for "walking the chain" and only do the rounding down or up
to the appropriate cylinder boundary AFTER that. As opposed
to first rounding (floor-ing/ceil-ing), then adding relative
offsets, then rounding (...) again. Is that the origin of
the bug that I had failed to understand in your description?
Interestingly, I not only have fdisk 1.2.0, 1.2.1 and 1.3.1
but also fdisk132.zip here (2009-06-08) but we only talk
about 1.2.1 and 1.3.1 in this thread?
> > ... My assumption
> > was that the FDISK bug only makes the END of FAT partitions
> > overlap later partitions.
I had written "FAT" there but mean "partitions created
using this version of FDISK" in that context.
> I really doubt other OS will implement code not to overwrite
> partitions created by some buggy FDISK.
Just wondered whether FreeDOS itself should do that, because
just refusing to use overlapping partitions at all might be
a bit harsh if too many users have them. So if the kernel can
automatically block itself from writin to overlapping zones...
About the versions:
Version 1.3.2 The CHECKEXTRA option has been defaulted to "false".
6/08/2009
The carry flag is no longer checked when checking for LBA
as there have been some problems reported with some BIOS's
and the carry flag checking. In addition, the carry flag
checking is redundant.
A bug has been fixed that displayed an error message
after the partition table(s) had been successfully written.
Additional debugging code has been added for drive scanning.
But also:
Future changes planned for Version 1.3.2:
-----------------------------------------------------------------------------
TO-DO Change the int 0x13 extension determination code.
Add the partition id bytes.
And:
Version History:
-----------------------------------------------------------------------------
Version 1.3.1 The MBR is no longer automatically written if the expected
11/04/2008 MBR is not found. The MBR is now only written by using
the command line switches.
Various warnings have been cleaned up in order to fix the
command-line compile. One fix to the makefile remains.
Error handling has been added in order to accomodate hard
disk and/or controller errors.
Version 1.3.0 Bug fixes provided by H. Peter Anvin in order to fix a
7/17/2003 problem with the interrupt 0x13 extensions detection code.
Version 1.2.1 Some clean-ups of help screens.
04/06/2003
Fixed a bug that prevented all FAT32 boot sector information
from being erased when a new partition is created that starts
at the exact same location as an old FAT32 partition.
Version 1.2.0 Improved the algorithms that calculate the partition size by
03/04/2003 percentage, when utilizing the command-line.
Improved the command-line help screens.
Fixed the bug that prevented the deletion of non-dos
partition types.
---
FreeDOS / DOSEMU2 / ...
Complete thread:
- Current FreeDOS fdisk utility - Japheth, 01.01.2021, 20:51
- Current FreeDOS fdisk utility - RayeR, 01.01.2021, 23:45
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 02:54
- Current FreeDOS fdisk utility - RayeR, 02.01.2021, 03:17
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 03:26
- Current FreeDOS fdisk utility - rr, 02.01.2021, 12:44
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 15:41
- Current FreeDOS fdisk utility - rr, 05.01.2021, 21:46
- Current FreeDOS fdisk utility - Japheth, 06.01.2021, 11:03
- Current FreeDOS fdisk utility - tom, 06.01.2021, 16:34
- Forum monospaced font bug - ecm, 06.01.2021, 16:54
- Current FreeDOS fdisk utility - Japheth, 06.01.2021, 17:14
- Current FreeDOS fdisk utility - rr, 07.01.2021, 23:49
- Current FreeDOS fdisk utility - ecm, 08.01.2021, 00:04
- Current FreeDOS fdisk utility - mceric, 08.01.2021, 01:18
- Current FreeDOS fdisk utility - rr, 08.01.2021, 22:21
- Current FreeDOS fdisk utility - mceric, 09.01.2021, 01:49
- Current FreeDOS fdisk utility - rr, 08.01.2021, 22:21
- Current FreeDOS fdisk utility - Japheth, 08.01.2021, 05:05
- Current FreeDOS fdisk utility - tom, 08.01.2021, 13:53
- Current FreeDOS fdisk utility - Japheth, 08.01.2021, 22:51
- BBCode code tag - rr, 08.01.2021, 23:24
- BBCode code tag - Japheth, 09.01.2021, 05:24
- BBCode code tag - rr, 09.01.2021, 19:56
- BBCode code tag - Japheth, 10.01.2021, 02:22
- BBCode code tag - rr, 10.01.2021, 15:16
- BBCode code tag - Japheth, 10.01.2021, 02:22
- BBCode code tag - rr, 09.01.2021, 19:56
- BBCode code tag - Japheth, 09.01.2021, 05:24
- BBCode code tag - rr, 08.01.2021, 23:24
- Current FreeDOS fdisk utility - Japheth, 08.01.2021, 22:51
- Current FreeDOS fdisk utility - rr, 08.01.2021, 22:02
- Current FreeDOS fdisk utility - tom, 08.01.2021, 13:53
- Current FreeDOS fdisk utility - rr, 07.01.2021, 23:49
- Current FreeDOS fdisk utility - glennmcc, 06.01.2021, 19:01
- Current FreeDOS fdisk utility - glennmcc, 06.01.2021, 19:17
- Current FreeDOS fdisk utility - tom, 06.01.2021, 16:34
- Current FreeDOS fdisk utility - Japheth, 06.01.2021, 11:03
- Current FreeDOS fdisk utility - rr, 05.01.2021, 21:46
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 15:41
- Current FreeDOS fdisk utility - rr, 02.01.2021, 12:44
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 03:26
- Current FreeDOS fdisk utility - RayeR, 02.01.2021, 03:17
- Current FreeDOS fdisk utility - rr, 08.01.2021, 23:52
- Current FreeDOS fdisk utility - boeckmann, 22.03.2023, 15:45
- Current FreeDOS fdisk utility - kerravon, 24.03.2023, 02:28
- Current FreeDOS fdisk utility - tom, 24.03.2023, 18:47
- Current FreeDOS fdisk utility - tom, 24.03.2023, 18:49
- Current FreeDOS fdisk utility - Rugxulo, 25.03.2023, 03:18
- Current FreeDOS fdisk utility - kerravon, 24.03.2023, 02:28
- Current FreeDOS fdisk utility - boeckmann, 22.03.2023, 15:45
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 02:54
- Current FreeDOS fdisk utility - rr, 02.01.2021, 12:50
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - mceric, 02.01.2021, 16:13
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - ecm, 02.01.2021, 17:21
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - mceric, 02.01.2021, 20:23
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - tom, 09.01.2021, 19:56
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - mceric, 10.01.2021, 00:40
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - tom, 09.01.2021, 19:56
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - mceric, 02.01.2021, 20:23
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - ecm, 02.01.2021, 17:21
- Current FreeDOS fdisk utility - other FreeDOS bugs and fixes - mceric, 02.01.2021, 16:13
- Current FreeDOS fdisk utility - Japheth, 02.01.2021, 15:39
- Current FreeDOS fdisk utility - marcov, 02.01.2021, 16:56
- Bug confirmed - Japheth, 03.01.2021, 11:16
- Bug confirmed - tom, 03.01.2021, 15:45
- Bug confirmed - Japheth, 03.01.2021, 20:40
- Bug confirmed - tom, 06.01.2021, 17:31
- Bug confirmed - Japheth, 06.01.2021, 18:16
- Bug confirmed - RayeR, 16.01.2021, 05:14
- Bug confirmed - tom, 16.01.2021, 12:01
- Bug confirmed - RayeR, 16.01.2021, 05:14
- Bug confirmed - rr, 07.01.2021, 23:48
- Bug confirmed - Japheth, 06.01.2021, 18:16
- Bug confirmed - tom, 03.01.2021, 15:45
- Current FreeDOS fdisk utility - tom, 10.01.2021, 19:10
- Current FreeDOS fdisk utility - Japheth, 11.01.2021, 11:49
- Current FreeDOS fdisk utility - mceric, 11.01.2021, 14:16
- Current FreeDOS fdisk utility - tom, 11.01.2021, 20:11
- Current FreeDOS fdisk utility - Ringding, 13.01.2021, 12:09
- Current FreeDOS fdisk utility - tom, 11.01.2021, 20:11
- Current FreeDOS fdisk utility - rr, 11.01.2021, 18:12
- Current FreeDOS fdisk utility - tom, 11.01.2021, 19:57
- Current FreeDOS fdisk utility - mceric, 11.01.2021, 22:20
- Current FreeDOS fdisk utility - tom, 11.01.2021, 23:13
- Current FreeDOS fdisk utility - mceric, 12.01.2021, 02:51
- Current FreeDOS fdisk utility - mceric, 12.03.2021, 16:13
- Current FreeDOS fdisk utility - tom, 14.03.2021, 21:14
- Current FreeDOS fdisk utility - tom, 11.01.2021, 23:13
- Current FreeDOS fdisk utility - tom, 15.01.2021, 22:37
- Current FreeDOS fdisk utility - Japheth, 16.01.2021, 18:56
- Current FreeDOS fdisk utility - tom, 17.01.2021, 14:58
- Current FreeDOS fdisk utility - RayeR, 17.01.2021, 21:24
- Current FreeDOS fdisk utility - tom, 18.01.2021, 10:19
- Current FreeDOS fdisk utility - RayeR, 21.01.2021, 02:57
- Current FreeDOS fdisk utility - tom, 23.01.2021, 19:14
- Current FreeDOS fdisk utility - RayeR, 23.01.2021, 20:51
- Current FreeDOS fdisk utility - tom, 23.01.2021, 21:18
- Current FreeDOS fdisk utility - RayeR, 26.01.2021, 04:01
- Current FreeDOS fdisk utility - tom, 26.01.2021, 18:46
- Current FreeDOS fdisk utility - Japheth, 28.01.2021, 22:21
- Current FreeDOS fdisk utility - tom, 28.01.2021, 22:35
- Current FreeDOS fdisk utility - RayeR, 29.01.2021, 00:58
- Current FreeDOS fdisk utility - tom, 30.01.2021, 17:09
- Current FreeDOS fdisk utility - rr, 31.01.2021, 12:07
- Current FreeDOS fdisk utility - RayeR, 01.02.2021, 12:51
- Current FreeDOS fdisk utility - tom, 01.02.2021, 13:53
- Current FreeDOS fdisk utility - tom, 01.02.2021, 14:54
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 07:28
- Current FreeDOS fdisk utility - Japheth, 02.02.2021, 08:59
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 13:18
- Current FreeDOS fdisk utility - tom, 02.02.2021, 15:59
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 19:40
- Current FreeDOS fdisk utility - RayeR, 03.02.2021, 04:05
- Current FreeDOS fdisk utility - tom, 09.02.2021, 17:35
- Current FreeDOS fdisk utility - Japheth, 10.02.2021, 06:45
- Current FreeDOS fdisk utility - RayeR, 11.02.2021, 19:03
- Current FreeDOS fdisk utility - RayeR, 12.02.2021, 02:44
- Current FreeDOS fdisk utility - Japheth, 10.02.2021, 06:45
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 19:40
- Current FreeDOS fdisk utility - tom, 02.02.2021, 15:59
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 13:18
- Current FreeDOS fdisk utility - Japheth, 02.02.2021, 08:59
- Current FreeDOS fdisk utility - RayeR, 02.02.2021, 07:28
- Current FreeDOS fdisk utility - tom, 30.01.2021, 17:09
- Current FreeDOS fdisk utility - Japheth, 29.01.2021, 06:37
- Current FreeDOS fdisk utility - Ringding, 29.01.2021, 09:30
- Current FreeDOS fdisk utility - Japheth, 29.01.2021, 15:19
- Current FreeDOS fdisk utility - Ringding, 29.01.2021, 09:30
- Current FreeDOS fdisk utility - RayeR, 29.01.2021, 00:58
- Current FreeDOS fdisk utility - tom, 28.01.2021, 22:35
- Current FreeDOS fdisk utility - RayeR, 26.01.2021, 04:01
- Current FreeDOS fdisk utility - tom, 23.01.2021, 21:18
- Current FreeDOS fdisk utility - RayeR, 23.01.2021, 20:51
- Current FreeDOS fdisk utility - tom, 18.01.2021, 10:19
- Current FreeDOS fdisk utility - RayeR, 17.01.2021, 21:24
- Current FreeDOS fdisk utility - mceric, 11.01.2021, 22:20
- Current FreeDOS fdisk utility - mceric, 11.01.2021, 14:16
- Current FreeDOS fdisk utility - Japheth, 11.01.2021, 11:49
- Current FreeDOS fdisk utility - RayeR, 01.01.2021, 23:45