ntfs-3g/ntfsprogs/mkntfs.8.in

321 lines
8.0 KiB
Groff

.\" Copyright (c) 2001,2002 Anton Altaparmakov.
.\" Copyright (c) 2005 Richard Russon.
.\" This file may be copied under the terms of the GNU Public License.
.\"
.TH MKNTFS 8 "2005\-11\-21" "ntfsprogs version @VERSION@"
.SH NAME
mkntfs \- create an NTFS file system
.SH SYNOPSIS
.B mkntfs
[\fIoptions\fR] \fIdevice \fR[\fInumber\-of\-sectors\fR]
.PP
.B mkntfs
[
.B \-C
]
[
.B \-c
.I cluster\-size
]
[
.B \-F
]
[
.B \-f
]
[
.B \-H
.I heads
]
[
.B \-h
]
[
.B \-I
]
[
.B \-L
.I volume\-label
]
[
.B \-l
]
[
.B \-n
]
[
.B \-N
.I ntfs\-version
]
[
.B \-p
.I part\-start\-sect
]
[
.B \-Q
]
[
.B \-q
]
[
.B \-S
.I sectors\-per\-track
]
[
.B \-s
.I sector\-size
]
[
.B \-T
]
[
.B \-V
]
[
.B \-v
]
[
.B \-z
.I mft\-zone\-multiplier
]
[
.B \-\-debug
]
.I device
[
.I number\-of\-sectors
]
.SH DESCRIPTION
.B mkntfs
is used to create an NTFS file system on a device (usually a disk partition)
or file.
.I device
is the special file corresponding to the device (e.g
.IR /dev/hdXX ).
.I number\-of\-sectors
is the number of blocks on the device. If omitted,
.B mkntfs
automagically figures the file system size.
.SH OPTIONS
Below is a summary of all the options that
.B mkntfs
accepts. Nearly all options have two equivalent names. The short name is
preceded by
.B \-
and the long name is preceded by
.BR \-\- .
Any single letter options, that don't take an argument, can be combined into a
single command, e.g.
.B \-fv
is equivalent to
.BR "\-f \-v" .
Long named options can be abbreviated to any unique prefix of their name.
.SS Basic options
.TP
\fB\-f\fR, \fB\-\-fast\fR, \fB\-Q\fR, \fB\-\-quick\fR
Perform quick (fast) format. This will skip both zeroing of the volume and bad
sector checking.
.TP
\fB\-L\fR, \fB\-\-label\fR STRING
Set the volume label for the filesystem.
.TP
\fB\-C\fR, \fB\-\-enable\-compression\fR
Enable compression on the volume.
.TP
\fB\-c\fR, \fB\-\-cluster\-size\fR BYTES
Specify the size of clusters in bytes. Valid cluster size values are powers of
two, with at least 256, and at most 65536 bytes per cluster. If omitted,
.B mkntfs
determines the
.I cluster\-size
from the volume size. The value is determined as follows:
.TS
box;
lB lB lB
l l r.
Volume size Default cluster size
0 \- 512MB 512 bytes
512MB \- 1GB 1024 bytes
1GB \- 2GB 2048 bytes
2GB + 4096 bytes
.TE
.sp
.sp
Note that the default cluster size is set to be at least equal to the sector
size as a cluster cannot be smaller than a sector. Also, note that values
greater than 4096 have the side effect that compression is disabled on the
volume (due to limitations in the NTFS compression algorithm currently in use
by Windows).
.TP
\fB\-N\fR, \fB\-\-ntfs\-version\fR STRING
Select the version of NTFS you wish to create. This can be "1.2"
(Windows NT 4.0) or "3.1" (Windows XP, Server 2003 and Vista).
Versions are upwards compatible and Windows 2000, which uses version "3.0",
can read/write both.
If this option is omitted then version "1.2" is used.
.TP
\fB\-n\fR, \fB\-\-no\-action\fR
Causes
.B mkntfs
to not actually create a filesystem, but display what it would do if it were
to create a filesystem. All steps of the format are carried out except the
actual writing to the device.
.SS Advanced options
.TP
\fB\-s\fR, \fB\-\-sector\-size\fR BYTES
Specify the size of sectors in bytes. Valid sector size values are 256, 512,
1024, 2048 and 4096 bytes per sector. If omitted,
.B mkntfs
attempts to determine the
.I sector\-size
automatically and if that fails a default of 512 bytes per sector is used.
.TP
\fB\-p\fR, \fB\-\-partition\-start\fR SECTOR
Specify the partition start sector. The maximum is 4294967295 (2^32\-1). If
omitted,
.B mkntfs
attempts to determine
.I part\-start\-sect
automatically and if that fails a default of 0 is used. Note that
.I part\-start\-sect
is required for Windows to be able to boot from the created volume.
.TP
\fB\-H\fR, \fB\-\-heads\fR NUM
Specify the number of heads. The maximum is 65535 (0xffff). If omitted,
.B mkntfs
attempts to determine the number of
.I heads
automatically and if that fails a default of 0 is used. Note that
.I heads
is required for Windows to be able to boot from the created volume.
.TP
\fB\-S\fR, \fB\-\-sectors\-per\-track\fR NUM
Specify the number of sectors per track. The maximum is 65535 (0xffff). If
omitted,
.B mkntfs
attempts to determine the number of
.I sectors\-per\-track
automatically and if that fails a default of 0 is used. Note that
.I sectors\-per\-track
is required for Windows to be able to boot from the created volume.
.TP
\fB\-z\fR, \fB\-\-mft\-zone\-multiplier\fR NUM
Set the MFT zone multiplier, which determines the size of the MFT zone to use
on the volume. The MFT zone is the area at the beginning of the volume reserved
for the master file table (MFT), which stores the on disk inodes (MFT records).
It is noteworthy that small files are stored entirely within the inode;
thus, if you expect to use the volume for storing large numbers of very small
files, it is useful to set the zone multiplier to a higher value. Note, that
the MFT zone is resized on the fly as required during operation of the NTFS
driver but choosing a good value will reduce fragmentation. Valid values
are 1, 2, 3 and 4. The values have the following meaning:
.TS
box;
lB lB
lB lB
c l.
MFT zone MFT zone size
multiplier (% of volume size)
1 12.5% (default)
2 25.0%
3 37.5%
4 50.0%
.TE
.sp
.TP
\fB\-T\fR, \fB\-\-zero\-time\fR
Fake the time to be 00:00:00 UTC, Jan 1, 1970 instead of the current system
time. This is only really useful for debugging purposes.
.TP
\fB\-I\fR, \fB\-\-no\-indexing\fR
Disable content indexing on the volume. (This is only meaningful on
Windows 2000 and later. Windows NT 4.0 and earlier ignore this as they do
not implement content indexing at all.)
.TP
\fB\-F\fR, \fB\-\-force\fR
Force
.B mkntfs
to run, even if the specified
.I device
is not a block special device, or appears to be mounted.
.SS Output options
.TP
\fB\-q\fR, \fB\-\-quiet\fR
Quiet execution; only errors are written to stderr, no output to stdout
occurs at all. Useful if
.B mkntfs
is run in a script.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
Verbose execution.
.TP
\fB\-\-debug\fR
Really verbose execution; includes the verbose output from the
.B \-v
option as well as additional output useful for debugging
.B mkntfs.
.SS Help options
.TP
\fB\-V\fR, \fB\-\-version\fR
Print the version number of
.B mkntfs
and exit.
.TP
\fB\-l\fR, \fB\-\-license\fR
Print the licensing information of
.B mkntfs
and exit.
.TP
\fB\-h\fR, \fB\-\-help\fR
Show a list of options with a brief description of each one.
.SH BUGS
.B mkntfs
writes the backup boot sector to the last sector of the block
.I device
being formatted. However, current versions of the Linux kernel (all versions
up to and including todays 2.4.18) either only report an even number of sectors
when the sector size is below 1024 bytes, which is the case for most hard
drives today (512 bytes sector size) or they return the correct number but
accessing the last sector fails. Either way, this means that when a partition
has an odd number of 512\-byte sectors, the last sector is either not reported
to us at all or it is not writable by us and hence the created NTFS volume
will either have the backup boot sector placed one sector ahead of where it
should be or it cannot be written at all. For this reason,
.B mkntfs
marks the NTFS volume dirty, so that when you reboot into Windows, check disk
runs automatically and creates a copy of the backup boot sector in the correct
location. This also has the benefit of catching any bugs in
.B mkntfs
as check disk would find any corrupt structures and repair them, as well as
report them.
.sp
If you find a bug please send an email describing the problem to the
development team:
.br
.nh
linux\-ntfs\-dev@lists.sourceforge.net
.hy
.SH AUTHORS
.B mkntfs
was written by Anton Altaparmakov, Richard Russon and Szabolcs Szakacsits, with
contributions from Erik Sornes.
.SH AVAILABILITY
.B mkntfs
is part of the
.B ntfsprogs
package and is available from:
.br
.nh
http://www.linux\-ntfs.org/content/view/19/37
.hy
.sp
The manual pages are available online at:
.br
.nh
http://wiki.linux\-ntfs.org/doku.php?id=man
.hy
.SH SEE ALSO
.BR badblocks (8),
.BR ntfsprogs (8)