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