mkdosfs.8 7.4 KB

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