Current FreeDOS fdisk utility (Users)
> I recently tried FreeDOS's fdisk utility on a real machine and, to say it
> carefully, IMO this tool needs to be improved.
definitively!
>
> There are currently 2 binaries delivered in the fdisk package:
>
> - FDISK.EXE, version 1.2.1, dated 4/2003
> - FDISK131.EXE, version 1.3.1, dated 11/2008
that's a bug by itself.
by what criteria are users expected to choose the right one?
> On the machine was installed a "normal" WD SATA 1TB HD.
>
> Launching FDISK131, it just emits:
> "Error reading Hard DIsk! Addressed sector not found"
> and exits.
most likely due to
VERSION W98
in the (missing) .INI file. if this is not set, during initialization
if( (flags.version==W95) || (flags.version==W95B) || (flags.version==W98) )
Check_For_INT13_Extensions();
and later it is not able to access some sectors above 2GB and (correctly) exits due to disk I/O error. better save than sorry.
>
> FDISK.EXE starts without error and allows to create a new (primary)
> partition ( I tried size 8192 MB), but it's unable to correctly calculate
> the starting sector, resulting in overlapping partitions:
>
> BI Type Sector Size MB abs.
> Start-End
> -----------------------------------------------------------------------
> 80 83 Linux ext2fs 2048 390701056 190772 2048-390703103
> 00 0c Prim. DOS (FAT32,LBA) 390703104 16777216 8192
> 390703104-407480319
> 00 0c Prim. DOS (FAT32,LBA) 407472660 16787925 8197
> 407472660-424260584
>
> As it can be seen, partition 2 and 3 do overlapp, sectors
> 407,472,660-407,480,319 are part of both partitions.
I still haven't found the precise bug location, but the problem seems to be:
FDISK does all inner computations with cylinders, and simply assumes heads=0 sector = 1.
even reading the partition table, head and sector are basically ignored
Read_Partition_Tables()
{
...
pDrive->pri_part[index].start_sect=1;
pDrive->pri_part[index].start_cyl
=Extract_Cylinder_From_LBA_Value(
pDrive->pri_part[index].rel_sect
,pDrive->pri_part[index].start_head
,pDrive->pri_part[index].start_sect
,pDrive->total_head
,pDrive->total_sect);
pDrive->pri_part[index].end_head=pDrive->total_head;
pDrive->pri_part[index].end_sect=pDrive->total_sect;
pDrive->pri_part[index].end_cyl
=Extract_Cylinder_From_LBA_Value(
/* */
(pDrive->pri_part[index].rel_sect
+pDrive->pri_part[index].num_sect)
,pDrive->pri_part[index].end_head
,pDrive->pri_part[index].end_sect
,pDrive->total_head
,pDrive->total_sect);
now in your partition table,
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
00 00 Free Entry 0/ 0/ 0 0/ 0/ 0 0 0 0
00 00 Free Entry 0/ 0/ 0 0/ 0/ 0 0 0 0
the FDISK cylinder is one larger than the ending cylinder of the first partition.
yes, this is a bug. unfortunately fixing this would probably require a major code change. should be possible.
the real problem here is that code changes in partition creating/deleting/whatever code is dangerous stuff as this risks losing data.
my recommendation: stop using FDISK. there are better alternatives anyway.
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