blob: a83cab9c5cf2d4a4249a4c1e270c7effcc444802 [file] [log] [blame]
Steve Kondik2111ad72013-07-07 12:07:44 -07001.\" Copyright (c) 2001\-2006 Anton Altaparmakov.
2.\" Copyright (c) 2005 Richard Russon.
3.\" Copyright (c) 2005\-2006 Szabolcs Szakacsits.
4.\" This file may be copied under the terms of the GNU Public License.
5.\"
6.TH MKNTFS 8 "January 2006" "ntfs-3g @VERSION@"
7.SH NAME
8mkntfs \- create an NTFS file system
9.SH SYNOPSIS
10.B mkntfs
11[\fIoptions\fR] \fIdevice \fR[\fInumber\-of\-sectors\fR]
12.PP
13.B mkntfs
14[
15.B \-C
16]
17[
18.B \-c
19.I cluster\-size
20]
21[
22.B \-F
23]
24[
25.B \-f
26]
27[
28.B \-H
29.I heads
30]
31[
32.B \-h
33]
34[
35.B \-I
36]
37[
38.B \-L
39.I volume\-label
40]
41[
42.B \-l
43]
44[
45.B \-n
46]
47[
48.B \-p
49.I part\-start\-sect
50]
51[
52.B \-Q
53]
54[
55.B \-q
56]
57[
58.B \-S
59.I sectors\-per\-track
60]
61[
62.B \-s
63.I sector\-size
64]
65[
66.B \-T
67]
68[
69.B \-U
70]
71[
72.B \-V
73]
74[
75.B \-v
76]
77[
78.B \-z
79.I mft\-zone\-multiplier
80]
81[
82.B \-\-debug
83]
84.I device
85[
86.I number\-of\-sectors
87]
88.SH DESCRIPTION
89.B mkntfs
90is used to create an NTFS file system on a device (usually a disk partition)
91or file.
92.I device
93is the special file corresponding to the device (e.g
94.IR /dev/hdXX ).
95.I number\-of\-sectors
96is the number of sectors on the device. If omitted,
97.B mkntfs
98automagically figures the file system size.
99.SH OPTIONS
100Below is a summary of all the options that
101.B mkntfs
102accepts. Nearly all options have two equivalent names. The short name is
103preceded by
104.B \-
105and the long name is preceded by
106.BR \-\- .
107Any single letter options, that don't take an argument, can be combined into a
108single command, e.g.
109.B \-fv
110is equivalent to
111.BR "\-f \-v" .
112Long named options can be abbreviated to any unique prefix of their name.
113.SS Basic options
114.TP
115\fB\-f\fR, \fB\-\-fast\fR, \fB\-Q\fR, \fB\-\-quick\fR
116Perform quick (fast) format. This will skip both zeroing of the volume and bad
117sector checking.
118.TP
119\fB\-L\fR, \fB\-\-label\fR STRING
120Set the volume label for the filesystem.
121.TP
122\fB\-C\fR, \fB\-\-enable\-compression\fR
123Enable compression on the volume.
124.TP
125\fB\-n\fR, \fB\-\-no\-action\fR
126Causes
127.B mkntfs
128to not actually create a filesystem, but display what it would do if it were
129to create a filesystem. All steps of the format are carried out except the
130actual writing to the device.
131.SS Advanced options
132.TP
133\fB\-c\fR, \fB\-\-cluster\-size\fR BYTES
134Specify the size of clusters in bytes. Valid cluster size values are powers of
135two, with at least 256, and at most 65536 bytes per cluster. If omitted,
136.B mkntfs
137uses 4096 bytes as the default cluster size.
138.sp
139Note that the default cluster size is set to be at least equal to the sector
140size as a cluster cannot be smaller than a sector. Also, note that values
141greater than 4096 have the side effect that compression is disabled on the
142volume (due to limitations in the NTFS compression algorithm currently in use
143by Windows).
144.TP
145\fB\-s\fR, \fB\-\-sector\-size\fR BYTES
146Specify the size of sectors in bytes. Valid sector size values are 256, 512,
1471024, 2048 and 4096 bytes per sector. If omitted,
148.B mkntfs
149attempts to determine the
150.I sector\-size
151automatically and if that fails a default of 512 bytes per sector is used.
152.TP
153\fB\-p\fR, \fB\-\-partition\-start\fR SECTOR
154Specify the partition start sector. The maximum is 4294967295 (2^32\-1). If
155omitted,
156.B mkntfs
157attempts to determine
158.I part\-start\-sect
Steve Kondike68cb602016-08-28 00:45:36 -0700159automatically and if that fails or the value is oversized, a
160default of 0 is used. The partition is usable despite a wrong value,
161however note that a correct
Steve Kondik2111ad72013-07-07 12:07:44 -0700162.I part\-start\-sect
163is required for Windows to be able to boot from the created volume.
164.TP
165\fB\-H\fR, \fB\-\-heads\fR NUM
166Specify the number of heads. The maximum is 65535 (0xffff). If omitted,
167.B mkntfs
168attempts to determine the number of
169.I heads
170automatically and if that fails a default of 0 is used. Note that
171.I heads
172is required for Windows to be able to boot from the created volume.
173.TP
174\fB\-S\fR, \fB\-\-sectors\-per\-track\fR NUM
175Specify the number of sectors per track. The maximum is 65535 (0xffff). If
176omitted,
177.B mkntfs
178attempts to determine the number of
179.I sectors\-per\-track
180automatically and if that fails a default of 0 is used. Note that
181.I sectors\-per\-track
182is required for Windows to be able to boot from the created volume.
183.TP
184\fB\-z\fR, \fB\-\-mft\-zone\-multiplier\fR NUM
185Set the MFT zone multiplier, which determines the size of the MFT zone to use
186on the volume. The MFT zone is the area at the beginning of the volume reserved
187for the master file table (MFT), which stores the on disk inodes (MFT records).
188It is noteworthy that small files are stored entirely within the inode;
189thus, if you expect to use the volume for storing large numbers of very small
190files, it is useful to set the zone multiplier to a higher value. Note, that
191the MFT zone is resized on the fly as required during operation of the NTFS
192driver but choosing a good value will reduce fragmentation. Valid values
193are 1, 2, 3 and 4. The values have the following meaning:
194.TS
195box;
196lB lB
197lB lB
198c l.
199MFT zone MFT zone size
200multiplier (% of volume size)
2011 12.5% (default)
2022 25.0%
2033 37.5%
2044 50.0%
205.TE
206.sp
207.TP
208\fB\-T\fR, \fB\-\-zero\-time\fR
209Fake the time to be 00:00:00 UTC, Jan 1, 1970 instead of the current system
210time. This is only really useful for debugging purposes.
211.TP
212\fB\-U\fR, \fB\-\-with\-uuid\fR
213Generate a random volume UUID.
214.TP
215\fB\-I\fR, \fB\-\-no\-indexing\fR
216Disable content indexing on the volume. (This is only meaningful on
217Windows 2000 and later. Windows NT 4.0 and earlier ignore this as they do
218not implement content indexing at all.)
219.TP
220\fB\-F\fR, \fB\-\-force\fR
221Force
222.B mkntfs
223to run, even if the specified
224.I device
225is not a block special device, or appears to be mounted.
226.SS Output options
227.TP
228\fB\-q\fR, \fB\-\-quiet\fR
229Quiet execution; only errors are written to stderr, no output to stdout
230occurs at all. Useful if
231.B mkntfs
232is run in a script.
233.TP
234\fB\-v\fR, \fB\-\-verbose\fR
235Verbose execution.
236.TP
237\fB\-\-debug\fR
238Really verbose execution; includes the verbose output from the
239.B \-v
240option as well as additional output useful for debugging
241.B mkntfs.
242.SS Help options
243.TP
244\fB\-V\fR, \fB\-\-version\fR
245Print the version number of
246.B mkntfs
247and exit.
248.TP
249\fB\-l\fR, \fB\-\-license\fR
250Print the licensing information of
251.B mkntfs
252and exit.
253.TP
254\fB\-h\fR, \fB\-\-help\fR
255Show a list of options with a brief description of each one.
256.SH KNOWN ISSUES
257When applying chkdsk to a file system, it sometimes throws a warning
258"Correcting errors in the uppercase file." The uppercase file is created
259while formatting and it defines the mapping of lower case characters to
260upper case ones, as needed to sort file names in directories. The warning
261means that the uppercase file defined on the file system is not the same as
262the one used by the Windows OS on which chkdsk is running, and this may
263happen because newer versions of Windows take into account new characters
264defined by the Unicode consortium.
265.P
266Currently, mkntfs creates the uppercase table so that no warning is thrown
267by Windows Vista, Windows 7 or Windows 8. A warning may be thrown by
268other Windows versions, or if chkdsk is applied in succession on different
269Windows versions.
270.SH BUGS
271If you find a bug please send an email describing the problem to the
272development team:
273.br
274.nh
275ntfs\-3g\-devel@lists.sf.net
276.hy
277.SH AUTHORS
278.B mkntfs
279was written by Anton Altaparmakov, Richard Russon, Erik Sornes and Szabolcs Szakacsits.
280It was ported to ntfs-3g by Erik Larsson and Jean-Pierre Andre.
281.SH AVAILABILITY
282.B mkntfs
283is part of the
284.B ntfs-3g
285package and is available from:
286.br
287.nh
288http://www.tuxera.com/community/
289.hy
290.SH SEE ALSO
291.BR badblocks (8),
292.BR ntfsprogs (8)