Jump to content

Corrected FDISK and FORMAT


Petr

Recommended Posts

I have tried to correct wrong display in Windows 98 SE FDISK.EXE and FORMAT.COM.

FDISK.EXE from Q263044 can handle even disks above 137 GB but the display is everywhere limited to 5 digits, on some places the last digit is truncated but most often it appears in the next field and shifts all subsequent values to the right, the result is almost unreadable. The same problem is with FDISK.EXE from Windows Me.

I have increased the display to 6 digits and I hope it works everywhere, please test it. There was too many modifications so I could make a mistake. For sizes >=100GB there is no space between the word before this number and this number, it would be necessary to shorten the text on some place and I think this is acceptable behavior.

FORMAT.COM from Windows 98 SE has limited the size of in the "Formatting.." message to 5 characters before the decimal dot, but including the thousand comma. The result is that the size for disks above 10 GB was shown incorrectly, in very confusing way: If the size was 12,345.67 MB, then the display was 12,34.67 MB - very bad.

It was easy to correct this behavior by extending the size to 6 characters, this correction is already made in Windows Me FORMAT.COM. Unfortunately there is another limit - the size in megabytes is 16-bit integer and therefore the biggest displayable size is 65,535.99 MB. 80 GB disk appears as 10758 MB disk (76293 - 65536).

It would be possible to rewrite the display routine but I'm nit sure if it is worth the effort.

Here are the corrected files, please test:

disktools.zip

Petr

Link to comment
Share on other sites


I have tried to correct wrong display in Windows 98 SE FDISK.EXE and FORMAT.COM.

FDISK.EXE from Q263044 can handle even disks above 137 GB but the display is everywhere limited to 5 digits, on some places the last digit is truncated but most often it appears in the next field and shifts all subsequent values to the right, the result is almost unreadable. The same problem is with FDISK.EXE from Windows Me.

I have increased the display to 6 digits and I hope it works everywhere, please test it. There was too many modifications so I could make a mistake. For sizes >=100GB there is no space between the word before this number and this number, it would be necessary to shorten the text on some place and I think this is acceptable behavior.

FORMAT.COM from Windows 98 SE has limited the size of in the "Formatting.." message to 5 characters before the decimal dot, but including the thousand comma. The result is that the size for disks above 10 GB was shown incorrectly, in very confusing way: If the size was 12,345.67 MB, then the display was 12,34.67 MB - very bad.

It was easy to correct this behavior by extending the size to 6 characters, this correction is already made in Windows Me FORMAT.COM. Unfortunately there is another limit - the size in megabytes is 16-bit integer and therefore the biggest displayable size is 65,535.99 MB. 80 GB disk appears as 10758 MB disk (76293 - 65536).

It would be possible to rewrite the display routine but I'm nit sure if it is worth the effort.

Here are the corrected files, please test:

disktools.zip

Petr

Good work - thx, Petr :thumbup

Link to comment
Share on other sites

Uhm... don't waste your "powers" for proprietary tools (that is ILLEGAL, too):

Free FDISK - The official FDISK of FreeDOS :yes:

...and a lot of the stuff in this forum here violates the EULA, but M$ doesn't seem to care...

However in this case I do recommend Free FDISK since it has some better features.

Link to comment
Share on other sites

Uhm... don't waste your "powers" for proprietary tools (that is ILLEGAL, too):

Free FDISK - The official FDISK of FreeDOS :yes:

At this link is clearly written:

Supports hard disks up to 128GB in size.

I'd not believe in this tool for bigger disks and in general - are you sure that it is 100% compatible with MS-DOS 7.1 and 8.0 and Windows 95/SE/Me?. And do you know it's license? Is it illegal to redistribute it too, I've written to the author and not received the permission to add it to the SESP.

As Mr. Loew explained here approx. year ago, according to DMCA it is legal to patch the software to correct its bugs.

Yes, to be fully compliant with all licenses, it would be better to distribute just patches, not full programs, but since I have seen that even Microsoft recommends http://www.bootdisk.com/ that contains MS fdisk and format utilities I see no reason for it.

Petr

Link to comment
Share on other sites

Does the free FDISK allow for repartitioning without data loss?

No, it does not, it is a (enhanced) version of FDISK, with a GNU license.

@Petr

VERY good work :) , downloading file and bookmarking this and Mdgx link, thanks!

I don't understand however the problem about the

