mkfs \- construct a file system
by writing on the special file
In the first form of the command a numeric size is given and
builds a file system with a single empty directory on it.
The number of i-nodes is calculated as a function of the filesystem size.
(No boot program is initialized in this form of
All filesystems should have a
this should be created for each file system by running
in the root directory of a newly created file system, after
the file system is first mounted.
In bootstrapping, the second form of
In this form, the file system is constructed according to the directions
found in the prototype file
contains tokens separated by spaces or
The first token is the name of a file
to be copied onto sector zero as
The second token is a number specifying the
size of the created file system.
Typically it will be the number of blocks on the device,
The next token is the number of i-nodes
The next set of tokens comprise the specification
File specifications consist of tokens
and the initial contents of the file.
The syntax of the contents field
The mode token for a file is a 6 character string.
specifies the type of the file.
specify regular, block special,
character special and directory files
The second character of the type
to specify set-user-id mode or not.
for the set-group-id mode.
is a three digit octal number giving the
owner, group, and other read, write, execute
tokens come after the mode; they specify the
user and group ID's of the owner of the file.
If the file is a regular file,
the next token is a pathname
whence the contents and size are copied.
If the file is a block or character special file,
two decimal number tokens
follow which give the major and minor device numbers.
If the file is a directory,
reads a list of names and
file specifications for the entries
The scan is terminated with the
A sample prototype specification follows:
The arguments m and n specify the interleave factor. M should always be 3
and you should use the following table to choose n.
There should be some way to specify links.
There should be some way to specify bad blocks.