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

426 lines
8.2 KiB
Groff
Raw Normal View History

2002-11-29 20:16:35 +08:00
.\" -*- nroff -*-
.\" Copyright (c) 2001,2002 Anton Altaparmakov. All Rights Reserved.
2005-11-07 05:26:23 +08:00
.\" Copyright (c) 2005 Richard Russon. All Rights Reserved.
2002-11-29 20:16:35 +08:00
.\" This file may be copied under the terms of the GNU Public License.
.\" Adapted from e2fsprogs-1.19/misc/mke2fs.8.in by Theodore Ts'o.
2002-12-02 02:54:13 +08:00
.\"
.TH MKNTFS 8 "June 2005" "ntfsprogs version @VERSION@"
2002-11-29 20:16:35 +08:00
.SH NAME
2005-07-13 00:18:10 +08:00
mkntfs \- create an NTFS 1.2 (Windows NT/2000/XP) file system
2002-11-29 20:16:35 +08:00
.SH SYNOPSIS
.B mkntfs
[
2005-11-07 05:26:23 +08:00
.I options
2002-11-29 20:16:35 +08:00
]
2005-11-07 05:26:23 +08:00
.B device
2002-11-29 20:16:35 +08:00
[
2005-11-07 05:26:23 +08:00
.I number-of-sectors
]
.P
.B mkntfs
[
.B \-C
]
[
.B \-c
.I cluster-size
]
[
.B \-F
]
[
.B \-f
]
[
.B \-H
.I heads
]
[
2005-11-07 05:26:23 +08:00
.B \-h
]
[
2005-11-07 05:26:23 +08:00
.B \-I
2002-11-29 20:16:35 +08:00
]
[
.B \-L
.I volume-label
]
[
2005-11-07 05:26:23 +08:00
.B \-l
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-n
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-p
.I part-start-sect
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-Q
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-q
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-S
.I sectors-per-track
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-s
.I sector-size
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-T
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-V
]
[
2005-11-07 05:26:23 +08:00
.B \-v
2002-11-29 20:16:35 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-w
.I ntfs-version
2002-11-29 20:16:35 +08:00
]
2003-01-20 19:08:14 +08:00
[
2005-11-07 05:26:23 +08:00
.B \-z
.I mft-zone-multiplier
2003-01-20 19:08:14 +08:00
]
[
2005-11-07 05:26:23 +08:00
.B \-\-debug
2003-01-20 19:08:14 +08:00
]
2002-11-29 20:16:35 +08:00
.I device
[
.I number-of-sectors
]
.SH DESCRIPTION
.B mkntfs
2005-07-13 00:18:10 +08:00
is used to create an NTFS 1.2 (Windows NT 4.0) file system on a device (usually
2002-11-29 20:16:35 +08:00
a disk partition).
.I device
2002-12-02 02:54:13 +08:00
is the special file corresponding to the device (e.g
2002-11-29 20:16:35 +08:00
.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
2005-11-07 05:26:23 +08:00
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
.BR \-
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.
.BR \-fv
is equivalent to
.BR "\-f \-v" .
Long named options can be abbreviated to any unique prefix of their name.
.TP
.BR
.SS Basic options
.BR
.B \-f
.br
.ns
.TP
.B \-\-fast
.br
.ns
.TP
.B \-Q
.br
.ns
.TP
.B \-\-quick
Perform quick (fast) format. This will skip both zeroing of the volume and bad sector
checking.
.TP
.BI \-L " STRING"
.br
.ns
.TP
.BI \-\-label " STRING"
Set the volume label for the filesystem.
.TP
.B \-C
.br
.ns
.TP
.B \-\-enable-compression
Enable compression on the volume.
.TP
.BI \-c " BYTES"
.br
.ns
.TP
.BI \-\-cluster-size " 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
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
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
.B \-I
.br
.ns
.TP
.B \-\-disable-indexing
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
.B \-n
.br
.ns
.TP
.B \-\-no-action
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.
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.BR
.SS Advanced options
.BR
.BI \-s " BYTES"
.br
.ns
.TP
.BI \-\-sector-size " BYTES"
2002-11-29 20:16:35 +08:00
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
2002-11-29 20:16:35 +08:00
.I sector-size
automatically and if that fails a default of 512 bytes per sector is used.
.TP
2005-11-07 05:26:23 +08:00
.BI \-p " SECTOR"
.br
.ns
.TP
.BI \-\-partition-start " 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
2005-11-07 05:26:23 +08:00
.BI \-H " NUM"
.br
.ns
.TP
.BI \-\-heads " 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
2005-11-07 05:26:23 +08:00
.BI \-S " NUM"
.br
.ns
.TP
.BI \-\-sectors-per-track " 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.
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.BI \-z " NUM"
.br
.ns
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.BI \-\-mft-zone-multiplier " NUM"
2002-11-29 20:16:35 +08:00
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
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
.TP
2005-11-07 05:26:23 +08:00
.B \-T
.br
.ns
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.B \-\-zero-time
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.
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.B \-w STRING
.br
.ns
.TP
.B \-\-ntfs-version STRING
Select the version of NTFS you wish to use. This can be one of "1.2", "3.0", or "3.1".
.TP
.B \-F
.br
.ns
.TP
.B \-\-force
Force
2002-11-29 20:16:35 +08:00
.B mkntfs
2005-11-07 05:26:23 +08:00
to run, even if the specified
.I device
is not a block special device, or appears to be mounted.
2002-11-29 20:16:35 +08:00
.TP
2005-11-07 05:26:23 +08:00
.BR
.SS Output options
.BR
2002-11-29 20:16:35 +08:00
.B \-q
2005-11-07 05:26:23 +08:00
.br
.ns
.TP
.B \-\-quiet
2002-11-29 20:16:35 +08:00
Quiet execution; only errors are written to stderr, no output to stdout
2002-12-02 02:54:13 +08:00
occurs at all. Useful if
2002-11-29 20:16:35 +08:00
.B mkntfs
is run in a script.
.TP
2005-11-07 05:26:23 +08:00
2002-11-29 20:16:35 +08:00
.B \-v
2005-11-07 05:26:23 +08:00
.br
.ns
.TP
.B \-\-verbose
2002-11-29 20:16:35 +08:00
Verbose execution.
.TP
2005-11-07 05:26:23 +08:00
.B \-\-debug
2002-11-29 20:16:35 +08:00
Really verbose execution; includes the verbose output from the
.B \-v
option as well as additional output useful for debugging
.B mkntfs.
.TP
2005-11-07 05:26:23 +08:00
.BR
.SS Help options
.BR
2002-11-29 20:16:35 +08:00
.B \-V
2005-11-07 05:26:23 +08:00
.br
.ns
.TP
.B \-\-version
2002-12-02 02:54:13 +08:00
Print the version number of
2002-11-29 20:16:35 +08:00
.B mkntfs
and exit.
2003-01-20 19:08:14 +08:00
.TP
2005-11-07 05:26:23 +08:00
2003-01-20 19:08:14 +08:00
.B \-l
2005-11-07 05:26:23 +08:00
.br
.ns
.TP
.B \-\-license
2003-01-20 19:08:14 +08:00
Print the licensing information of
.B mkntfs
and exit.
.TP
2005-11-07 05:26:23 +08:00
2003-01-20 19:08:14 +08:00
.B \-h
2005-11-07 05:26:23 +08:00
.br
.ns
.TP
.B \-\-help
2003-01-20 19:08:14 +08:00
Print the usage information of
.B mkntfs
and exit.
2005-11-07 05:26:23 +08:00
.TP
.BR
2002-11-29 20:16:35 +08:00
.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. - If you do see any problems reported, please report the messages
to the author.
.br
There may be other bugs. Please, report them to the author.
2002-11-29 23:26:49 +08:00
.SH AUTHOR
This version of
.B mkntfs
has been written by Anton Altaparmakov <aia21@cantab.net> (if that fails, use
<antona@users.sourceforge.net>).
2002-11-29 20:16:35 +08:00
.SH AVAILABILITY
.B mkntfs
2004-03-11 07:37:54 +08:00
is part of the ntfsprogs package and is available for download from
http://sourceforge.net/project/showfiles.php?group_id=13956 in source (tar ball
and rpm) and pre-compiled binary (i386 rpm and deb) form.
2002-11-29 20:16:35 +08:00
.SH SEE ALSO
.BR badblocks (8),
2002-11-29 23:26:49 +08:00
.BR ntfsprogs (8)