• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

newfs

newfs

newfs Constructs a new file system.
newfs [-NO] [-S <sector-size>] [-a <maxcontig>] [-b <blocksize>] [-c
<cylinders>] [-d <rotdelay>] [-e <maxbpg>] [-f <frag-size>] [-i
<bytes>] [-k <skew>] [-l <interleave>] [-m <free-space>] [-n <nrpos>]
[-o <optimization>] [-p <sectors>] [-r <revolutions>] [-s <size>] [-t
<fstype>] [-u <sectors>] [-x <sectors>] [-z <tracks>] <special>
								

newfs replaces the more obtuse mkfs (8) program. Before running newfs, the disk must be labeled using disklabel. newfs builds a file system on the specified special device basing its defaults on the information in the disk label. Typically, the defaults are reasonable; however, newfs has numerous options to allow the defaults to be selectively overridden.
-N Causes the file system parameters to be printed out without really creating the file system.
-O Creates a 4.3BSD format file system. This option is primarily used to build root file systems that can be understood by older boot ROMs.
-a <maxcontig> Specifies the maximum number of contiguous blocks that will be laid out before forcing a rotational delay (see the -d option). The default value is 8. See tunefs (8) for more details on how to set this option.
-b <blocksize> Specifies the block size of the file system, in bytes.
-c <#cylinders/group> Specifies the number of cylinders per cylinder group in a file system. The default is 16.
-d <rotdelay> Specifies the expected time (in milliseconds) to service a transfer completion interrupt and initiate a new transfer on the same disk. The default is 0 milliseconds. See tunefs (8) for more details on how to set this option.
-e <maxbpg> Indicates the maximum number of blocks any single file can allocate out of a cylinder group before it is forced to begin allocating blocks from another cylinder group. The default is about one quarter of the total blocks in a cylinder group. See tunefs (8) for more details on how to set this option.
-f <frag-size> Specifies the fragment size of the file system in bytes.
-i <number-of-bytes-per-inode> Specifies the density of inodes in the file system. The default is to create an inode for each 4096 bytes of data space. If fewer inodes are desired, a larger number should be given.
-m <free-space-%> Specifies the percentage of space reserved from normal users; the minimum free space threshold. The default value used is 5%. See tunefs (8) for more details on how to set this option.
-n <number-of-rotational-positions> Specifies the number of distinct rotational positions. The default is 1.
-o <optimization-preference> Space or time. The file system can either be instructed to try to minimize the time spent allocating blocks or try to minimize the space fragmentation on the disk. If the value of minfree is less than 5%, the default is to optimize for time. See tunefs for more details on how to set this option.
-s <size> Specifies the size of the file system in sectors.
The following options override the standard sizes of the disk geometry. Their default values are taken from the disk label. Changing these defaults is useful only when using newfs to build a file system whose raw image will eventually be used on a different type of disk than the one on which it is initially created (for example, a write-once disk). Note that changing any of these values from their defaults will make it impossible for fsck to find the alternate superblocks if the standard superblock is lost.
-S <sector-size> Specifies the size of a sector in bytes (almost never anything but 512).
-k <sector 0 skew, per track> Describes perturbations in the media format to compensate for a slow controller. Track skew is the offset of sector 0 on track N relative to sector 0 on track N–1 on the same cylinder.
-l <hardware sector interleave> Describes perturbations in the media format to compensate for a slow controller. Interleave is a physical sector interleave on each track, specified as the denominator of the ratio:
sectors read/sectors passed over

 Thus, an interleave of 1/1 implies contiguous layout, whereas 1/2 implies logical sector 0 is separated by one sector from logical sector 1.
-p <spare sectors per track> Spare sectors (bad sector replacements) are physical sectors that occupy space at the end of each track. They are not counted as part of the sectors/track (-u) because they are not available to the file system for data allocation.
-r <revolutions/minute> Specifies the speed of the disk in revolutions per minute.
-z <#tracks/cylinder> Specifies the number of tracks/cylinder available for data allocation by the file system.
-t <fstype> Sets the file system type of the file system you wish to create. newfs will be smart enough to run the alternative newfs_XXX program instead.
-u <sectors/track> Specifies the number of sectors per track available for data collection by the file system. This does not include sectors reserved at the end of each track for bad block replacement (see the -p option).
-x <spare sectors per cylinder> Spare sectors (bad sector replacements) are physical sectors that occupy space at the end of the last track in the cylinder. They are deducted from the sectors/track (-u) of the last track of each cylinder since they are not available to the file system for data allocation.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint