blob: 7b109373d38cc24895a9cece9ee35eba4de5f78e [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'oa29f4d31997-04-29 21:26:48 +000043.B \-r fs-revision-level
44]
45[
46.B -R raid_options
47]
48[
Theodore Ts'o521e3681997-04-29 17:48:10 +000049.B -s sparse-super-flag
50]
51[
Theodore Ts'o3839e651997-04-26 13:21:57 +000052.B \-v
53]
Theodore Ts'of3db3561997-04-26 13:34:30 +000054[
Theodore Ts'o74becf31997-04-26 14:37:06 +000055.B \-F
56]
57[
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000058.B \-L
59.I volume-label
60]
61[
62.B \-M
63.I last-mounted-directory
64]
65[
Theodore Ts'of3db3561997-04-26 13:34:30 +000066.B \-S
67]
Theodore Ts'o818180c1998-06-27 05:11:14 +000068[
69.B \-V
70]
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000071.I device
Theodore Ts'o3839e651997-04-26 13:21:57 +000072[
Theodore Ts'o1e3472c1997-04-29 14:53:37 +000073.I blocks-count
Theodore Ts'o3839e651997-04-26 13:21:57 +000074]
75.SH DESCRIPTION
76.B mke2fs
77is used to create a Linux second extended file system on a device (usually
78a disk partition).
79.br
80.I device
81is the special file corresponding to the device (e.g /dev/hdXX).
82.br
83.I blocks-count
84is the number of blocks on the device. If omitted,
85.B mke2fs
86automagically figures the file system size.
87.SH OPTIONS
88.TP
89.I -b block-size
90Specify the size of blocks in bytes.
91.TP
92.I -c
93Check the device for bad blocks before creating the file system, using a
94fast read-only test.
95.TP
96.I -f fragment-size
97Specify the size of fragments in bytes.
98.TP
99.I -i bytes-per-inode
100Specify the bytes/inode ratio.
101.B mke2fs
102creates an inode for every
103.I bytes-per-inode
104bytes of space on the disk. This value defaults to 4096 bytes.
105.I bytes-per-inode
106must be at least 1024.
107.TP
108.I -l filename
109Read the bad blocks list from
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000110.I filename.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000111\.
112.TP
113.I -m reserved-blocks-percentage
114Specify the percentage of reserved blocks for the super-user. This value
115defaults to 5%.
116.\" .TP
117.\" .I -t test
118.\" Check the device for bad blocks before creating the file system
119.\" using the specified test.
120.TP
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000121.I -o
122Manually override the default value of the "creator os" field of the
123filesystem. Normally the creator field is set by default to the native OS
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000124of the
125.B mke2fs
126executable.
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000127.TP
Theodore Ts'of3db3561997-04-26 13:34:30 +0000128.I -q
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000129Quiet execution. Useful if
130.B mke2fs
131is run in a script.
Theodore Ts'of3db3561997-04-26 13:34:30 +0000132.TP
Theodore Ts'o521e3681997-04-29 17:48:10 +0000133.I -s sparse-super-flag
134If sparse-super-flag is 1, then turn on the sparse superblock flag.
135If 0, then turn off the sparse superblock flag. (Currently, the sparse
Theodore Ts'oa29f4d31997-04-29 21:26:48 +0000136superblock flag defaults to off.)
137.B Warning:
138The Linux 2.0 kernel does not properly support this feature. Neither do
139all Linux 2.1 kernels; please don't use this unless you know what you're
140doing!
Theodore Ts'o521e3681997-04-29 17:48:10 +0000141.TP
Theodore Ts'o3839e651997-04-26 13:21:57 +0000142.I -v
143Verbose execution.
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000144.TP
Theodore Ts'o74becf31997-04-26 14:37:06 +0000145.I -F
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000146Force
147.B mke2fs
148to run, even if the specified device is not a
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000149block special device.
Theodore Ts'of3db3561997-04-26 13:34:30 +0000150.TP
Theodore Ts'o1e3472c1997-04-29 14:53:37 +0000151.I -L
152Set the volume label for the filesystem.
153.TP
154.I -M
155Set the last mounted directory for the filesystem. This might be useful
156for the sake of utilities that key off of the last mounted directory to
157determine where the filesytem should be mounted.
158.TP
Theodore Ts'oa29f4d31997-04-29 21:26:48 +0000159.I -r revision
160Set the filesystem revision for the new filesystem. Note that 1.2
161kernels only support revision 0 filesystems.
162.TP
163.I -R raid_options
164Set raid-related options for the filesystem. Raid options are common
165separated, and may take an argument using the equals ('=') sign.
166Currently the only supported argument is
167.I stride
168which takes as its argument the number of blocks in a RAID stripe.
169.TP
Theodore Ts'of3db3561997-04-26 13:34:30 +0000170.I -S
171Write superblock and group descriptors only. This is useful if all of
172the superblock and backup superblocks are corrupted, and a last-ditch
Theodore Ts'o583ccdc1997-05-09 03:06:31 +0000173recovery method is desired. It causes
174.B mke2fs
175to reinitialize the
Theodore Ts'of3db3561997-04-26 13:34:30 +0000176superblock and group descriptors, while not touching the inode table
177and the block and inode bitmaps. The
178.B e2fsck
179program should be run immediately after this option is used, and there
Theodore Ts'o7f88b041997-04-26 14:48:50 +0000180is no guarantee that any data will be salvageable.
Theodore Ts'o818180c1998-06-27 05:11:14 +0000181.TP
182.I -V
183print the version number of
184.B mke2fs
185and exit.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000186.SH AUTHOR
187This version of
188.B mke2fs
Theodore Ts'oa418d3a1997-04-26 14:00:26 +0000189has been written by Theodore Ts'o <tytso@mit.edu>.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000190.SH BUGS
191.B mke2fs
192accepts the -f option but currently ignores it because the second
193extended file system does not support fragments yet.
194.br
195There may be some other ones. Please, report them to the author.
196.SH AVAILABILITY
197.B mke2fs
Theodore Ts'oa789d841998-03-30 01:20:55 +0000198is part of the e2fsprogs package and is available for anonymous
199ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.
Theodore Ts'o3839e651997-04-26 13:21:57 +0000200.SH SEE ALSO
Theodore Ts'of3db3561997-04-26 13:34:30 +0000201.BT badblocks (8),
Theodore Ts'o3839e651997-04-26 13:21:57 +0000202.BR dumpe2fs (8),
203.BR e2fsck (8),
204.BR tune2fs (8)