The
newfs_msdos utility creates a FAT12, FAT16, or FAT32 file system on device or file named
special, using
disktab(5) entry
disktype to determine geometry, if required.
The options are as follow:
-N
Don't create a file system: just print out parameters.
-@ offset
Build the filesystem at the specified offset in bytes in the device or file. A suffix s, k, m, g (lower or upper case) appended to the offset specifies that the number is in sectors, kilobytes, megabytes or gigabytes, respectively.
-B boot
Get bootstrap from file.
-C create-size
Create the image file with the specified size. A suffix character appended to the size is interpreted as for the -@ option. The file is created by truncating any existing file with the same name, seeking just before the required size and writing a single 0 byte. As a consequence, the space occupied on disk may be smaller than the size specified as a parameter.
-F FAT-type
FAT type (one of 12, 16, or 32).
-L label
Volume label (up to 11 characters). The label should consist of only those characters permitted in regular DOS (8+3) filenames. The default is “NO_NAME”.
-O OEM
OEM string (up to 8 characters). The default is “NetBSD”.
-S sector-size
Number of bytes per sector. Acceptable values are powers of 2 in the range 512 through 32768.
-a FAT-size
Number of sectors per FAT.
-b block-size
File system block size (bytes per cluster). This should resolve to an acceptable number of sectors per cluster (see below).
-c cluster-size
Sectors per cluster. Acceptable values are powers of 2 in the range 1 through 128. If the block or cluster size are not specified, the code uses a cluster between 512 bytes and 32K depending on the filesystem size.
-e dirents
Number of root directory entries (FAT12 and FAT16 only).
-f format
Specify a standard (floppy disk) format. The standard formats are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200, 1232, 1440, 2880.
-h heads
Number of drive heads.
-i info
Location of the file system info sector (FAT32 only). A value of 0xffff signifies no info sector.
-k backup
Location of the backup boot sector (FAT32 only). A value of 0xffff signifies no backup sector.
-m media
Media descriptor (acceptable range 0xf0 to 0xff).
-n FATs
Number of FATs. Acceptable values are 1 to 16 inclusive. The default is 2.
-o hidden
Number of hidden sectors.
-r reserved
Number of reserved sectors.
-s total
File system size.
-u track-size
Number of sectors per track.
If
newfs_msdos receives a
SIGINFO signal (see the
status argument for
stty(1)), a line will be written to the standard error output indicating the name of the device currently being formatted, the sector number being written, and the total number of sectors to be written.