]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blame - misc/mke2fs.8.in
ChangeLog, mke2fs.c:
[thirdparty/e2fsprogs.git] / misc / mke2fs.8.in
CommitLineData
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
7mke2fs \- 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
95is used to create a Linux second extended file system on a device (usually
96a disk partition).
3839e657 97.I device
caf8ce4c
TT
98is the special file corresponding to the device (e.g
99.IR /dev/hdXX ).
3839e657
TT
100.I blocks-count
101is the number of blocks on the device. If omitted,
102.B mke2fs
103automagically figures the file system size.
104.SH OPTIONS
105.TP
caf8ce4c 106.BI \-b " block-size"
2740156b 107Specify the size of blocks in bytes. Valid block size vales are 1024,
06968e7e
TT
1082048 and 4096 bytes per block. If omitted,
109.B mke2fs
110block-size is determined by the file system size and the expected usage
111of the filesystem (see the
112.B \-T
113option).
3839e657 114.TP
caf8ce4c 115.B \-c
3839e657
TT
116Check the device for bad blocks before creating the file system, using a
117fast read-only test.
118.TP
caf8ce4c 119.BI \-f " fragment-size"
3839e657
TT
120Specify the size of fragments in bytes.
121.TP
caf8ce4c 122.BI \-i " bytes-per-inode"
3839e657
TT
123Specify the bytes/inode ratio.
124.B mke2fs
125creates an inode for every
126.I bytes-per-inode
50787ea2 127bytes of space on the disk.
caf8ce4c
TT
128The larger the
129.I bytes-per-inode
130ratio, the fewer inodes will be created.
50787ea2
TT
131This value generally shouldn't be smaller than
132the blocksize of the filesystem, since then too many inodes will be made.
133Be warned that is not possible to expand the number of inodes on a
134filesystem after it is created, so be careful decided the correct
135value for this parameter.
3839e657 136.TP
caf8ce4c 137.B \-n
2740156b
TT
138causes mke2fs to not actually create a filesystem, but display what it
139would do if it were to create a filesystem.
140.TP
caf8ce4c 141.BI \-N " number-of-inodes"
5515e6b4
TT
142overrides the default calculation of the number of inodes that should be
143reserved for the filesystem (which is based on the number of blocks and
caf8ce4c
TT
144the
145.I bytes-per-inode
146ratio). This allows the user to specify the number
5515e6b4
TT
147of desired inodes directly.
148.TP
896938d5
TT
149.BI \-O " feature\fR[,...]"
150Create the filesystem with the listed set of features
151(filesystem options). The following features are supported:
6fdc7a32 152.IR sparse_super ,
896938d5
TT
153which cause the filesystem to use sparse superblocks, and
154.IR filetype ,
155which will cause the filesystem to store file type information in
156directory entries. Currently, both features are turned on by default
157unless
158.B mke2fs
159is run on a system with a pre-2.2 Linux kernel.
160.B Warning:
161Pre-2.2 Linux kernels do not properly
162support the filesystems that use either of these two features. Filesystems
163that may need to mounted on pre-2.2 kernels should be created with
164.B -O
165.I none
166which will disable both of these features, even if
167.B mke2fs
168is run on a system which can support these features.
169.TP
caf8ce4c 170.BI \-l " filename"
3839e657 171Read the bad blocks list from
583ccdc3 172.I filename.
3839e657
TT
173\.
174.TP
caf8ce4c 175.BI -m " reserved-blocks-percentage"
3839e657
TT
176Specify the percentage of reserved blocks for the super-user. This value
177defaults 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
184Manually override the default value of the "creator os" field of the
185filesystem. Normally the creator field is set by default to the native OS
583ccdc3
TT
186of the
187.B mke2fs
188executable.
1e3472c5 189.TP
caf8ce4c 190.B \-q
583ccdc3
TT
191Quiet execution. Useful if
192.B mke2fs
193is run in a script.
f3db3566 194.TP
caf8ce4c
TT
195.BI \-s " sparse-super-flag"
196If
197.I sparse-super-flag
198is 1, then turn on the sparse superblock flag in the superblock.
896938d5
TT
199.B Note:
200This option is deprecated; use the
201.B \-O
202option instead.
521e3685 203.TP
caf8ce4c 204.B \-v
3839e657 205Verbose execution.
7f88b043 206.TP
caf8ce4c 207.B \-F
583ccdc3
TT
208Force
209.B mke2fs
210to run, even if the specified device is not a
ca3c3285 211block special device, or appears to be mounted.
f3db3566 212.TP
caf8ce4c 213.B \-L
1e3472c5
TT
214Set the volume label for the filesystem.
215.TP
caf8ce4c 216.B \-M
1e3472c5
TT
217Set the last mounted directory for the filesystem. This might be useful
218for the sake of utilities that key off of the last mounted directory to
219determine where the filesytem should be mounted.
220.TP
caf8ce4c 221.BI -r " revision"
a29f4d30
TT
222Set the filesystem revision for the new filesystem. Note that 1.2
223kernels only support revision 0 filesystems.
224.TP
caf8ce4c 225.BI \-R " raid_options"
cb620174 226Set raid-related options for the filesystem. Raid options are comma
a29f4d30
TT
227separated, and may take an argument using the equals ('=') sign.
228Currently the only supported argument is
229.I stride
230which takes as its argument the number of blocks in a RAID stripe.
231.TP
caf8ce4c 232.B \-S
f3db3566
TT
233Write superblock and group descriptors only. This is useful if all of
234the superblock and backup superblocks are corrupted, and a last-ditch
583ccdc3
TT
235recovery method is desired. It causes
236.B mke2fs
237to reinitialize the
f3db3566
TT
238superblock and group descriptors, while not touching the inode table
239and the block and inode bitmaps. The
240.B e2fsck
241program should be run immediately after this option is used, and there
7f88b043 242is no guarantee that any data will be salvageable.
818180cd 243.TP
caf8ce4c 244.BI \-T " fs-type"
50787ea2
TT
245Specify how the filesystem is going to be used, so that mke2fs can
246automatically determine the optimal filesystem parameters. The only
247filesystem type which is currently supported is "news".
248.TP
caf8ce4c 249.B \-V
50787ea2 250Print the version number of
818180cd
TT
251.B mke2fs
252and exit.
3839e657
TT
253.SH AUTHOR
254This version of
255.B mke2fs
a418d3ad 256has been written by Theodore Ts'o <tytso@mit.edu>.
3839e657
TT
257.SH BUGS
258.B mke2fs
caf8ce4c
TT
259accepts the
260.B \-f
261option but currently ignores it because the second
3839e657
TT
262extended file system does not support fragments yet.
263.br
264There may be some other ones. Please, report them to the author.
265.SH AVAILABILITY
266.B mke2fs
a789d840
TT
267is part of the e2fsprogs package and is available for anonymous
268ftp 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)