MKFS.MFS(1)

NAME
mkfs.mfs - make a file system

SYNOPSIS
mkfs.mfs [-ldtv] [-B blocksize] [-i inodes] [-b blocks] [-z zone_shift] [-x extra_space] [-I fs_offset] [-T timestamp] special [prototype]

OPTIONS
The following options are available:

-l  Make a listing on standard output

-d  Use mod time of mkfs.mfs binary for all files

-t  Do not test if file system fits on the medium

-v  Be verbose on standard error stream; more

-v  options add to verbosity

-i inodes
    Number of i-nodes (files)

-B blocksize
    Filesystem block size (in bytes)

-b blocks
    Filesystem size (in blocks)

-I fs_offset
    Write filesystem starting at offset (in bytes)

-T timestamp
    Use timestamp for inode times

-x extra_space
    Extra space after dynamic sizing (blocks and inodes)

-z zone_shift
    Logarithm of the size of a zone with respect to a zone. With the default value of 0 zones are of the same size as blocks; with 1, each zone is made of two blocks; etc.

EXAMPLES

1.  Make a file system on /dev/ram1

    mkfs.mfs /dev/ram1 proto

2.  Make empty 300,000-block file system

    mkfs.mfs -b 300000 /dev/c0d0p0s0

3.  Alternate way to specify the size

    mkfs.mfs /dev/c0d0p0s0 300000

DESCRIPTION
The mkfs.mfs builds a file system and copies specified files to it. The prototype file tells which directories and files to copy to it. If the prototype file cannot be opened, and its name is just a string of digits, an empty file system will be made with the specified number of blocks. A sample prototype file follows. The text following the # sign in the example below is comment. In real prototype files, comments are not allowed.

    	boot			# boot block file (ignored)
    	360 63			# blocks and i-nodes
    	d--755 1 1		# root directory
    	   bin	d--755 2 1	# bin dir: mode (755), uid (2), gid (1)
    		sh	---755 2 1 /user/bin/shell	# shell has mode rwxr-xr-x
    		mv	-u-755 2 1 /user/bin/mv	# u = SETUID bit
    		login	-ug755 2 1 /user/bin/login	# SETUID and SETGID
    	   $			# end of /bin
    	   dev	d--755 2 1	# special files: tty (char), fd0 (block)
    		tty	c--777 2 1 4 0	# uid=2, gid=1, major=4, minor=0
    		fd0	b--644 2 1 2 0 360	# uid, gid, major, minor, blocks
    	   $			# end of /dev
    	   user	d--755 12 1	# user dir: mode (755), uid (12), gid (1)
    		ast	d--755 12 1	# /user/ast
    		$		# /user/ast is empty
    	   $			# end of /user
    	$			# end of root directory

The first entry on each line (except the first 3 and the $ lines, which terminate directories) is the name the file or directory will get on the new file system. Next comes its mode, with the first character being -dbcs for regular files, directories, block special files, character special files, and symlinks, respectively. The next two characters are used to specify the SETUID and SETGID bits, as shown above. The last three characters of the mode are the rwx protection bits, in octal notation.

Following the mode are the uid and gid. For special files, the major and minor devices are needed.

SEE ALSO
mkproto(1), fsck.mfs(1), mount(1).

AUTHORS
The mkfs.mfs utility was written by Andy Tanenbaum, Paul Ogilvie, Frans Meulenbroeks, Bruce Evans