util-linux/disk-utils/mkfs.8

124 lines
2.6 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"
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
2006-12-06 17:25:33 -06:00
.B mkfs
2006-12-06 17:25:32 -06:00
[
.B \-V
]
[
.B \-t
.I fstype
]
[
.B fs-options
]
.I filesys
2006-12-06 17:25:33 -06:00
[
.I blocks
]
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 the mount point (e.g.
.IR / ,
.IR /usr ,
.IR /home )
for the file system.
2006-12-06 17:25:33 -06:00
.I blocks
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\fR.\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
.B -V
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.
.TP
.BI -t \ fstype
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
.B 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
2006-12-06 17:25:33 -06:00
.B -c
Check the device for bad blocks before building the file system.
2006-12-06 17:25:32 -06:00
.TP
2006-12-06 17:25:33 -06:00
.BI -l \ filename
Read the bad blocks list from
.I filename
2006-12-06 17:25:32 -06:00
.TP
2006-12-06 17:25:33 -06:00
.B -v
2006-12-06 17:25:32 -06:00
Produce verbose output.
.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
(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),
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)