blob: ab139a4c06bbd7962e07b0aac7e4ec69cae7db03 [file] [log] [blame]
Theodore Ts'o3839e651997-04-26 13:21:57 +00001.\" -*- nroff -*-
Theodore Ts'oa418d3a1997-04-26 14:00:26 +00002.\" 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.\"
Theodore Ts'o74becf31997-04-26 14:37:06 +00005.TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
Theodore Ts'o3839e651997-04-26 13:21:57 +00006.SH NAME
7mke2fs \- create a Linux second extended file system
8.SH SYNOPSIS
9.B mke2fs
10[
11.B \-c
12|
13.\" .B \-t
14.\" test
15.\" |
16.B \-l
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000017.I filename
Theodore Ts'o3839e651997-04-26 13:21:57 +000018]
19[
20.B \-b
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000021.I block-size
Theodore Ts'o3839e651997-04-26 13:21:57 +000022]
23[
24.B \-f
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000025.I fragment-size
Theodore Ts'o3839e651997-04-26 13:21:57 +000026]
27[
28.B \-i
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000029.I bytes-per-inode
Theodore Ts'o3839e651997-04-26 13:21:57 +000030]
31[
32.B \-m
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000033.I reserved-blocks-percentage
34]
35[
36.B \-o
37.I creator-os
Theodore Ts'o3839e651997-04-26 13:21:57 +000038]
39[
Theodore Ts'of3db3561997-04-26 13:34:30 +000040.B \-q
41]
42[
Theodore Ts'o521e3681997-04-29 17:48:10 +000043.B -s sparse-super-flag
44]
45[
Theodore Ts'o3839e651997-04-26 13:21:57 +000046.B \-v
47]
Theodore Ts'of3db3561997-04-26 13:34:30 +000048[
Theodore Ts'o74becf31997-04-26 14:37:06 +000049.B \-F
50]
51[
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000052.B \-L
53.I volume-label
54]
55[
56.B \-M
57.I last-mounted-directory
58]
59[
Theodore Ts'of3db3561997-04-26 13:34:30 +000060.B \-S
61]
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000062.I device
Theodore Ts'o3839e651997-04-26 13:21:57 +000063[
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000064.I blocks-count
Theodore Ts'o3839e651997-04-26 13:21:57 +000065]
66.SH DESCRIPTION
67.B mke2fs
68is used to create a Linux second extended file system on a device (usually
69a disk partition).
70.br
71.I device
72is the special file corresponding to the device (e.g /dev/hdXX).
73.br
74.I blocks-count
75is the number of blocks on the device. If omitted,
76.B mke2fs
77automagically figures the file system size.
78.SH OPTIONS
79.TP
80.I -b block-size
81Specify the size of blocks in bytes.
82.TP
83.I -c
84Check the device for bad blocks before creating the file system, using a
85fast read-only test.
86.TP
87.I -f fragment-size
88Specify the size of fragments in bytes.
89.TP
90.I -i bytes-per-inode
91Specify the bytes/inode ratio.
92.B mke2fs
93creates an inode for every
94.I bytes-per-inode
95bytes of space on the disk. This value defaults to 4096 bytes.
96.I bytes-per-inode
97must be at least 1024.
98.TP
99.I -l filename
100Read the bad blocks list from
101.I filename
102\.
103.TP
104.I -m reserved-blocks-percentage
105Specify the percentage of reserved blocks for the super-user. This value
106defaults to 5%.
107.\" .TP
108.\" .I -t test
109.\" Check the device for bad blocks before creating the file system
110.\" using the specified test.
111.TP
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000112.I -o
113Manually override the default value of the "creator os" field of the
114filesystem. Normally the creator field is set by default to the native OS
115of the mke2fs executable.
116.TP
Theodore Ts'of3db3561997-04-26 13:34:30 +0000117.I -q
118Quiet execution. Useful if mke2fs is run in a script.
119.TP
Theodore Ts'o521e3681997-04-29 17:48:10 +0000120.I -s sparse-super-flag
121If sparse-super-flag is 1, then turn on the sparse superblock flag.
122If 0, then turn off the sparse superblock flag. (Currently, the sparse
123superblock flag defaults to off.)
124.TP
Theodore Ts'o3839e651997-04-26 13:21:57 +0000125.I -v
126Verbose execution.
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000127.TP
Theodore Ts'o74becf31997-04-26 14:37:06 +0000128.I -F
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000129Force mke2fs to run, even if the specified device is not a
130block special device.
Theodore Ts'of3db3561997-04-26 13:34:30 +0000131.TP
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000132.I -L
133Set the volume label for the filesystem.
134.TP
135.I -M
136Set the last mounted directory for the filesystem. This might be useful
137for the sake of utilities that key off of the last mounted directory to
138determine where the filesytem should be mounted.
139.TP
Theodore Ts'of3db3561997-04-26 13:34:30 +0000140.I -S
141Write superblock and group descriptors only. This is useful if all of
142the superblock and backup superblocks are corrupted, and a last-ditch
143recovery method is desired. It causes mke2fs to reinitialize the
144superblock and group descriptors, while not touching the inode table
145and the block and inode bitmaps. The
146.B e2fsck
147program should be run immediately after this option is used, and there
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000148is no guarantee that any data will be salvageable.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000149.SH AUTHOR
150This version of
151.B mke2fs
Theodore Ts'oa418d3a1997-04-26 14:00:26 +0000152has been written by Theodore Ts'o <tytso@mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000153.SH BUGS
154.B mke2fs
155accepts the -f option but currently ignores it because the second
156extended file system does not support fragments yet.
157.br
158There may be some other ones. Please, report them to the author.
159.SH AVAILABILITY
160.B mke2fs
Theodore Ts'of3db3561997-04-26 13:34:30 +0000161is available for anonymous ftp from ftp.ibp.fr and tsx-11.mit.edu in
162/pub/linux/packages/ext2fs.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000163.SH SEE ALSO
Theodore Ts'of3db3561997-04-26 13:34:30 +0000164.BT badblocks (8),
Theodore Ts'o3839e651997-04-26 13:21:57 +0000165.BR dumpe2fs (8),
166.BR e2fsck (8),
167.BR tune2fs (8)