|NEWFS_EXT2FS(8)||System Manager's Manual||NEWFS_EXT2FS(8)|
newfs_ext2fsis used to initialize and clear ext2 file systems before first use. Before running
newfs_ext2fsthe disk must be labeled using disklabel(8).
newfs_ext2fsbuilds a file system on the specified special device, basing its defaults on the information in the disk label. Typically the defaults are reasonable, although
newfs_ext2fshas numerous options to allow the defaults to be selectively overridden. The special file should be a raw device, for example /dev/rsd0a; if a relative path like sd0a is specified, the corresponding raw device is used. Options with numeric arguments may contain an optional (case-insensitive) suffix:
-ssize”. No attempts to use or update the disk label will be made.
-nare specified then
-ntakes precedence. The default number of inodes is calculated from a number of blocks in the file system.
GOOD_OLD_REV’; this option is primarily used to build root file systems that can be understood by old or dumb firmware for bootstrap. (default)
DYNAMIC_REV’; various extended (and sometimes incompatible) features are enabled (though not all features are supported on OpenBSD). Currently only the following features are supported:
-Ssecsize) after suffix interpretation. If no
-ssize is specified then the filesystem size defaults to that of the partition or, if
-Fis specified, the existing file. If size is negative the specified size is subtracted from the default size (reserving space at the end of the partition).
newfs_ext2fsstops before outputting the progress bar.
-F. This is necessary if the image is to be used by vnd(4) (which doesn't support file systems with ‘holes’).
newfs_ext2fsto 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 on a write-once disk). Note that changing this value from its default will make it impossible for fsck_ext2fs(8) to find the alternative superblocks if the standard superblock is lost.
newfs_ext2fscommand to succeed, the disk label should first be updated such that the fstype field for the partition is set to ‘
-Iis used. The partition size is found using fstat(2), not by inspecting the disk label. The block size and fragment size will be written back to the disk label only if the last character of special references the same partition as the minor device number. fstat(2), disklabel(5), disktab(5), fs(5), disklabel(8), fsck_ext2fs(8), mount(8), mount_ext2fs(8), newfs(8) Remy Card, Theodore Ts'o, and Stephen Tweedie, Design and Implementation of the Second Extended Filesystem, The Proceedings of the First Dutch International Symposium on Linux, http://e2fsprogs.sourceforge.net/ext2intro.html.
newfs_ext2fscommand first appeared in OpenBSD 4.7.
newfs_ext2fscommand was written by Izumi Tsutsui <tsutsui@NetBSD.org>.
newfs_ext2fscommand is still experimental and there are few sanity checks. The
newfs_ext2fscommand doesn't have options to specify each REV1 file system feature independently. The
newfs_ext2fscommand doesn't support the bad block list accounted by the bad blocks inode. Many newer ext2 file system features (especially journaling) are not supported yet. Some features in file systems created by the
newfs_ext2fscommand might not be recognized properly by the fsck_ext2fs(8) utility. There is no native tool in the OpenBSD distribution for resizing ext2 file systems yet.
|March 13, 2015||OpenBSD-current|