The Linux mke2fs command is used to create an ext2 file system.
Syntax
Mke2fs [-cFMqrSvV] [-B <block size>] [-f <discontinuous block size>] [-I <byte>] [-N <inode count>] [- l <FILE>]
[-L <tag>] [-m <percentage value>] [-R = <number of blocks>] [device name] [number of blocks]
Parameters:
- -B <block size> specifies the block size, in bytes.
- -C. Check whether any damaged block exists.
- -F <size of discontinuous segments> specifies the size of discontinuous segments, in bytes.
- -F enforces mke2fs regardless of the specified device.
- -I <byte> specifies the ratio of "byte/inode.
- -N <inode count> specifies the number of inode to be created.
- -L <FILE> reads information about damaged blocks in the west of the file from the specified file.
- -L <tag> set the tag name of the file system.
- -M <percentage value> specifies the percentage of blocks reserved by the administrator. The default value is 5%.
- -M records the last mounted directory.
- -No information is displayed when q is executed.
- -R specifies the version of the ext2 file system to be created.
- -R = <number of blocks> set disk array parameters.
- -S writes only superblock and group descriptors, without changing inode able inode bitmap and block bitmap.
- -V displays detailed information during execution.
- -V displays the version information.