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