Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / misc / mke2fs.8.in
1 .\" -*- nroff -*-
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 .\" 
5 .TH MKE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
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
14 .\" test
15 .\" |
16 .B \-l
17 .I filename
18 ]
19 [
20 .B \-b
21 .I block-size
22 ]
23 [
24 .B \-f
25 .I fragment-size
26 ]
27 [
28 .B \-i
29 .I bytes-per-inode
30 ]
31 [
32 .B \-m
33 .I reserved-blocks-percentage
34 ]
35 [
36 .B \-o
37 .I creator-os
38 ]
39 [
40 .B \-q
41 ]
42 [
43 .B \-v
44 ]
45 [
46 .B \-F
47 ]
48 [
49 .B \-L
50 .I volume-label
51 ]
52 [
53 .B \-M
54 .I last-mounted-directory
55 ]
56 [
57 .B \-S
58 ]
59 .I device
60 [
61 .I blocks-count
62 ]
63 .SH DESCRIPTION
64 .B mke2fs
65 is used to create a Linux second extended file system on a device (usually
66 a disk partition).
67 .br
68 .I device
69 is the special file corresponding to the device (e.g /dev/hdXX).
70 .br
71 .I blocks-count
72 is the number of blocks on the device.  If omitted,
73 .B mke2fs
74 automagically figures the file system size.
75 .SH OPTIONS
76 .TP
77 .I -b block-size
78 Specify the size of blocks in bytes.
79 .TP
80 .I -c
81 Check the device for bad blocks before creating the file system, using a
82 fast read-only test.
83 .TP
84 .I -f fragment-size
85 Specify the size of fragments in bytes.
86 .TP
87 .I -i bytes-per-inode
88 Specify the bytes/inode ratio. 
89 .B mke2fs
90 creates an inode for every
91 .I bytes-per-inode
92 bytes of space on the disk.  This value defaults to 4096 bytes.
93 .I bytes-per-inode
94 must be at least 1024.
95 .TP
96 .I -l filename
97 Read the bad blocks list from
98 .I filename
99 \.
100 .TP
101 .I -m reserved-blocks-percentage
102 Specify the percentage of reserved blocks for the super-user.  This value
103 defaults to 5%.
104 .\" .TP
105 .\" .I -t test
106 .\" Check the device for bad blocks before creating the file system
107 .\" using the specified test.
108 .TP
109 .I -o
110 Manually override the default value of the "creator os" field of the 
111 filesystem.  Normally the creator field is set by default to the native OS
112 of the mke2fs executable.
113 .TP
114 .I -q
115 Quiet execution.  Useful if mke2fs is run in a script.
116 .TP
117 .I -v
118 Verbose execution.
119 .TP
120 .I -F
121 Force mke2fs to run, even if the specified device is not a 
122 block special device.
123 .TP
124 .I -L
125 Set the volume label for the filesystem.
126 .TP
127 .I -M
128 Set the last mounted directory for the filesystem.  This might be useful 
129 for the sake of utilities that key off of the last mounted directory to 
130 determine where the filesytem should be mounted.
131 .TP
132 .I -S
133 Write superblock and group descriptors only.  This is useful if all of
134 the superblock and backup superblocks are corrupted, and a last-ditch
135 recovery method is desired.  It causes mke2fs to reinitialize the
136 superblock and group descriptors, while not touching the inode table
137 and the block and inode bitmaps.  The
138 .B e2fsck
139 program should be run immediately after this option is used, and there
140 is no guarantee that any data will be salvageable.
141 .SH AUTHOR
142 This version of
143 .B mke2fs
144 has been written by Theodore Ts'o <tytso@mit.edu>.
145 .SH BUGS
146 .B mke2fs
147 accepts the -f option but currently ignores it because the second
148 extended file system does not support fragments yet.
149 .br
150 There may be some other ones.  Please, report them to the author.
151 .SH AVAILABILITY
152 .B mke2fs
153 is available for anonymous ftp from ftp.ibp.fr and tsx-11.mit.edu in
154 /pub/linux/packages/ext2fs.
155 .SH SEE ALSO
156 .BT badblocks (8),
157 .BR dumpe2fs (8),
158 .BR e2fsck (8),
159 .BR tune2fs (8)