NEWFS(8) — UNIX Programmer’s Manual
NAME
newfs − construct a new file system
SYNOPSIS
/etc/newfs [ −v ] [ −n ] [mkfs-options] special disk-type
DESCRIPTION
Newfs is a “friendly” front-end to the mkfs(8) program. Special is the device special file on which the new file system is to be created, and disk-type is the type of disk as specified in the disk description file /etc/disktab. Newfs consults /etc/disktab to determine the characteristics of the disk, calculate the appropriate parameters to use in calling mkfs, then build the file system by forking mkfs and, if the file system is a root partition, install the necessary bootstrap programs in the initial 8 sectors of the device. The −n option prevents the bootstrap programs from being installed.
Warning: newfs installs the bootstrap program into the ’c’ partition. If the ’c’ partition does not start at the beginning of the disk, use the −n option and use installboot(8).
If the −v option is supplied, newfs will print out its actions, including the parameters passed to mkfs.
Newfs uses fsirand(8) as a security precaution.
Options which may be used to override default parameters passed to mkfs are:
−s size The size of the file system in sectors.
−b block-size
The block size of the file system in bytes.
−f frag-size
The fragment size of the file system in bytes.
−t #tracks/cylinder
−c #cylinders/group
The number of cylinders per cylinder group in a file system. The default value used is 16.
−m free space %
The percentage of space reserved from normal users; the minimum free space threshhold. The default value used is 10%.
−r revolutions/minute
The speed of the disk in revolutions per minute (usually 3600).
−S sector-size
The size of a sector in bytes (almost always 512).
−i number of bytes per inode
This specifies the density of inodes in the file system. The default is to create an inode for each 2048 bytes of data space. If fewer inodes are desired, a larger number should be used; to create more inodes a smaller number should be given.
FILES
/etc/disktabfor disk geometry and file system partition information
/etc/mkfsto actually build the file system
/standfor bootstrapping programs
SEE ALSO
diskpart(8), disktab(5), fs(5), fsck(8), fsirand(8), mkfs(8), tunefs(8)
McKusick, Joy, Leffler; "A Fast File System for Unix", Computer Systems Research Group, Dept of EECS, Berkeley, CA 94720; TR #7, September 1982.
BUGS
Newfs should be able to determine the type of disk without the user’s help.
4BSD