]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/mkfs.8
fix mkfs --verbose and man page
[thirdparty/util-linux.git] / disk-utils / mkfs.8
CommitLineData
6dbe3af9 1.\" -*- nroff -*-
232dc924 2.TH MKFS 8 "June 2011" "util-linux" "System Administration"
6dbe3af9 3.SH NAME
c181c31d 4mkfs \- build a Linux filesystem
6dbe3af9 5.SH SYNOPSIS
726f69e2 6.B mkfs
449a215f
BS
7.RI [ options ]
8.RB [ \-t
4ec32f6a 9.IR type "] [" fs-options ] " device " [ size ]
6dbe3af9 10.SH DESCRIPTION
726f69e2 11.B mkfs
c181c31d
BS
12is used to build a Linux filesystem on a device, usually
13a hard disk partition. The
14.I device
15argument is either the device name (e.g.
7eda085c 16.IR /dev/hda1 ,
039f3531 17.IR /dev/sdb2 ),
c181c31d 18or a regular file that shall contain the filesystem. The
63ab9524 19.I size
c181c31d 20argument is the number of blocks to be used for the filesystem.
6dbe3af9
KZ
21.PP
22The exit code returned by
726f69e2
KZ
23.B mkfs
24is 0 on success and 1 on failure.
6dbe3af9
KZ
25.PP
26In actuality,
726f69e2 27.B mkfs
c181c31d 28is simply a front-end for the various filesystem builders
039f3531 29(\fBmkfs.\fIfstype\fR)
6dbe3af9 30available under Linux.
c181c31d 31The filesystem-specific builder is searched for in a number
449a215f 32of directories, like perhaps
7eda085c
KZ
33.IR /sbin ,
34.IR /sbin/fs ,
35.IR /sbin/fs.d ,
36.IR /etc/fs ,
37.I /etc
2b6fc908 38(the precise list is defined at compile time but at least
7eda085c
KZ
39contains
40.I /sbin
41and
42.IR /sbin/fs ),
43and finally in the directories
48d7b13a 44listed in the PATH environment variable.
c181c31d 45Please see the filesystem-specific builder manual pages for
6dbe3af9
KZ
46further details.
47.SH OPTIONS
48.TP
449a215f
BS
49.BR \-t , " \-\-type " \fItype\fR
50Specify the \fItype\fR of filesystem to be built.
c181c31d 51If not specified, the default filesystem type
5c36a0eb 52(currently ext2) is used.
6dbe3af9 53.TP
039f3531 54.I fs-options
c181c31d 55Filesystem-specific options to be passed to the real filesystem builder.
6dbe3af9 56.TP
449a215f 57.BR \-V , " \-\-verbose"
c181c31d 58Produce verbose output, including all filesystem-specific commands
63ab9524
SK
59that are executed.
60Specifying this option more than once inhibits execution of any
c181c31d 61filesystem-specific commands.
63ab9524 62This is really only useful for testing.
6dbe3af9 63.TP
449a215f
BS
64.BR \-V , " \-\-version"
65Display version information and exit. (Option \fB\-V\fR will display
c181c31d 66version information only when it is the only parameter, otherwise it
449a215f 67will work as \fB\-\-verbose\fR.)
6dbe3af9 68.TP
449a215f 69.BR \-h , " \-\-help"
b4362b6f 70Display help text and exit.
6dbe3af9
KZ
71.SH BUGS
72All generic options must precede and not be combined with
c181c31d 73filesystem-specific options.
b5ab5bec 74Some filesystem-specific programs do not automatically
726f69e2 75detect the device size and require the
449a215f 76.I size
726f69e2 77parameter to be specified.
6dbe3af9
KZ
78.SH AUTHORS
79David Engel (david@ods.com)
80.br
81Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
82.br
726f69e2
KZ
83Ron Sommeling (sommel@sci.kun.nl)
84.br
6dbe3af9 85The manual page was shamelessly adapted from Remy Card's version
c181c31d 86for the ext2 filesystem.
6dbe3af9 87.SH SEE ALSO
7eda085c
KZ
88.BR fs (5),
89.BR badblocks (8),
726f69e2 90.BR fsck (8),
7eda085c
KZ
91.BR mkdosfs (8),
92.BR mke2fs (8),
63cccae4 93.BR mkfs.bfs (8),
726f69e2 94.BR mkfs.ext2 (8),
63cccae4 95.BR mkfs.ext3 (8),
26b4e7a5 96.BR mkfs.ext4 (8),
7eda085c
KZ
97.BR mkfs.minix (8),
98.BR mkfs.msdos (8),
63cccae4 99.BR mkfs.vfat (8),
c07ebfa1 100.BR mkfs.xfs (8),
7eda085c 101.BR mkfs.xiafs (8)
86d62711 102.SH AVAILABILITY
601d12fb
KZ
103The mkfs command is part of the util-linux package and is available from
104ftp://ftp.kernel.org/pub/linux/utils/util-linux/.