mke2fs [options] device [blocks]
mkfs.ext2 [options] device [blocks]

System administration command. Format device as a Linux Second Extended Filesystem. You may specify the number of blocks on the device or allow mke2fs to guess.


-b block-size

Specify block size in bytes.


Scan device for bad blocks before execution.

-E featurelist

Specify extended features. This option’s parameters may be given in a comma-separated list:


Configure filesystem for a RAID array. Set stride size to size blocks per stripe.


Reserve descriptor table space to grow filesystem to the specified number of blocks.

-f fragment-size

Specify fragment size in bytes.


Force mke2fs to run even if filesystem is mounted or device is not a block special device. This option is probably best avoided.

-i bytes-per-inode

Create an inode for each bytes-per-inode of space. bytes-per-inode must be 1024 or greater; it is 4096 by default.


Create an ext3 journal. This is the same as invoking mkfs.ext3.

-J parameterlist

Use specified parameterlist to create an ext3 journal. The following two parameters may be given in a comma-separated list:


Create a journal of journal-size megabytes. The size may be between 1024 filesystem blocks and 102,400 filesystem blocks in size (e.g., 1–100 megabytes if using 1K blocks, 4–400 megabytes if using 4K blocks).


Use an external journal-device to hold the filesystem journal. The journal-device can be specified by name, by ...

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.