And do you know it's license? Is it illegal to redistribute it too, I've written to the author and not received the permission to add it to the SESP.
it is covered by "standard" GNU GPL, of which this should be the interesting part:
1. You may copy and distribute verbatim copies of the Program's

source code as you receive it, in any medium, provided that you

conspicuously and appropriately publish on each copy an appropriate

copyright notice and disclaimer of warranty; keep intact all the

notices that refer to this License and to the absence of any warranty;

and give any other recipients of the Program a copy of this License

along with the Program.

You may charge a fee for the physical act of transferring a copy, and

you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion

of it, thus forming a work based on the Program, and copy and

distribute such modifications or work under the terms of Section 1

above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices

stating that you changed the files and the date of any change.

b ) You must cause any work that you distribute or publish, that in

whole or in part contains or is derived from the Program or any

part thereof, to be licensed as a whole at no charge to all third

parties under the terms of this License.

c) If the modified program normally reads commands interactively

when run, you must cause it, when started running for such

interactive use in the most ordinary way, to print or display an

announcement including an appropriate copyright notice and a

notice that there is no warranty (or else, saying that you provide

a warranty) and that users may redistribute the program under

these conditions, and telling the user how to view a copy of this

License. (Exception: if the Program itself is interactive but

does not normally print such an announcement, your work based on

the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If

identifiable sections of that work are not derived from the Program,

and can be reasonably considered independent and separate works in

themselves, then this License, and its terms, do not apply to those

sections when you distribute them as separate works. But when you

distribute the same sections as part of a whole which is a work based

on the Program, the distribution of the whole must be on the terms of

this License, whose permissions for other licensees extend to the

entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest

your rights to work written entirely by you; rather, the intent is to

exercise the right to control the distribution of derivative or

collective works based on the Program.

In addition, mere aggregation of another work not based on the Program

with the Program (or with a work based on the Program) on a volume of

a storage or distribution medium does not bring the other work under

the scope of this License.

3. You may copy and distribute the Program (or a work based on it,

under Section 2) in object code or executable form under the terms of

Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable

source code, which must be distributed under the terms of Sections

1 and 2 above on a medium customarily used for software interchange; or,

b ) Accompany it with a written offer, valid for at least three

years, to give any third party, for a charge no more than your

cost of physically performing source distribution, a complete

machine-readable copy of the corresponding source code, to be

distributed under the terms of Sections 1 and 2 above on a medium

customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer

