]>
Commit | Line | Data |
---|---|---|
3839e657 | 1 | .\" -*- nroff -*- |
a418d3ad TT |
2 | .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved. |
3 | .\" This file may be copied under the terms of the GNU Public License. | |
4 | .\" | |
74becf3c | 5 | .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
3839e657 TT |
6 | .SH NAME |
7 | mke2fs \- create a Linux second extended file system | |
8 | .SH SYNOPSIS | |
9 | .B mke2fs | |
10 | [ | |
11 | .B \-c | |
12 | | | |
13 | .\" .B \-t | |
caf8ce4c | 14 | .\" .I test |
3839e657 TT |
15 | .\" | |
16 | .B \-l | |
1e3472c5 | 17 | .I filename |
3839e657 TT |
18 | ] |
19 | [ | |
20 | .B \-b | |
1e3472c5 | 21 | .I block-size |
3839e657 TT |
22 | ] |
23 | [ | |
24 | .B \-f | |
1e3472c5 | 25 | .I fragment-size |
3839e657 TT |
26 | ] |
27 | [ | |
28 | .B \-i | |
1e3472c5 | 29 | .I bytes-per-inode |
3839e657 TT |
30 | ] |
31 | [ | |
5515e6b4 TT |
32 | .B \-N |
33 | .I number-of-inodes | |
34 | ] | |
35 | [ | |
2740156b TT |
36 | .B -n |
37 | ] | |
38 | [ | |
3839e657 | 39 | .B \-m |
1e3472c5 TT |
40 | .I reserved-blocks-percentage |
41 | ] | |
42 | [ | |
43 | .B \-o | |
44 | .I creator-os | |
3839e657 TT |
45 | ] |
46 | [ | |
896938d5 TT |
47 | .B \-O |
48 | .IR feature [,...] | |
49 | ] | |
50 | [ | |
f3db3566 TT |
51 | .B \-q |
52 | ] | |
53 | [ | |
caf8ce4c TT |
54 | .B \-r |
55 | .I fs-revision-level | |
a29f4d30 TT |
56 | ] |
57 | [ | |
caf8ce4c TT |
58 | .B \-R |
59 | .I raid_options | |
a29f4d30 TT |
60 | ] |
61 | [ | |
caf8ce4c TT |
62 | .B \-s |
63 | .I sparse-super-flag | |
521e3685 TT |
64 | ] |
65 | [ | |
3839e657 TT |
66 | .B \-v |
67 | ] | |
f3db3566 | 68 | [ |
74becf3c TT |
69 | .B \-F |
70 | ] | |
71 | [ | |
1e3472c5 TT |
72 | .B \-L |
73 | .I volume-label | |
74 | ] | |
75 | [ | |
76 | .B \-M | |
77 | .I last-mounted-directory | |
78 | ] | |
79 | [ | |
f3db3566 TT |
80 | .B \-S |
81 | ] | |
818180cd | 82 | [ |
50787ea2 TT |
83 | .B \-T |
84 | .I filesystem-type | |
85 | ] | |
86 | [ | |
818180cd TT |
87 | .B \-V |
88 | ] | |
1e3472c5 | 89 | .I device |
3839e657 | 90 | [ |
1e3472c5 | 91 | .I blocks-count |
3839e657 TT |
92 | ] |
93 | .SH DESCRIPTION | |
94 | .B mke2fs | |
95 | is used to create a Linux second extended file system on a device (usually | |
96 | a disk partition). | |
3839e657 | 97 | .I device |
caf8ce4c TT |
98 | is the special file corresponding to the device (e.g |
99 | .IR /dev/hdXX ). | |
3839e657 TT |
100 | .I blocks-count |
101 | is the number of blocks on the device. If omitted, | |
102 | .B mke2fs | |
103 | automagically figures the file system size. | |
104 | .SH OPTIONS | |
105 | .TP | |
caf8ce4c | 106 | .BI \-b " block-size" |
2740156b | 107 | Specify the size of blocks in bytes. Valid block size vales are 1024, |
06968e7e TT |
108 | 2048 and 4096 bytes per block. If omitted, |
109 | .B mke2fs | |
110 | block-size is determined by the file system size and the expected usage | |
111 | of the filesystem (see the | |
112 | .B \-T | |
113 | option). | |
3839e657 | 114 | .TP |
caf8ce4c | 115 | .B \-c |
3839e657 TT |
116 | Check the device for bad blocks before creating the file system, using a |
117 | fast read-only test. | |
118 | .TP | |
caf8ce4c | 119 | .BI \-f " fragment-size" |
3839e657 TT |
120 | Specify the size of fragments in bytes. |
121 | .TP | |
caf8ce4c | 122 | .BI \-i " bytes-per-inode" |
3839e657 TT |
123 | Specify the bytes/inode ratio. |
124 | .B mke2fs | |
125 | creates an inode for every | |
126 | .I bytes-per-inode | |
50787ea2 | 127 | bytes of space on the disk. |
caf8ce4c TT |
128 | The larger the |
129 | .I bytes-per-inode | |
130 | ratio, the fewer inodes will be created. | |
50787ea2 TT |
131 | This value generally shouldn't be smaller than |
132 | the blocksize of the filesystem, since then too many inodes will be made. | |
133 | Be warned that is not possible to expand the number of inodes on a | |
134 | filesystem after it is created, so be careful decided the correct | |
135 | value for this parameter. | |
3839e657 | 136 | .TP |
caf8ce4c | 137 | .B \-n |
2740156b TT |
138 | causes mke2fs to not actually create a filesystem, but display what it |
139 | would do if it were to create a filesystem. | |
140 | .TP | |
caf8ce4c | 141 | .BI \-N " number-of-inodes" |
5515e6b4 TT |
142 | overrides the default calculation of the number of inodes that should be |
143 | reserved for the filesystem (which is based on the number of blocks and | |
caf8ce4c TT |
144 | the |
145 | .I bytes-per-inode | |
146 | ratio). This allows the user to specify the number | |
5515e6b4 TT |
147 | of desired inodes directly. |
148 | .TP | |
896938d5 TT |
149 | .BI \-O " feature\fR[,...]" |
150 | Create the filesystem with the listed set of features | |
151 | (filesystem options). The following features are supported: | |
6fdc7a32 | 152 | .IR sparse_super , |
896938d5 TT |
153 | which cause the filesystem to use sparse superblocks, and |
154 | .IR filetype , | |
155 | which will cause the filesystem to store file type information in | |
156 | directory entries. Currently, both features are turned on by default | |
157 | unless | |
158 | .B mke2fs | |
159 | is run on a system with a pre-2.2 Linux kernel. | |
160 | .B Warning: | |
161 | Pre-2.2 Linux kernels do not properly | |
162 | support the filesystems that use either of these two features. Filesystems | |
163 | that may need to mounted on pre-2.2 kernels should be created with | |
164 | .B -O | |
165 | .I none | |
166 | which will disable both of these features, even if | |
167 | .B mke2fs | |
168 | is run on a system which can support these features. | |
169 | .TP | |
caf8ce4c | 170 | .BI \-l " filename" |
3839e657 | 171 | Read the bad blocks list from |
583ccdc3 | 172 | .I filename. |
3839e657 TT |
173 | \. |
174 | .TP | |
caf8ce4c | 175 | .BI -m " reserved-blocks-percentage" |
3839e657 TT |
176 | Specify the percentage of reserved blocks for the super-user. This value |
177 | defaults to 5%. | |
178 | .\" .TP | |
caf8ce4c | 179 | .\" .BI \-t " test" |
3839e657 TT |
180 | .\" Check the device for bad blocks before creating the file system |
181 | .\" using the specified test. | |
182 | .TP | |
caf8ce4c | 183 | .B \-o |
1e3472c5 TT |
184 | Manually override the default value of the "creator os" field of the |
185 | filesystem. Normally the creator field is set by default to the native OS | |
583ccdc3 TT |
186 | of the |
187 | .B mke2fs | |
188 | executable. | |
1e3472c5 | 189 | .TP |
caf8ce4c | 190 | .B \-q |
583ccdc3 TT |
191 | Quiet execution. Useful if |
192 | .B mke2fs | |
193 | is run in a script. | |
f3db3566 | 194 | .TP |
caf8ce4c TT |
195 | .BI \-s " sparse-super-flag" |
196 | If | |
197 | .I sparse-super-flag | |
198 | is 1, then turn on the sparse superblock flag in the superblock. | |
896938d5 TT |
199 | .B Note: |
200 | This option is deprecated; use the | |
201 | .B \-O | |
202 | option instead. | |
521e3685 | 203 | .TP |
caf8ce4c | 204 | .B \-v |
3839e657 | 205 | Verbose execution. |
7f88b043 | 206 | .TP |
caf8ce4c | 207 | .B \-F |
583ccdc3 TT |
208 | Force |
209 | .B mke2fs | |
210 | to run, even if the specified device is not a | |
ca3c3285 | 211 | block special device, or appears to be mounted. |
f3db3566 | 212 | .TP |
caf8ce4c | 213 | .B \-L |
1e3472c5 TT |
214 | Set the volume label for the filesystem. |
215 | .TP | |
caf8ce4c | 216 | .B \-M |
1e3472c5 TT |
217 | Set the last mounted directory for the filesystem. This might be useful |
218 | for the sake of utilities that key off of the last mounted directory to | |
219 | determine where the filesytem should be mounted. | |
220 | .TP | |
caf8ce4c | 221 | .BI -r " revision" |
a29f4d30 TT |
222 | Set the filesystem revision for the new filesystem. Note that 1.2 |
223 | kernels only support revision 0 filesystems. | |
224 | .TP | |
caf8ce4c | 225 | .BI \-R " raid_options" |
cb620174 | 226 | Set raid-related options for the filesystem. Raid options are comma |
a29f4d30 TT |
227 | separated, and may take an argument using the equals ('=') sign. |
228 | Currently the only supported argument is | |
229 | .I stride | |
230 | which takes as its argument the number of blocks in a RAID stripe. | |
231 | .TP | |
caf8ce4c | 232 | .B \-S |
f3db3566 TT |
233 | Write superblock and group descriptors only. This is useful if all of |
234 | the superblock and backup superblocks are corrupted, and a last-ditch | |
583ccdc3 TT |
235 | recovery method is desired. It causes |
236 | .B mke2fs | |
237 | to reinitialize the | |
f3db3566 TT |
238 | superblock and group descriptors, while not touching the inode table |
239 | and the block and inode bitmaps. The | |
240 | .B e2fsck | |
241 | program should be run immediately after this option is used, and there | |
7f88b043 | 242 | is no guarantee that any data will be salvageable. |
818180cd | 243 | .TP |
caf8ce4c | 244 | .BI \-T " fs-type" |
50787ea2 TT |
245 | Specify how the filesystem is going to be used, so that mke2fs can |
246 | automatically determine the optimal filesystem parameters. The only | |
247 | filesystem type which is currently supported is "news". | |
248 | .TP | |
caf8ce4c | 249 | .B \-V |
50787ea2 | 250 | Print the version number of |
818180cd TT |
251 | .B mke2fs |
252 | and exit. | |
3839e657 TT |
253 | .SH AUTHOR |
254 | This version of | |
255 | .B mke2fs | |
a418d3ad | 256 | has been written by Theodore Ts'o <tytso@mit.edu>. |
3839e657 TT |
257 | .SH BUGS |
258 | .B mke2fs | |
caf8ce4c TT |
259 | accepts the |
260 | .B \-f | |
261 | option but currently ignores it because the second | |
3839e657 TT |
262 | extended file system does not support fragments yet. |
263 | .br | |
264 | There may be some other ones. Please, report them to the author. | |
265 | .SH AVAILABILITY | |
266 | .B mke2fs | |
a789d840 TT |
267 | is part of the e2fsprogs package and is available for anonymous |
268 | ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs. | |
3839e657 | 269 | .SH SEE ALSO |
e72a9ba3 | 270 | .BR badblocks (8), |
3839e657 TT |
271 | .BR dumpe2fs (8), |
272 | .BR e2fsck (8), | |
273 | .BR tune2fs (8) |