mkfs(8) CLIX mkfs(8)
NAME
mkfs - Constructs a file system
SYNOPSIS
/etc/mkfs special blocks[:inodes] [gap blocks/cyl]
/etc/mkfs special proto [gap blocks/cyl]
DESCRIPTION
The mkfs command constructs a file system by writing on the special file
using the values found in the remaining arguments of the command line.
The command waits 10 seconds before starting to construct the file system.
During this 10-second pause mkfs can be aborted by pressing the <Delete>
key.
If the second argument is a string of digits, the size of the file system
is the value of blocks interpreted as a decimal number. This is the
number of physical (512 byte) disk blocks the file system will occupy. If
the number of inodes is not given, the default is the number of logical
(1024 byte) blocks divided by 4. The mkfs command builds a file system
with a single empty directory on it. The boot program block (block zero)
is left uninitialized.
If the second argument is the name of a file that can be opened, mkfs
assumes it to be a prototype file, proto, and will take its directions
from that file. The prototype file contains tokens separated by spaces or
newlines. A sample prototype specification follows (line numbers have
been added to aid in the explanation):
1. /stand/ diskboot
2. 4872 110
3. d--777 3 1
4. usr d--777 3 1
5. sh ---755 3 1 /bin/sh
6. ken d--755 6 1
7. $
8. b0 b--644 3 1 0 0
9. c0 c--644 3 1 0 0
10. $
11. $
Line 1 in the example is the name of a file to be copied onto block zero
as the bootstrap program.
Line 2 specifies the number of physical (512 byte) blocks the file system
is to occupy and the number of inodes in the file system.
Lines 3-9 tell mkfs about files and directories to be included in this
2/94 - Intergraph Corporation 1
mkfs(8) CLIX mkfs(8)
file system.
Line 3 specifies the root directory.
Lines 4-6 and 8-9 specify other directories and files.
The $ on line 7 tells mkfs to end the branch of the file system it is on,
and continue from the next higher directory. The $ on lines 10 and 11 end
the process, since no additional specifications follow.
File specifications give the mode, the user ID, the group ID, and the
initial contents of the file. Valid syntax for the contents field depends
on the first character of the mode.
The mode for a file is specified by a 6-character string. The first
character specifies the type of the file. The character range is -bcd to
specify regular, block special, character special and directory files
respectively. The second character of the mode is either u or - to
specify set-user-ID mode or not. The third is g or - for the set-group-ID
mode. The rest of the mode is a 3 digit octal number giving the owner,
group, and other read, write, execute permissions (see chmod(1)).
Two decimal number tokens come after the mode; they specify the user and
group IDs of the owner of the file.
If the file is a regular file, the next token of the specification may be
a pathname whence the contents and size are copied. If the file is a
block or character special file, two decimal numbers follow which give the
major and minor device numbers. If the file is a directory, mkfs makes
the entries "" and .. then reads a list of names and recursively reads
file specifications for the entries in the directory. As noted above, the
scan is terminated with the token $.
The final argument in both forms of the command specifies the rotational
gap and the number of blocks/cyl. The following values are recommended
for the devices available on the 3B2:
Device Gap Size Blks/Cyl
____________________________________________________
30M Hard Disk 10 90
72M Hard Disk 10 162 (CDC Wren II)
72aM Hard Disk 10 144 (Micropolis)
72bM Hard Disk 10 198 (Priam)
72cM Hard Disk 10 198 (Fujitsu)
Floppy Disk 1 18
If the gap and blocks/cyl are not specified or are considered illegal
values, a default value of gap size 7 and 400 blocks/cyl is used.
FILES
2 Intergraph Corporation - 2/94
mkfs(8) CLIX mkfs(8)
/etc/vtoc/*
NOTES
With a prototype file, it is not possible to copy in a file larger than
64K bytes, nor is there a way to specify links. The maximum number of
inodes configurable is 65500.
DIAGNOSTICS
filesys: cannot open
The file system is not readable.
*** MOUNTED FILE SYSTEM
Cannot mkfs() a mounted file system.
filesys: cannot create
The creat() function failed on device.
Mkfs: cannot open boot program 'filename'
The file does not exist or has incorrect permissions.
Mkfs: cannot open proto file 'filename'
The file does not exist or has incorrect permissions.
Mkfs: 'filename' too big
The header of the boot file is the wrong size.
Mkfs: error writing boot-block
Probably a permission or space problem.
####/#### : bad ratio
There is a problem with the fsize/isize ratio.
out of free space
The mkfs command ran out of space on the device.
too many bad blocks
There are too many bad blocks on the device to make a file system.
ilist too small
There are too few inodes.
out of free extents string
EXIT VALUES
The mkfs command exits with a value of 0 if successful and a nonzero value
if an error occurs.
RELATED INFORMATION
2/94 - Intergraph Corporation 3
mkfs(8) CLIX mkfs(8)
Commands: chmod(1)
Files: dir(4), fs(4)
4 Intergraph Corporation - 2/94