Computer Science


MKE2FS(8)                                               MKE2FS(8)

NAME
       mke2fs - create a Linux second extended file system

SYNOPSIS
       mke2fs  [  -c | -l filename ] [ -b block-size ] [ -f frag-
       ment-size ] [ -i bytes-per-inode ] [ -N number-of-inodes ]
       [ -m reserved-blocks-percentage ] [ -o creator-os ] [ -q ]
       [ -r fs-revision-level ] [ -R raid_options ] [ -s  sparse-
       super-flag  ] [ -v ] [ -F ] [ -L volume-label ] [ -M last-
       mounted-directory ] [ -S ] [ -V ] device [ blocks-count ]

DESCRIPTION
       mke2fs is used to create a Linux second extended file sys-
       tem on a device (usually a disk partition).
       device  is  the  special  file corresponding to the device
       (e.g /dev/hdXX).
       blocks-count is the number of blocks on  the  device.   If
       omitted,  mke2fs  automagically  figures  the  file system
       size.

OPTIONS
       -b block-size
              Specify the size of blocks in bytes.

       -c     Check the device for bad blocks before creating the
              file system, using a fast read-only test.

       -f fragment-size
              Specify the size of fragments in bytes.

       -i bytes-per-inode
              Specify  the  bytes/inode ratio.  mke2fs creates an
              inode for every bytes-per-inode bytes of  space  on
              the  disk.   This  value  defaults  to  4096 bytes.
              bytes-per-inode must be at least 1024.

       -N number-of-inodes
              overrides the default calculation of the number  of
              inodes  that  should be reserved for the filesystem
              (which is based on the number  of  blocks  and  the
              bytes-per-inode  ratio).   This  allows the user to
              specify the number of desired inodes directly.

       -l filename
              Read the bad blocks list from filename.

       -m reserved-blocks-percentage
              Specify the percentage of reserved blocks  for  the
              super-user.  This value defaults to 5%.

       -o     Manually override the default value of the "creator
              os" field of the filesystem.  Normally the  creator
              field  is  set  by  default to the native OS of the
              mke2fs executable.

       -q     Quiet execution.  Useful if  mke2fs  is  run  in  a
              script.

       -s sparse-super-flag
              If  sparse-super-flag is 1, then turn on the sparse
              superblock flag.  If 0, then turn  off  the  sparse
              superblock flag.  (Currently, the sparse superblock
              flag defaults to off.)  Warning: The Linux 2.0 ker-
              nel  does  not properly support this feature.  Nei-
              ther do all Linux 2.1  kernels;  please  don't  use
              this unless you know what you're doing!

       -v     Verbose execution.

       -F     Force  mke2fs  to run, even if the specified device
              is not a block special device.

       -L     Set the volume label for the filesystem.

       -M     Set the last mounted directory for the  filesystem.
              This might be useful for the sake of utilities that
              key off of the last mounted directory to  determine
              where the filesytem should be mounted.

       -r revision
              Set the filesystem revision for the new filesystem.
              Note that  1.2  kernels  only  support  revision  0
              filesystems.

       -R raid_options
              Set  raid-related options for the filesystem.  Raid
              options are comma separated, and may take an  argu-
              ment  using  the equals ('=')  sign.  Currently the
              only supported argument is stride  which  takes  as
              its argument the number of blocks in a RAID stripe.

       -S     Write superblock and group descriptors only.   This
              is  useful  if  all  of  the  superblock and backup
              superblocks are corrupted, and a last-ditch  recov-
              ery  method is desired.  It causes mke2fs to reini-
              tialize the superblock and group descriptors, while
              not  touching  the  inode  table  and the block and
              inode bitmaps.  The e2fsck program  should  be  run
              immediately after this option is used, and there is
              no guarantee that any data will be salvageable.

       -V     print the version number of mke2fs and exit.

AUTHOR
       This version of mke2fs has been written by  Theodore  Ts'o
       <tytso@mit.edu>.

BUGS
       mke2fs  accepts  the  -f  option  but currently ignores it
       because the second extended file system does  not  support
       fragments yet.
       There  may be some other ones.  Please, report them to the
       author.

AVAILABILITY
       mke2fs is part of the e2fsprogs package and  is  available
       for  anonymous ftp from tsx-11.mit.edu in /pub/linux/pack-
       ages/ext2fs.

SEE ALSO
       dumpe2fs(8), e2fsck(8), tune2fs(8)

E2fsprogs version 1.14     January 1999                         1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page