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