to distribute corresponding source code. (This alternative is

allowed only for noncommercial distribution and only if you

received the program in object code or executable form with such

an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for

making modifications to it. For an executable work, complete source

code means all the source code for all modules it contains, plus any

associated interface definition files, plus the scripts used to

control compilation and installation of the executable. However, as a

special exception, the source code distributed need not include

anything that is normally distributed (in either source or binary

form) with the major components (compiler, kernel, and so on) of the

operating system on which the executable runs, unless that component

itself accompanies the executable.

If distribution of executable or object code is made by offering

access to copy from a designated place, then offering equivalent

access to copy the source code from the same place counts as

distribution of the source code, even though third parties are not

compelled to copy the source along with the object code.

There is no need to "ask for permission" to anybody, but you MUST cite original author, give the source code of your modifications and keep the "Open source" license.

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Uhm... don't waste your "powers" for proprietary tools (that is ILLEGAL, too):

Free FDISK - The official FDISK of FreeDOS :yes:

...and a lot of the stuff in this forum here violates the EULA, but M$ doesn't seem to care...

However in this case I do recommend Free FDISK since it has some better features.

eh, sure some of the "stuff" here may break MS's EULA, but they no longer apply when Win98/ME are no longer supported by M$.

nice work, Petr. will include updated Fdisk.exe & Format.com tools in next release of 98fe SP.

Link to comment
Share on other sites

Uhm... don't waste your "powers" for proprietary tools (that is ILLEGAL, too):

Free FDISK - The official FDISK of FreeDOS :yes:

At this link is clearly written:

Supports hard disks up to 128GB in size.
I'd not believe in this tool for bigger disks and in general - are you sure that it is 100% compatible with MS-DOS 7.1 and 8.0 and Windows 95/SE/Me?. And do you know it's license? Is it illegal to redistribute it too, I've written to the author and not received the permission to add it to the SESP.

As Mr. Loew explained here approx. year ago, according to DMCA it is legal to patch the software to correct its bugs.

Yes, to be fully compliant with all licenses, it would be better to distribute just patches, not full programs, but since I have seen that even Microsoft recommends http://www.bootdisk.com/ that contains MS fdisk and format utilities I see no reason for it.

Petr

great points, Petr. Mr. "patchworks" here doesnt get it. Free FDISK is OUTDATED and cant support HDs beyond 128Gb, hence 48bit LBA support is barely non-existent (or at least buggy) in Free FDISK. And documentation on Free FDISK is kinda lame and does not mention full 48bit LBA support on large HDs.

Link to comment
Share on other sites

Uhm... don't waste your "powers" for proprietary tools (that is ILLEGAL, too):

Free FDISK - The official FDISK of FreeDOS :yes:

At this link is clearly written:

Supports hard disks up to 128GB in size.
I'd not believe in this tool for bigger disks and in general - are you sure that it is 100% compatible with MS-DOS 7.1 and 8.0 and Windows 95/SE/Me?. And do you know it's license? Is it illegal to redistribute it too, I've written to the author and not received the permission to add it to the SESP.
They haven't bothered to update the main page, but just download it and read through the source... it uses 32-bit calculations internally and supports Int13x, i.e. disks up to 2048Gb should be fine with this. I've used it on a 160Gb drive with no problem (this was an even earlier version of FFDISK I used, in the days before I released Enable48BitLBA).

The reason why the author has not replied about this is because it clearly states in the GNU GPL that you can redistribute it...

Yes, to be fully compliant with all licenses, it would be better to distribute just patches, not full programs, but since I have seen that even Microsoft recommends http://www.bootdisk.com/ that contains MS fdisk and format utilities I see no reason for it.
Maybe you should submit your fixed versions to bootdisk.com... Edited by LLXX
Link to comment
Share on other sites

I believe that the free FDISK may work.

I use Ranish Partition Manager if I need to partition something non-standard.

Several years ago when I configured my PC with many different OSes I've noticed that although partitiong seems to be very easy, different utilities write slightly different data to the partition table and partitioning made by one program was considered as invaild by other. I had tested Win98 FDISK, Windows XP partitioning, Linux fdisk, some fdisk delivered with Ghost and maybe some other. The funniest story was that if I used Win98 fdisk, WinXP had no problem in extended partition, but if I used Windows XP partitioning, the system did not boot. I discovered that the difference was the data written to the offset from the start of the disk field - Windows XP partitioning wrote offset from the start of the extended partition instead. (if I remember correctly). There are also differences in the chain of partition tables used for logical disk drives in extended partition. Also some partitioning programs starts all partitions at head 0, sector 1, while others can start (and end) the partition anywhere.

And the biggest problem for me was to determine the right number for each partition (I had about 20 partitions) - different numbering was used by Windows XP in boot.ini (default=multi(0)disk(0)rdisk(0)partition(7)\WINDOWS), Windows XP disk manager shows no numbers and even the ordering is different, Ghost shows different numbers, linux shows different partition numbers (hda1, hda2, ... hda16), terrible experience if you have to configure boot.ini or lilo.conf after moving the OS to different partition or just to determine in Ghost what is the right source and destination partition.

Does anybody know - is there anywhere some good description of this?

Edit: There is also other difference, different FDISKs use different partition type for different tasks.

Petr

Edited by Petr
Link to comment
Share on other sites

In Windows XP Service Pack 2 Deployment Tools is contained oformat.exe, it checks for MS-DOS version 8.00 (Windows Me DOS) and is almost the same. Something is explained here: NTFS Preinstallation and Windows XP

OFORMAT. This utility is based upon the Windows 98 Second Edition FORMAT tool but has these important modifications to allow it to work efficiently in a system manufacturers scripting environment:

• OFORMAT does not prompt for confirmation before formatting a disk.

• OFORMAT does not perform verification of sectors. This makes it significantly faster than the conventional FORMAT utility.

• The new /A command-line option causes OFORMAT to align FAT data clusters at a specified sector. Specifically, the /A:8 option can be used to format the volume so that the FAT data clusters are aligned at 4K boundaries.

Important: Because sectors are 512 bytes, the OFORMAT command must be used with the /A:8 option to create a FAT volume that can be efficiently converted to NTFS.

Even this version (released in 2004) has 65536 MB limit in displaying "Formatting 65,535.99M" message.

Petr

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...