]>
Commit | Line | Data |
---|---|---|
6dbe3af9 | 1 | .\" -*- nroff -*- |
726f69e2 | 2 | .TH MKFS 8 "Jun 1995" "Version 1.9" |
6dbe3af9 | 3 | .SH NAME |
726f69e2 | 4 | mkfs \- build a Linux file system |
6dbe3af9 | 5 | .SH SYNOPSIS |
726f69e2 | 6 | .B mkfs |
039f3531 PB |
7 | .RB [ \-V ] |
8 | .RB [ \-t | |
9 | .IR fstype ] | |
10 | .RI [ fs-options ] | |
6dbe3af9 | 11 | .I filesys |
039f3531 | 12 | .RI [ blocks ] |
6dbe3af9 | 13 | .SH DESCRIPTION |
726f69e2 KZ |
14 | .B mkfs |
15 | is used to build a Linux file system on a device, usually | |
16 | a hard disk partition. | |
6dbe3af9 | 17 | .I filesys |
7eda085c KZ |
18 | is either the device name (e.g. |
19 | .IR /dev/hda1 , | |
039f3531 PB |
20 | .IR /dev/sdb2 ), |
21 | or a regular file that shall contain the file system. | |
726f69e2 KZ |
22 | .I blocks |
23 | is the number of blocks to be used for the file system. | |
6dbe3af9 KZ |
24 | .PP |
25 | The exit code returned by | |
726f69e2 KZ |
26 | .B mkfs |
27 | is 0 on success and 1 on failure. | |
6dbe3af9 KZ |
28 | .PP |
29 | In actuality, | |
726f69e2 KZ |
30 | .B mkfs |
31 | is simply a front-end for the various file system builders | |
039f3531 | 32 | (\fBmkfs.\fIfstype\fR) |
6dbe3af9 | 33 | available under Linux. |
2b6fc908 | 34 | The file system-specific builder is searched for in a number |
7eda085c KZ |
35 | of directories like perhaps |
36 | .IR /sbin , | |
37 | .IR /sbin/fs , | |
38 | .IR /sbin/fs.d , | |
39 | .IR /etc/fs , | |
40 | .I /etc | |
2b6fc908 | 41 | (the precise list is defined at compile time but at least |
7eda085c KZ |
42 | contains |
43 | .I /sbin | |
44 | and | |
45 | .IR /sbin/fs ), | |
46 | and finally in the directories | |
48d7b13a | 47 | listed in the PATH environment variable. |
726f69e2 | 48 | Please see the file system-specific builder manual pages for |
6dbe3af9 KZ |
49 | further details. |
50 | .SH OPTIONS | |
51 | .TP | |
6dbe3af9 KZ |
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 | |
726f69e2 | 60 | Specifies the type of file system to be built. |
5c36a0eb KZ |
61 | If not specified, the default file system type |
62 | (currently ext2) is used. | |
6dbe3af9 | 63 | .TP |
039f3531 PB |
64 | .I fs-options |
65 | File system-specific options to be passed to the real file | |
726f69e2 | 66 | system builder. |
6dbe3af9 | 67 | Although not guaranteed, the following options are supported |
726f69e2 | 68 | by most file system builders. |
6dbe3af9 | 69 | .TP |
726f69e2 KZ |
70 | .B -c |
71 | Check the device for bad blocks before building the file system. | |
6dbe3af9 | 72 | .TP |
726f69e2 KZ |
73 | .BI -l \ filename |
74 | Read the bad blocks list from | |
75 | .I filename | |
6dbe3af9 | 76 | .TP |
726f69e2 | 77 | .B -v |
6dbe3af9 KZ |
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. | |
726f69e2 KZ |
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. | |
6dbe3af9 KZ |
89 | .SH AUTHORS |
90 | David Engel (david@ods.com) | |
91 | .br | |
92 | Fred N. van Kempen (waltje@uwalt.nl.mugnet.org) | |
93 | .br | |
726f69e2 KZ |
94 | Ron Sommeling (sommel@sci.kun.nl) |
95 | .br | |
6dbe3af9 KZ |
96 | The manual page was shamelessly adapted from Remy Card's version |
97 | for the ext2 file system. | |
98 | .SH SEE ALSO | |
7eda085c KZ |
99 | .BR fs (5), |
100 | .BR badblocks (8), | |
726f69e2 | 101 | .BR fsck (8), |
7eda085c KZ |
102 | .BR mkdosfs (8), |
103 | .BR mke2fs (8), | |
63cccae4 | 104 | .BR mkfs.bfs (8), |
726f69e2 | 105 | .BR mkfs.ext2 (8), |
63cccae4 | 106 | .BR mkfs.ext3 (8), |
26b4e7a5 | 107 | .BR mkfs.ext4 (8), |
7eda085c KZ |
108 | .BR mkfs.minix (8), |
109 | .BR mkfs.msdos (8), | |
63cccae4 | 110 | .BR mkfs.vfat (8), |
c07ebfa1 | 111 | .BR mkfs.xfs (8), |
7eda085c | 112 | .BR mkfs.xiafs (8) |
86d62711 | 113 | .SH AVAILABILITY |
601d12fb KZ |
114 | The mkfs command is part of the util-linux package and is available from |
115 | ftp://ftp.kernel.org/pub/linux/utils/util-linux/. |