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.
5 .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 mke2fs \- create a Linux second extended file system
47 .I reserved-blocks-percentage
84 .I last-mounted-directory
102 is used to create a Linux second extended file system on a device (usually
105 is the special file corresponding to the device (e.g
108 is the number of blocks on the device. If omitted,
110 automagically figures the file system size.
113 .BI \-b " block-size"
114 Specify the size of blocks in bytes. Valid block size vales are 1024,
115 2048 and 4096 bytes per block. If omitted,
117 block-size is determined by the file system size and the expected usage
118 of the filesystem (see the
123 Check the device for bad blocks before creating the file system, using a
126 .BI \-f " fragment-size"
127 Specify the size of fragments in bytes.
129 .BI \-i " bytes-per-inode"
130 Specify the bytes/inode ratio.
132 creates an inode for every
134 bytes of space on the disk.
137 ratio, the fewer inodes will be created.
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
141 filesystem after it is created, so be careful deciding the correct
142 value for this parameter.
145 Build the ext2 filesystem with the ext3 journaling feature enabled.
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.
152 .BI \-J " journal options"
153 Create the ext3 journal using options specified on the command-line.
154 Journal options are comma
155 separated, and may take an argument using the equals ('=') sign.
156 Currently two (mutually exclusive) options are supported,
161 .BI "\-J size=" journal-size
162 Create a journal stored in the filesystem of size
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.
169 .BI "\-J device=" external-journal
170 Add an external journal found on a block device
175 journal must have been already created using the command
176 .B mke2fs -O journal_dev
180 causes mke2fs to not actually create a filesystem, but display what it
181 would do if it were to create a filesystem.
183 .BI \-N " number-of-inodes"
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
188 ratio). This allows the user to specify the number
189 of desired inodes directly.
191 .BI \-O " feature\fR[,...]"
192 Create the filesystem with the listed set of features
193 (filesystem options). The following features are supported:
195 which cause the filesystem to use sparse superblocks, and
197 which will cause the filesystem to store file type information in
198 directory entries. Currently, both features are turned on by default
201 is run on a system with a pre-2.2 Linux kernel.
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
208 which will disable both of these features, even if
210 is run on a system which can support these features.
213 Read the bad blocks list from
217 .BI -m " reserved-blocks-percentage"
218 Specify the percentage of reserved blocks for the super-user. This value
222 .\" Check the device for bad blocks before creating the file system
223 .\" using the specified test.
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
233 Quiet execution. Useful if
237 .BI \-s " sparse-super-flag"
240 is 1, then turn on the sparse superblock flag in the superblock.
242 This option is deprecated; use the
252 to run, even if the specified device is not a
253 block special device, or appears to be mounted.
256 Set the volume label for the filesystem.
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.
264 Set the filesystem revision for the new filesystem. Note that 1.2
265 kernels only support revision 0 filesystems.
267 .BI \-R " raid_options"
268 Set raid-related options for the filesystem. Raid options are comma
269 separated, and may take an argument using the equals ('=') sign.
270 Currently the only supported argument is
272 which takes as its argument the number of blocks in a RAID stripe.
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
277 recovery method is desired. It causes
280 superblock and group descriptors, while not touching the inode table
281 and the block and inode bitmaps. The
283 program should be run immediately after this option is used, and there
284 is no guarantee that any data will be salvageable.
287 Specify how the filesystem is going to be used, so that mke2fs can
288 chose optimal filesystem parameters for that use. The only
289 currently supported filesystem types are:
291 which reserves space for one inode per 4kb block,
293 which allocates one inode per megabyte, and
295 which allocates one inode per 4 megabytes.
298 Print the version number of
304 has been written by Theodore Ts'o <tytso@mit.edu>.
309 option but currently ignores it because the second
310 extended file system does not support fragments yet.
312 There may be some other ones. Please, report them to the author.
315 is part of the e2fsprogs package and is available for anonymous
316 ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.