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