MKFS(8) MKFS(8)
NAME
mkfs, mkext, flio - archive or update a file system
SYNOPSIS
disk/mkfs [-aprv] [-n name] [-s source] [-u users] [-z n]
proto
disk/mkext [-d name] [-u] [-h] file
disk/flio [-io] [-b bsize] diskfile
DESCRIPTION
Mkfs copies files from the file tree source (default /) to a
kfs file system (see kfs(4)). The kfs service is mounted on
/n/kfs, and /adm/users is copied to /n/kfs/adm/users. The
proto files are read, and any files specified in them that
are out of date are copied to /n/kfs.
Each line of the proto file specifies a file to copy.
Indentation is significant, with each level of indentation
corresponding to a level in the file tree. Fields within a
line are separated by white space. The first field is the
last path element in the destination file tree. The second
field specifies the permissions. The third field is the
owner of the file, and the fourth is the group owing the
file. The fifth field is the name of the file from which to
copy; this file is read from the current name space, not the
source file tree. All fields except the first are optional.
Names beginning with a `$' are expanded as environment vari-
ables. If the first file specified in a directory is `*',
all of the files in that directory are copied. If the first
file is `+', all of the files are copied, and all subdirec-
tories are recursively copied.
Mkfs copies only those files that are out of date. Such a
file is first copied into a temporary file in the appropri-
ate destination directory and then moved to the destination
file. Files in the kfs file system that are not specified
in the proto file are not updated and not removed.
The options to mkfs are:
a Instead of writing to a kfs file system, write an
archive file to standard output, suitable for mkext.
All files in proto, not just those out of date, are
archived.
n name
Use kfs.name as the name of the kfs service (default
Page 1 Plan 9 (printed 11/2/25)
MKFS(8) MKFS(8)
kfs).
p Update the permissions of a file even if it is up to
date.
r Copy all files.
s source
Copy from files rooted at the tree source.
u users
Copy file users into /adm/users.
v Print the names of all of the files as they are copied.
z n Copy files assuming kfs block n (default 1024) bytes
long. If a block contains only 0 bytes, it is not
copied.
Mkext unpacks archive files made by the -a option of mkfs.
The -d option specifies a directory to serve as the root of
the unpacked file system. The -u option, to be used only
when initializing a new fs(4) file system, sets the owners
of the files created to correspond to those in the archive.
(This is only permitted at the initial load of the files
into a file system.) Each file on the command line is
unpacked in one pass through the archive. If the file is a
directory, all files and subdirectories of that directory
are also unpacked. When a file is unpacked, the entire path
is created if it does not exist. If no files are specified,
the entire archive is unpacked; in this case, missing inter-
mediate directories are not created. The -h option prints
headers for the files on standard output instead of unpack-
ing the files.
Flio allows multiple floppy disks to be treated as a single
volume. With the -i option flio reads consecutive floppies
from the device file, diskfile, and writes the contents to
standard output. With the -o option flio reads from stan-
dard input and writes to diskfile. The user is prompted
whenever a new disk needs to be inserted. The -b option
specifies a blocking factor to be used on the floppy. Bsize
is a number of bytes (default 1024) or, with a trailing k, a
multiple of 1024 bytes.
EXAMPLES
Make an archive to establish a new file system:
disk/mkfs -a -u files/adm.users -s dist proto > arch
Unpack that archive onto a new file system:
Page 2 Plan 9 (printed 11/2/25)
MKFS(8) MKFS(8)
srv il!newfs
mount -c /srv/il!newfs /n/newfs
disk/mkext -u -d /n/newfs < arch
Unpack an archive from a set of floppy disks:
srv il!newfs
mount -c /srv/il!newfs /n/newfs
disk/flio -b 32k -i /dev/fd0disk | disk/mkext -u -d /n/newfs
FILES
/lib/proto/portproto
generic prototype file.
/lib/proto/cdaproto
prototype file for cda programs and libraries.
SEE ALSO
prep(8), kfscmd(8), hard(3)
Page 3 Plan 9 (printed 11/2/25)