1MKFS(8)                      System Administration                     MKFS(8)
2
3
4

NAME

6       mkfs - build a Linux filesystem
7

SYNOPSIS

9       mkfs [options] [-t type] [fs-options] device [size]
10

DESCRIPTION

12       mkfs  is  used  to build a Linux filesystem on a device, usually a hard
13       disk partition.  The device argument is either the  device  name  (e.g.
14       /dev/hda1,  /dev/sdb2),  or  a  regular  file  that  shall  contain the
15       filesystem.  The size argument is the number of blocks to be  used  for
16       the filesystem.
17
18       The exit code returned by mkfs is 0 on success and 1 on failure.
19
20       In  actuality,  mkfs  is  simply a front-end for the various filesystem
21       builders (mkfs.fstype) available under Linux.  The  filesystem-specific
22       builder is searched for in a number of directories, like perhaps /sbin,
23       /sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise  list  is  defined  at
24       compile  time but at least contains /sbin and /sbin/fs), and finally in
25       the directories listed in the PATH environment  variable.   Please  see
26       the filesystem-specific builder manual pages for further details.
27

OPTIONS

29       -t, --type type
30              Specify  the  type of filesystem to be built.  If not specified,
31              the default filesystem type (currently ext2) is used.
32
33       fs-options
34              Filesystem-specific options to be passed to the real  filesystem
35              builder.   Although  not  guaranteed,  the following options are
36              supported by most filesystem builders.
37
38       -V, --verbose
39              Produce verbose output, including all  filesystem-specific  com‐
40              mands  that are executed.  Specifying this option more than once
41              inhibits execution of any filesystem-specific commands.  This is
42              really only useful for testing.
43
44       -V, --version
45              Display  version  information and exit.  (Option -V will display
46              version information only when it is the only  parameter,  other‐
47              wise it will work as --verbose.)
48
49       -h, --help
50              Display help and exit.
51

BUGS

53       All  generic  options must precede and not be combined with filesystem-
54       specific options.  Some filesystem-specific programs do not support the
55       -V  (verbose)  option,  nor  return  meaningful exit codes.  Also, some
56       filesystem-specific programs do not  automatically  detect  the  device
57       size and require the size parameter to be specified.
58

AUTHORS

60       David Engel (david@ods.com)
61       Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
62       Ron Sommeling (sommel@sci.kun.nl)
63       The  manual  page  was shamelessly adapted from Remy Card's version for
64       the ext2 filesystem.
65

SEE ALSO

67       fs(5),  badblocks(8),  fsck(8),  mkdosfs(8),  mke2fs(8),   mkfs.bfs(8),
68       mkfs.ext2(8), mkfs.ext3(8), mkfs.ext4(8), mkfs.minix(8), mkfs.msdos(8),
69       mkfs.vfat(8), mkfs.xfs(8), mkfs.xiafs(8)
70

AVAILABILITY

72       The mkfs command is part of the util-linux  package  and  is  available
73       from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
74
75
76
77util-linux                         June 2011                           MKFS(8)
Impressum