The e2fsprogs (short for ext2 filesystem programs) package contains core utilities that were developed for creating, checking, correcting and modifying ext2 (second extended) filesystems on Linux systems. This package also supports the ext3 filesystem.
Introduced in January 1993, ext2 was a rewrite of ext, the first Linux native filesystem. It features (1) improved algorithms that greatly increased its speed, (2) additional date stamps (such as date of last access, date of last inode modification and date of last data modification) and (3) the ability to track the state of the filesystem. ext2 remains one of the most commonly used of the Linux native filesystems, along with the subsequently introduced ext3 and, to a lesser extent, ReiserFS. ext3 is is basically an extension of ext2 to which a journaling capability (which increases reliability in the event of an unclean system shutdown, such as that caused by a power supply interruption) has been added.
Most Linux users have probably never heard of e2fsprogs, and they will likely never even need to know that it exists. However, the programs do a great deal of work behind the scenes and are very useful for system administrators. Moreover, if one builds a Linux distribution from individual components, e2fsprogs is part of the basic system software that must be installed. Installation is very simple (even for people without extensive experience installing Linux software) and consists mainly of just using the standard configure and make commands with the appropriate options.
The programs and library routines in the e2fsprogs package are written in the C programming language (as are the Linux kernel and most Linux utilities). They depend on (i.e., require for their operation) the following programs: bash, binutils, coreutils, diffutils, gawk, GCC, gettext, glibc, grep, make, sed and texinfo. As of May 2004, the most recent version of e2fsprogs was 1.35, which has a package size of approximately 3MB. Its contents are licensed under the GNU General Public License (GPL) or the GNU Library (or Lesser) General Public License (LGPL).
Contents of the e2fsprogs Package
The e2fsprogs package installs the following programs and library routines:
e2fsck: used to repair filesystem inconsistencies after an unclean system shutdown.
badblocks: searches a device (usually a disk partition) for bad blocks.
blkid: locates and prints block device attributes.
chattr: changes the attributes of files on an ext2 filesystem.
compile_et: an error table compiler that converts a table of error-code names and messages into a C source file suitable for use with the com_err library.
debugfs: a filesystem debugger that can be used to examine and manually repair corrupted filesystems or to create test cases for e2fsck.
dumpe2fs: prints the superblock and blocks group information for the filesystem present on a given device.
e2fsck: used to check and repair ext2 and ext3 filesystems.
e2image: used to save critical ext2 filesystem data to a file.
e2label: displays or changes the filesystem label on the ext2 filesystem present on a given device.
findfs: finds a filesystem by label or by UUID.
fsck: used to check and repair filesystems. By default it checks the filesystems listed in /etc/fstab.
logsave: saves the output of a command in a logfile.
lsattr: lists the attributes of files in an ext2 filesystem.
mk_cmds: converts a table of command names and help messages into a C source file suitable for use with the libss subsystem library.
mke2fs: used to create an ext2 filesystem on a given device.
mklost+found: used to create a lost+found directory on an ext2 filesystem. It pre-allocates disk blocks to this directory to lessen the burden on e2fsck.
resize2fs: used to enlarge or shrink an ext2 filesystem.
tune2fs: used to adjust the tunable filesystem parameters on an ext2 filesystem.
uuidgen: creates new universally unique identifiers (UUID).
libblkid: used for device identification and token extraction.
libcom_err: the common error display routine.
libe2p: used by dumpe2fs, chattr and lsattr.
libext2fs: enables user-level programs to manipulate an ext2 filesystem.
libss: used by debugfs.
libuuid: used for generating unique identifiers for objects that may be accessible beyond the local system.
The e2fsprogs programs can be very powerful and useful. However, they can also substantially affect the operation of a computer, and thus they should be used with caution. For example, e2fsck, which is used to repair filesystem inconsistencies after an unclean system shutdown, should only be run on unmounted filesystems, as it can cause severe damage to mounted filesystems.
More information about the individual e2fsprogs programs, including their syntax and options, can be obtained by consulting their man and info pages. e2fsprogs's home page is http://e2fsprogs.sourceforge.net/.
Created May 31, 2004. Copyright © 2004. All Rights Reserved.