mkdosfs.8 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .\" -*- nroff -*-
  2. .TH MKDOSFS 8 "5 May 1995" "Version 2.x"
  3. .SH NAME
  4. .B mkdosfs
  5. \- create an MS-DOS file system under Linux
  6. .SH SYNOPSIS
  7. .B mkdosfs|mkfs.msdos|mkfs.vfat
  8. [
  9. .B \-A
  10. ]
  11. [
  12. .B \-b
  13. .I sector-of-backup
  14. ]
  15. [
  16. .B \-c
  17. ]
  18. [
  19. .B \-l
  20. .I filename
  21. ]
  22. [
  23. .B \-C
  24. ]
  25. [
  26. .B \-f
  27. .I number-of-FATs
  28. ]
  29. [
  30. .B \-F
  31. .I FAT-size
  32. ]
  33. [
  34. .B \-h
  35. .I number-of-hidden-sectors
  36. ]
  37. [
  38. .B \-i
  39. .I volume-id
  40. ]
  41. .RB [ " \-I " ]
  42. [
  43. .B \-m
  44. .I message-file
  45. ]
  46. [
  47. .B \-n
  48. .I volume-name
  49. ]
  50. [
  51. .B \-r
  52. .I root-dir-entries
  53. ]
  54. [
  55. .B \-R
  56. .I number-of-reserved-sectors
  57. ]
  58. [
  59. .B \-s
  60. .I sectors-per-cluster
  61. ]
  62. [
  63. .B \-S
  64. .I logical-sector-size
  65. ]
  66. [
  67. .B \-v
  68. ]
  69. .I device
  70. [
  71. .I block-count
  72. ]
  73. .SH DESCRIPTION
  74. .B mkdosfs
  75. is used to create an MS-DOS file system under Linux on a device (usually
  76. a disk partition).
  77. .I device
  78. is the special file corresponding to the device (e.g /dev/hdXX).
  79. .I block-count
  80. is the number of blocks on the device. If omitted,
  81. .B mkdosfs
  82. automatically determines the file system size.
  83. .SH OPTIONS
  84. .TP
  85. .B \-A
  86. Use Atari variation of the MS-DOS file system. This is default if
  87. \fBmkdosfs\fP is run on an Atari, then this option turns off Atari
  88. format. There are some differences when using Atari format: If not
  89. directed otherwise by the user, \fBmkdosfs\fP will always use 2
  90. sectors per cluster, since GEMDOS doesn't like other values very much.
  91. It will also obey the maximum number of sectors GEMDOS can handle.
  92. Larger file systems are managed by raising the logical sector size.
  93. Under Atari format, an Atari-compatible serial number for the
  94. file system is generated, and a 12 bit FAT is used only for file systems
  95. that have one of the usual floppy sizes (720k, 1.2M, 1.44M, 2.88M), a
  96. 16 bit FAT otherwise. This can be overridden with the \fB\-F\fP
  97. option. Some PC-specific boot sector fields aren't written, and a boot
  98. message (option \fB\-m\fP) is ignored.
  99. .TP
  100. .BI \-b " sector-of-backup "
  101. Selects the location of the backup boot sector for FAT32. Default
  102. depends on number of reserved sectors, but usually is sector 6. The
  103. backup must be within the range of reserved sectors.
  104. .TP
  105. .B \-c
  106. Check the device for bad blocks before creating the file system.
  107. .TP
  108. .B \-C
  109. Create the file given as \fIdevice\fP on the command line, and write
  110. the to-be-created file system to it. This can be used to create the
  111. new file system in a file instead of on a real device, and to avoid
  112. using \fBdd\fP in advance to create a file of appropriate size. With
  113. this option, the \fIblock-count\fP must be given, because otherwise
  114. the intended size of the file system wouldn't be known. The file
  115. created is a sparse file, which actually only contains the meta-data
  116. areas (boot sector, FATs, and root directory). The data portions won't
  117. be stored on the disk, but the file nevertheless will have the
  118. correct size. The resulting file can be copied later to a floppy disk
  119. or other device, or mounted through a loop device.
  120. .TP
  121. .BI \-f " number-of-FATs"
  122. Specify the number of file allocation tables in the file system. The
  123. default is 2. Currently the Linux MS-DOS file system does not support
  124. more than 2 FATs.
  125. .TP
  126. .BI \-F " FAT-size"
  127. Specifies the type of file allocation tables used (12, 16 or 32 bit).
  128. If nothing is specified, \fBmkdosfs\fR will automatically select
  129. between 12, 16 and 32 bit, whatever fits better for the file system size.
  130. .TP
  131. .BI \-h " number-of-hidden-sectors "
  132. Select the number of hidden sectors in the volume. Apparently some
  133. digital cameras get indigestion if you feed them a CF card without
  134. such hidden sectors, this option allows you to satisfy them. Assumes
  135. \'0\' if no value is given on the command line.
  136. .TP
  137. .I \-i " volume-id"
  138. Sets the volume ID of the newly created file system;
  139. .I volume-id
  140. is a 32-bit hexadecimal number (for example, 2e24ec82). The default
  141. is a number which depends on the file system creation time.
  142. .TP
  143. .B \-I
  144. Normally you are not allowed to use any 'full' fixed disk devices.
  145. .B mkdosfs
  146. will complain and tell you that it refuses to work. This is different
  147. when using MO disks. One doesn't always need partitions on MO disks.
  148. The file system can go directly to the whole disk. Under other OSes
  149. this is known as the 'superfloppy' format.
  150. This switch will force
  151. .B mkdosfs
  152. to work properly.
  153. .TP
  154. .BI \-l " filename"
  155. Read the bad blocks list from
  156. .IR filename .
  157. .TP
  158. .BI \-m " message-file"
  159. Sets the message the user receives on attempts to boot this file system
  160. without having properly installed an operating system. The message
  161. file must not exceed 418 bytes once line feeds have been converted to
  162. carriage return-line feed combinations, and tabs have been expanded.
  163. If the filename is a hyphen (-), the text is taken from standard input.
  164. .TP
  165. .BI \-n " volume-name"
  166. Sets the volume name (label) of the file system. The volume name can
  167. be up to 11 characters long. The default is no label.
  168. .TP
  169. .BI \-r " root-dir-entries"
  170. Select the number of entries available in the root directory. The
  171. default is 112 or 224 for floppies and 512 for hard disks.
  172. .TP
  173. .BI \-R " number-of-reserved-sectors "
  174. Select the number of reserved sectors. With FAT32 format at least 2
  175. reserved sectors are needed, the default is 32. Otherwise the default
  176. is 1 (only the boot sector).
  177. .TP
  178. .BI \-s " sectors-per-cluster"
  179. Specify the number of disk sectors per cluster. Must be a power of 2,
  180. i.e. 1, 2, 4, 8, ... 128.
  181. .TP
  182. .BI \-S " logical-sector-size"
  183. Specify the number of bytes per logical sector. Must be a power of 2
  184. and greater than or equal to 512, i.e. 512, 1024, 2048, 4096, 8192,
  185. 16384, or 32768.
  186. .TP
  187. .B \-v
  188. Verbose execution.
  189. .SH BUGS
  190. .B mkdosfs
  191. can not create boot-able file systems. This isn't as easy as you might
  192. think at first glance for various reasons and has been discussed a lot
  193. already.
  194. .B mkdosfs
  195. simply will not support it ;)
  196. .SH AUTHOR
  197. Dave Hudson - <dave@humbug.demon.co.uk>; modified by Peter Anvin
  198. <hpa@yggdrasil.com>. Fixes and additions by Roman Hodek
  199. <roman@hodek.net> for Debian/GNU Linux.
  200. .SH ACKNOWLEDGMENTS
  201. .B mkdosfs
  202. is based on code from
  203. .BR mke2fs
  204. (written by Remy Card - <card@masi.ibp.fr>) which is itself based on
  205. .BR mkfs
  206. (written by Linus Torvalds - <torvalds@cs.helsinki.fi>).
  207. .SH SEE ALSO
  208. .BR dosfsck (8),
  209. .BR mkfs (8)