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