Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mkfs(1M) — HP-UX 6.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chmod(1)

dir(4)

fs[HFS](4)

fsck[HFS](1M)

fsclean(1M)

newfs[HFS](1M)

MKFS[HFS](1M)  —  HP-UX

Series 300, 800 Only

NAME

mkfs − construct a file system

SYNOPSIS

/etc/mkfs special size [nsect ntrack blksize fragsize ncpg minfree rps nbpi]
/etc/mkfs special proto [nsect ntrack blksize fragsize ncpg minfree rps nbpi]

REMARKS

HFS file systems are normally created with the newfs(1M) command.

DESCRIPTION

Mkfs constructs a file system by writing on the special file special.  size specifies the number of DEV_BSIZE blocks in the file system.  Mkfs builds a file system with a root directory and a lost+found directory.  (see fsck(1M)) The FS_CLEAN magic number for the file system is stored in the super block.

The optional arguments allow fine tune control over the parameters of the file system. 

Nsect specifies the number of sectors per track on the disk. 

Ntrack specifies the number of tracks per cylinder on the disk. 

Blksize gives the primary block size for files on the file system.  It must be a power of two, currently selected from 4096 or 8192. 

Fragsize gives the fragment size for files on the file system.  The fragsize represents the smallest amount of disk space that will be allocated to a file.  It must be a power of two currently selected from the range DEV_BSIZE to MAXBSIZE. 

Ncpg specifies the number of disk cylinders per cylinder group.  This number must be in the range 1 to 32. 

Minfree specifies the minimum percentage of free disk space allowed.  Once the file system capacity reaches this threshold, only the super-user is allowed to allocate disk blocks.  The default value is 10%.  If a disk does not revolve at 60 revolutions per second, the rps parameter may be specified.  nbpi specifies the number of data bytes (amount of user file space) per inode slot.  The number of inodes is calculated as a function of the file system size.  If nbpi is not valid, its value defaults to 2048. 

If the second argument is a file name 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 new lines.  The first token is the name of a file to be copied onto block zero as the bootstrap program (usually /etc/BOOT).  If the name of a file is "" then it is ignored.  The second token is a number specifying the number of DEV_BSIZE byte blocks in the file system.  The next tokens comprise the specification for the root directory.  File specifications consist of tokens giving the mode, the user-id, the group id, 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 $. 

A sample prototype specification follows:

/etc/BOOT
4872
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
$
$

DEPENDENCIES

The HFS file system is implemented on Series 300 and Series 800. 

AUTHOR

Mkfs[HFS] was developed by the Hewlett-Packard Company, and the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science. 

SEE ALSO

chmod(1), dir(4), fs[HFS](4), fsck[HFS](1M), fsclean(1M), newfs[HFS](1M). 

BUGS

No way to specify links in the proto file. 

Hewlett-Packard Company  —  Version B.1,  May 11, 2021

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