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