Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkfs(8) — Ultrix-11 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

dir(5)

filsys(5)

boot(8)

volcopy(8)

mkfs(8)

NAME

mkfs − construct a file system

SYNTAX

/etc/mkfs special proto/size [ disk cpu ] [ fsname volname ]
/etc/mkfs special proto/size [ m n ] [ fsname volname ]

DESCRIPTION

The mkfs command constructs a file system by writing on the special file special according to the specification proto/size.  The proto/size specification is either a prototype file containing instructions on how to build the file system, or a number specifying the size of the file system. 

The prototype file contains tokens separated by spaces or new lines.  The first token is the name of a file to be copied onto block zero as the bootstrap program, see boot(8).  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, perhaps diminished by space for swapping.  The next token is the number of inodes in the ilist.  The next set of tokens comprise the specification for the root file.  File specifications consist of tokens giving the mode, the userid, the groupid, and the initial contents of the file.  The syntax of the contents field depends on the mode. 

The mode token for a file is a 6 character string.  The first character specifies the type of the file.  The characters −bcd specify regular, block special, character special and directory files respectively.  The second character of the type 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 three 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 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, mkfs makes the entries .  and ..  and then reads a list of names and (recursively) file specifications for the entries in the directory.  The scan is terminated with the token $. 

If the proto/size specification consists of a string of digits, mkfs builds a file system with a single empty directory on it.  The size of the file system is the value of proto/size interpreted as a decimal number.  The number of inodes is calculated as a function of the file system size.  The boot program is left uninitialized. 

The optional arguments m and n are the file system interleave factors , used for optimal free list spacing.  If m and n are not specified, the values m = 9 and n = 500 are used. 

The preferred method of specifying optimal free list spacing is to allow mkfs to select the optimum values of m and n according to the type of disk and processor.  The disk is the generic name of the disk (rl02, rp06, ra80, and so on) and cpu is the number of the processor (23, 34, 44, and so on). 

The optional arguments fsname and volname are the file system and volume name labels to be recorded in the last 12 characters of the superblock, char fsname(6), volname(6).  If fsname and volname are omitted, these fields are left uninitialized.  The labelit command may be use to initialize or change the fsname and volname labels after the file system has been created.  Refer to volcopy(8) for information on the labelit command. 

To create a file system on an RL02 disk, unit zero, the following command would be used:

        /etc/mkfs /dev/rrl07 10240 rl02 23 /user users

Refer to the ULTRIX-11 System Management Guide for disk partition size and layout information for all supported disks. 

A sample prototype specification follows:

/usr/mdec/uboot
4872 55
d−−777 3 1
usrd−−777 3 1
sh−−−755 3 1 /bin/sh
kend−−755 6 1
$
b0b−−644 3 1 0 0
c0c−−644 3 1 0 0
$
$

RESTRICTIONS

There should be some way to specify links. 

SEE ALSO

dir(5), filsys(5), boot(8), volcopy(8)
ULTRIX-11 System Management Guide

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026