util-linux/disk-utils/mkfs.8

112 lines
2.9 KiB
Groff
Raw Normal View History

2006-12-06 17:25:32 -06:00
.\" -*- nroff -*-
2006-12-06 17:25:33 -06:00
.TH MKFS 8 "Jun 1995" "Version 1.9"
.TH MKFS "8" "June 2011" "util-linux" "System Administration Utilities"
2006-12-06 17:25:32 -06:00
.SH NAME
2006-12-06 17:25:33 -06:00
mkfs \- build a Linux file system
2006-12-06 17:25:32 -06:00
.SH SYNOPSIS
.SH SYNOPSIS
2006-12-06 17:25:33 -06:00
.B mkfs
[\fIoptions\fR] [\fI-t type fs-options\fR] \fIdevice \fR[\fIsize\fR]
2006-12-06 17:25:32 -06:00
.SH DESCRIPTION
2006-12-06 17:25:33 -06:00
.B mkfs
is used to build a Linux file system on a device, usually
a hard disk partition.
2006-12-06 17:25:32 -06:00
.I filesys
2006-12-06 17:25:39 -06:00
is either the device name (e.g.
.IR /dev/hda1 ,
.IR /dev/sdb2 ),
or a regular file that shall contain the file system.
The
.I size
argument is the number of blocks to be used for the file system.
2006-12-06 17:25:32 -06:00
.PP
The exit code returned by
2006-12-06 17:25:33 -06:00
.B mkfs
is 0 on success and 1 on failure.
2006-12-06 17:25:32 -06:00
.PP
In actuality,
2006-12-06 17:25:33 -06:00
.B mkfs
is simply a front-end for the various file system builders
(\fBmkfs.\fIfstype\fR)
2006-12-06 17:25:32 -06:00
available under Linux.
2006-12-06 17:25:35 -06:00
The file system-specific builder is searched for in a number
2006-12-06 17:25:39 -06:00
of directories like perhaps
.IR /sbin ,
.IR /sbin/fs ,
.IR /sbin/fs.d ,
.IR /etc/fs ,
.I /etc
2006-12-06 17:25:35 -06:00
(the precise list is defined at compile time but at least
2006-12-06 17:25:39 -06:00
contains
.I /sbin
and
.IR /sbin/fs ),
and finally in the directories
listed in the PATH environment variable.
2006-12-06 17:25:33 -06:00
Please see the file system-specific builder manual pages for
2006-12-06 17:25:32 -06:00
further details.
.SH OPTIONS
.TP
\fB\-t\fR, \fB\-\-type\fR=\fITYPE\fR
2006-12-06 17:25:33 -06:00
Specifies the type of file system to be built.
2006-12-06 17:25:37 -06:00
If not specified, the default file system type
(currently ext2) is used.
2006-12-06 17:25:32 -06:00
.TP
.I fs-options
File system-specific options to be passed to the real file
2006-12-06 17:25:33 -06:00
system builder.
2006-12-06 17:25:32 -06:00
Although not guaranteed, the following options are supported
2006-12-06 17:25:33 -06:00
by most file system builders.
2006-12-06 17:25:32 -06:00
.TP
\fB\-V\fR, \fB\-\-verbose\fR
Produce verbose output, including all file system-specific commands
that are executed.
Specifying this option more than once inhibits execution of any
file system-specific commands.
This is really only useful for testing.
2006-12-06 17:25:32 -06:00
.TP
\fB\-V\fR, \fB\-\-version\fR
output version information and exit
\fB\-V\fR will output version information only when it is the
only parameter.
2006-12-06 17:25:32 -06:00
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help and exit.
2006-12-06 17:25:32 -06:00
.SH BUGS
All generic options must precede and not be combined with
file system-specific options.
Some file system-specific programs do not support the
.I -V
2006-12-06 17:25:32 -06:00
(verbose) option, nor return meaningful exit codes.
2006-12-06 17:25:33 -06:00
Also, some file system-specific programs do not automatically
detect the device size and require the
.I blocks
parameter to be specified.
2006-12-06 17:25:32 -06:00
.SH AUTHORS
David Engel (david@ods.com)
.br
Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
.br
2006-12-06 17:25:33 -06:00
Ron Sommeling (sommel@sci.kun.nl)
.br
2006-12-06 17:25:32 -06:00
The manual page was shamelessly adapted from Remy Card's version
for the ext2 file system.
.SH SEE ALSO
2006-12-06 17:25:39 -06:00
.BR fs (5),
.BR badblocks (8),
2006-12-06 17:25:33 -06:00
.BR fsck (8),
2006-12-06 17:25:39 -06:00
.BR mkdosfs (8),
.BR mke2fs (8),
.BR mkfs.bfs (8),
2006-12-06 17:25:33 -06:00
.BR mkfs.ext2 (8),
.BR mkfs.ext3 (8),
.BR mkfs.ext4 (8),
2006-12-06 17:25:39 -06:00
.BR mkfs.minix (8),
.BR mkfs.msdos (8),
.BR mkfs.vfat (8),
.BR mkfs.xfs (8),
2006-12-06 17:25:39 -06:00
.BR mkfs.xiafs (8)
.SH AVAILABILITY
The mkfs command is part of the util-linux package and is available from
ftp://ftp.kernel.org/pub/linux/utils/util-linux/.