Name

mke2fs

Synopsis

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.

Options

-b block-size

Specify block size in bytes.

-c

Scan device for bad blocks before execution.

-E featurelist

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

stride=size

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

resize=blocks

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

-f fragment-size

Specify fragment size in bytes.

-F

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.

-j

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:

size=journal-size

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).

device=journal-device

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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.