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