http://linux-ntfs.sourceforge.net/snapshots/ntfsprogs-200309071734.tar.bz2
[ntfsprogs.git] / ntfsprogs / mkntfs.8.in
1 .\" -*- nroff -*-
2 .\" Copyright (c) 2001,2002 Anton Altaparmakov. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
4 .\" Adapted from e2fsprogs-1.19/misc/mke2fs.8.in by Theodore Ts'o.
5 .\"
6 .TH MKNTFS 8 "March 2002" "Linux-NTFS version @VERSION@"
7 .SH NAME
8 mkntfs \- create a NTFS 1.2 (Windows NT/2000/XP) file system
9 .SH SYNOPSIS
10 .B mkntfs
11 [
12 .B \-s
13 .I sector-size
14 ]
15 [
16 .B \-c
17 .I cluster-size
18 ]
19 [
20 .B \-L
21 .I volume-label
22 ]
23 [
24 .B \-z
25 .I mft-zone-multiplier
26 ]
27 [
28 .B \-f
29 |
30 .B \-Q
31 ]
32 [
33 .B -n
34 ]
35 [
36 .B \-q
37 ]
38 [
39 .B \-v
40 ]
41 [
42 .B \-vv
43 ]
44 [
45 .B \-C
46 ]
47 [
48 .B \-F
49 ]
50 [
51 .B \-I
52 ]
53 [
54 .B \-V
55 ]
56 [
57 .B \-l
58 ]
59 [
60 .B \-h
61 ]
62 .I device
63 [
64 .I number-of-sectors
65 ]
66 .SH DESCRIPTION
67 .B mkntfs
68 is used to create a NTFS 1.2 (Windows NT 4.0) file system on a device (usually
69 a disk partition).
70 .I device
71 is the special file corresponding to the device (e.g
72 .IR /dev/hdXX ).
73 .I number-of-sectors
74 is the number of blocks on the device.  If omitted,
75 .B mkntfs
76 automagically figures the file system size.
77 .SH OPTIONS
78 .TP
79 .BI \-s " sector-size"
80 Specify the size of sectors in bytes. Valid sector size values are 256, 512,
81 1024, 2048 and 4096 bytes per sector. If omitted,
82 .B mkntfs
83 .I sector-size
84 is determined automatically and if that fails a default of 512
85 bytes per sector is used.
86 .TP
87 .BI \-c " cluster-size"
88 Specify the size of clusters in bytes. Valid cluster size values are powers of
89 two, with at least 256, and at most 65536 bytes per cluster. If omitted,
90 .B mkntfs
91 .I cluster-size
92 is determined by the volume size. The value is determined as
93 follows:
94 .TS
95 lB lB lB
96 l l r.
97 Volume  size    Default cluster
98 0       - 512MB 512 bytes
99 512MB   - 1GB   1024 bytes
100 1GB     - 2GB   2048 bytes
101 2GB     +       4096 bytes
102 .TE
103
104 Note that the default cluster size is set to be at least equal to the sector
105 size as a cluster cannot be smaller than a sector. Also, note that values
106 greater than 4096 have the side effect that compression is disabled on the
107 volume (due to limitations in the NTFS compression algorithm currently in use
108 by Windows).
109 .TP
110 .BI \-L " volume-label"
111 Set the volume label for the filesystem.
112 .TP
113 .BI \-z " mft-zone-multiplier"
114 Set the MFT zone multiplier, which determines the size of the MFT zone to use
115 on the volume. The MFT zone is the area at the beginning of the volume reserved
116 for the master file table (MFT), which stores the on disk inodes (MFT records).
117 It is noteworthy that small files are stored entirely within the inode;
118 thus, if you expect to use the volume for storing large numbers of very small
119 files, it is useful to set the zone multiplier to a higher value. Note, that
120 the MFT zone is resized on the fly as required during operation of the NTFS
121 driver but choosing a good value will reduce fragmentation. Valid values
122 are 1, 2, 3 and 4. The values have the following meaning:
123 .TS
124 lB lB
125 lB lB
126 c l.
127 MFT zone        MFT zone size
128 multiplier      (% of volume size)
129 1       12.5% (default)
130 2       25.0%
131 3       37.5%
132 4       50.0%
133 .TE
134 .TP
135 .B \-f
136 Same as
137 .BR \-Q .
138 .TP
139 .B \-Q
140 Perform quick format. This will skip both zeroing of the volume and bad sector
141 checking.
142 .TP
143 .B \-n
144 Causes
145 .B mkntfs
146 to not actually create a filesystem, but display what it would do if it were
147 to create a filesystem. All steps of the format are carried out except the
148 actual writing to the device.
149 .TP
150 .B \-q
151 Quiet execution; only errors are written to stderr, no output to stdout
152 occurs at all. Useful if
153 .B mkntfs
154 is run in a script.
155 .TP
156 .B \-v
157 Verbose execution.
158 .TP
159 .B \-vv
160 Really verbose execution; includes the verbose output from the
161 .B \-v
162 option as well as additional output useful for debugging
163 .B mkntfs.
164 .TP
165 .B \-C
166 Enable compression on the volume.
167 .TP
168 .B \-F
169 Force
170 .B mkntfs
171 to run, even if the specified
172 .I device
173 is not a block special device, or appears to be mounted.
174 .TP
175 .B \-I
176 Disable content indexing on the volume. (This is only meaningful on
177 Windows 2000 and later. Windows NT 4.0 and earlier ignore this as they do
178 not implement content indexing at all.)
179 .TP
180 .B \-V
181 Print the version number of
182 .B mkntfs
183 and exit.
184 .TP
185 .B \-l
186 Print the licensing information of
187 .B mkntfs
188 and exit.
189 .TP
190 .B \-h
191 Print the usage information of 
192 .B mkntfs
193 and exit.
194 .SH BUGS
195 .B mkntfs
196 writes the backup boot sector to the last sector of the block
197 .I device
198 being formatted. However, current versions of the Linux kernel (all versions
199 up to and including todays 2.4.18) either only report an even number of sectors
200 when the sector size is below 1024 bytes, which is the case for most hard
201 drives today (512 bytes sector size) or they return the correct number but
202 accessing the last sector fails. Either way, this means that when a partition
203 has an odd number of 512-byte sectors, the last sector is either not reported
204 to us at all or it is not writable by us and hence the created NTFS volume
205 will either have the backup boot sector placed one sector ahead of where it
206 should be or it cannot be written at all. For this reason,
207 .B mkntfs
208 marks the NTFS volume dirty, so that when you reboot into Windows, check disk
209 runs automatically and creates a copy of the backup boot sector in the correct
210 location. This also has the benefit of catching any bugs in
211 .B mkntfs
212 as check disk would find any corrupt structures and repair them, as well as
213 report them. - If you do see any problems reported, please report the messages
214 to the author.
215 .br
216 There may be other bugs. Please, report them to the author.
217 .SH AUTHOR
218 This version of
219 .B mkntfs
220 has been written by Anton Altaparmakov <aia21@cantab.net> (if that fails, use
221 <antona@users.sf.net>).
222 .SH AVAILABILITY
223 .B mkntfs
224 is part of the Linux-NTFS project and is available for download from
225 http://sf.net/project/showfiles.php?group_id=13956 in source (tar ball and
226 rpm) and pre-compiled binary (i386 rpm and deb) form.
227 .SH SEE ALSO
228 .BR badblocks(8),
229 .BR ntfsprogs (8)
230