blob: 5bd9b21b3730ce2ec5be940fd894a403e8c4ac51 [file] [log] [blame]
Matt Mower18794c82015-11-11 16:22:45 -06001mkdosfs - Make DOS filesystem utilty.
bigbiff bigbiff9c754052013-01-09 09:09:08 -05002
3
4I wrote this, partially to complement the dosfsck utility written by Werner
5Almesberger (who graciously gave me some pointers when I asked for some
6advice about writing this code), and also to avoid me having to boot DOS
7just to create data partitions (I use Linux to back up DOS :-) ).
8
9The code is really derived from Remy Card's mke2fs utility - I used this as a
Matt Mower18794c82015-11-11 16:22:45 -060010framework, although all of the filesystem specific stuff was removed and the
bigbiff bigbiff9c754052013-01-09 09:09:08 -050011DOS stuff inserted. I believe originally mke2fs was based on Linus' mkfs
12code, hence the acknowledgements in the source code.
13
14Neither Remy nor Linus have had any involvement with mkdosfs, so if there are
15any bugs they're almost certainly "all my own work".
16
17The code has been available for ftp since 1st September 1993, and I have yet
18to receive any bug reports from users. I don't know of any bugs, but if you
19do find a bug or have any constructive comments, please mail me!
20
21The only bug I found with version 0.1 was an obscure fault that could lead
22to an invalid (for MS-DOS, not Linux's dos fs) number of sectors used in the
23file allocation table(s).
24
25
26Dave Hudson
27dave@humbug.demon.co.uk
28
29
30FAT32 support
31=============
32
33mkdosfs now can also create filesystems in the new FAT32 format. To do
34this, give mkdosfs a "-F 32" option. FAT32 isn't selected
35automatically (yet), even if very large clusters are needed with
36FAT16. With FAT32 you have two additional options, -R to select the
37number of reserved sectors (usually 32), and -b to select the location
38of the backup boot sector (default 6). Of course such a backup is
39created, as well as the new info sector. On FAT32, the root directory
40is always created as a cluster chain. Sorry, there's no switch to
41generate an old static root dir.
42
43One bigger bug fix besides FAT32 was to reject filesystems that need a
4416 bit FAT to fit all possible clusters, but the bigger FAT needs some
45more sectors, so the total number of clusters drop below the border
46where MS-DOS expects a 12 bit FAT. So such filesystems would be FAT16,
47but interpreted as FAT32 by DOS. The fix is to reduce filesystem size
48a bit.
49
50- Roman <roman@hodek.net>