Main index | Section 8 | 日本語 | Options |
If
special
does not contain a
/
and
The options are as follow:
| |
Do not create a file system: just print out parameters. | |
| |
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. | |
| |
Attempt to cluster align root directory, useful for SD card. | |
| |
Get bootstrap from file. | |
| |
Create the image file with the specified size.
A suffix character appended to the size is interpreted as for the
| |
| |
FAT type (one of 12, 16, or 32). | |
| |
Volume ID, a 32 bit number in decimal or hexadecimal (0x...) format. | |
| |
Volume label (up to 11 characters). The label should consist of only those characters permitted in regular DOS (8+3) filenames. | |
| |
OEM string (up to 8 characters). The default is "BSD4.4 ". | |
| |
Number of bytes per sector. Acceptable values are powers of 2 in the range 512 through 32768, inclusive. | |
| |
Create the filesystem as though the current time is timestamp. The default filesystem volume ID is derived from the time. timestamp can be a pathname (where the timestamp is derived from that file) or an integer value interpreted as the number of seconds since the Epoch. | |
| |
Number of sectors per FAT. | |
| |
File system block size (bytes per cluster). This should resolve to an acceptable number of sectors per cluster (see below). | |
| |
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. | |
| |
Number of root directory entries (FAT12 and FAT16 only). | |
| |
Specify a standard (floppy disk) format. The standard formats are (capacities in kilobytes): 160, 180, 320, 360, 640, 720, 1200, 1232, 1440, 2880. | |
| |
Number of drive heads. | |
| |
Location of the file system info sector (FAT32 only). A value of 0xffff signifies no info sector. | |
| |
Location of the backup boot sector (FAT32 only). A value of 0xffff signifies no backup sector. | |
| |
Media descriptor (acceptable range 0xf0 to 0xff). | |
| |
Number of FATs. Acceptable values are 1 to 16 inclusive. The default is 2. | |
| |
Number of hidden sectors. | |
| |
Number of reserved sectors. | |
| |
File system size. | |
| |
Number of sectors per track. | |
FAT file system parameters occupy a "Boot Sector BPB (BIOS Parameter Block)" in the first of the "reserved" sectors which precede the actual file system. For reference purposes, this structure is presented below.
struct bsbpb { uint16_t bpbBytesPerSec; /* [-S] bytes per sector */ uint8_t bpbSecPerClust; /* [-c] sectors per cluster */ uint16_t bpbResSectors; /* [-r] reserved sectors */ uint8_t bpbFATs; /* [-n] number of FATs */ uint16_t bpbRootDirEnts; /* [-e] root directory entries */ uint16_t bpbSectors; /* [-s] total sectors */ uint8_t bpbMedia; /* [-m] media descriptor */ uint16_t bpbFATsecs; /* [-a] sectors per FAT */ uint16_t bpbSecPerTrack; /* [-u] sectors per track */ uint16_t bpbHeads; /* [-h] drive heads */ uint32_t bpbHiddenSecs; /* [-o] hidden sectors */ uint32_t bpbHugeSectors; /* [-s] big total sectors */ }; /* FAT32 extensions */ struct bsxbpb { uint32_t bpbBigFATsecs; /* [-a] big sectors per FAT */ uint16_t bpbExtFlags; /* control flags */ uint16_t bpbFSVers; /* file system version */ uint32_t bpbRootClust; /* root directory start cluster */ uint16_t bpbFSInfo; /* [-i] file system info sector */ uint16_t bpbBackup; /* [-k] backup boot sector */ };
newfs_msdos /dev/ada0s1
Create a standard 1.44M file system, with volume label foo, on /dev/fd0:
newfs_msdos -f 1440 -L foo fd0
Create a 30MB image file, with the FAT partition starting 63 sectors within the image file:
newfs_msdos -C 30M -@63s ./somefile
NEWFS_MSDOS (8) | June 14, 2018 |
Main index | Section 8 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | You have successfully logged in, Now press any key to log out | ” |