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