OS Manuals

/usr/bin/mkfs.ext2

Standard Ext2/3/4 filesystem utilities

From e2fsprogs 1.47.4-r5 (os), captured 2026-11-05 by running mkfs.ext2 --help (exit 1). permalink

/usr/bin/mkfs.ext2: invalid option -- '-'
Usage: mkfs.ext2 [-c|-l filename] [-b block-size] [-C cluster-size]
	[-i bytes-per-inode] [-I inode-size] [-J journal-options]
	[-G flex-group-size] [-N number-of-inodes] [-d root-directory|tarball]
	[-m reserved-blocks-percentage] [-o creator-os]
	[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
	[-O feature[,...]] [-E extended-option[,...]] [-t fs-type]
	[-T usage-type ] [-U UUID] [-e errors_behavior][-z undo_file]
	[-jnqvDFSV] device [blocks-count]
Options (28)
OptionDescriptionSource
-b block-sizeSpecify the size of blocks in bytes.man
-cCheck the device for bad blocks before creating the file system.man
-C cluster-sizeSpecify the size of clusters in bytes for file systems using the bigalloc feature.man
-d root-directory|tarball|-Copy the contents of the given directory or tarball into the root directory of the file system.man
-DUse direct I/O when writing to the disk.man
-e error-behaviorChange the behavior of the kernel code when errors are detected.man
-E extended-optionsSet extended options for the file system.man
-FForce mke2fs to create a file system, even if the specified device is not a partition on a block special device, or if other parameters do not make sense.man
-g blocks-per-groupSpecify the number of blocks in a block group.man
-G number-of-groupsSpecify the number of block groups that will be packed together to create a larger virtual block group (or "flex_bg group") in an ext4 file system.man
-i bytes-per-inodeSpecify the bytes/inode ratio.man
-I inode-sizeSpecify the size of each inode in bytes.man
-jCreate the file system with an ext3 journal.man
-J journal-optionsCreate the ext3 journal using options specified on the command-line.man
-l filenameRead the bad blocks list from filename.man
-L new-volume-labelSet the volume label for the file system to new-volume-label.man
-m reserved-blocks-percentageSpecify the percentage of the file system blocks reserved for the super-user.man
-M last-mounted-directorySet the last mounted directory for the file system.man
-nCauses mke2fs to not actually create a file system, but display what it would do if it were to create a file system.man
-N number-of-inodesOverrides the default calculation of the number of inodes that should be reserved for the file system (which is based on the number of blocks and the bytes-per-inode ratio).man
-o creator-osOverrides the default value of the "creator operating system" field of the file system.man
-qQuiet execution.man
-SWrite superblock and group descriptors only.man
-t fs-typeSpecify the file system type (i.e., ext2, ext3, ext4, etc.) that is to be created.man
-U UUIDSet the universally unique identifier (UUID) of the file system to UUID.man
-vVerbose execution.man
-VPrint the version number of mke2fs and exit.man
-z undo_fileBefore overwriting a file system block, write the old contents of the block to an undo file.man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.