From Academic Kids

The title of this article is incorrect because of technical limitations. The correct title is ext2.

The ext2 or second extended file system was the standard filesystem used on the Linux operating system for a number of years and remains in wide use. It was initially designed by Rémy Card based on concepts from the extended file system. It is quite fast, enough so that it is used as the standard against which to measure many benchmarks. Its main drawback is that it is not a journaling file system. Its successor, ext3, is a journalled filesystem and is almost completely compatible with ext2.

The canonical implementation of ext2 is the ext2fs filesystem driver in the Linux kernel. Other implementations (of varying quality and completeness) exist in HURD, some BSD kernels and as third-party Microsoft Windows drivers. ext2 was the default filesystem in the Red Hat, Fedora and Debian Linux distributions until supplanted more recently by ext3.



The early development of the Linux kernel was made as a cross-development under the Minix operating system. Naturally, it was the most obvious decision to implement the Minix file system as Linux's first file system. Minix file system was pretty free of bugs, but had some limitations like being able to handle only 64 megabytes of data, due to its 16-bit address space and accepted file name with no more than 14 characters. Because of these limitations, work began on the implementation of new file systems for the Linux operating system.

To ease the addition of new filesystems into the Linux kernel, a virtual file system was developed, called VFS. After its integration to the kernel, the extended file system (ext) was released as the first file system designed for Linux in April 1992 and it was included in Linux version 0.96c. The ext file system solved the two major problems in the Minix file system (maximum partition size and file name length limitation to 14 characters), now allowing 2 gigabytes of data and a 255 characters filename. But it still had problems: there was no support for separate access, inode modification and data modification timestamps.

As a solution for these problems, two new filesystems were developed in January 1993: the Xia file system and the second extended file system (ext2). The ext2 file system was based on the extended file system with many reorganizations and many improvements and was designed with evolution in mind, containing space for future developments.

The ext2 file system has a maximum data size of 4 terabytes, maximum filename length of 255 characters, and has variable length block size.


Block group 
Every ext2 filesystem is divided up into block groups, each of which has its own:
  • Superblock
  • Group descriptors
  • Block bitmap
  • Inode bitmap
  • Inode table
  • Data blocks
Block groups are similar to cylinder groups in Berkeley FFS, where they were introduced to retard file fragmentation.
The superblock contains metadata describing the entire filesystem:
  • Number of inodes
  • Number of blocks
  • Reserved block count
  • First data block number
  • Block size
  • Fragment size
  • Number of blocks per group
  • Number of fragments per group
  • Number of inodes per group
  • Mount time
  • Write time
  • Mount count
  • Maximal mount count
  • Magic signature
  • File system state: valid (unmounted cleanly) or error
  • Error detection behavior
  • Minor revision level
  • Time the file system was last checked
  • Maximum time between checks
  • Default user & group ID for reserved blocks
Inodes contain file metadata:
  • File mode
  • User ID (uid)
  • Group ID (gid)
  • File size, in bytes
  • Last file access time (atime)
  • Inode change time (ctime)
  • Last file modification time (mtime)
  • Deletion time (dtime)
  • Link count
  • Block count
  • File type
  • File attributes
  • List of block addresses, each of which may to:
    • A block containing raw file data (direct address)
    • An indirect block containing direct addresses (indirect address)
    • A doubly-indirect block containing indirect addresses (doubly-indirect address)
    • A triply-indirect block containing doubly-indirect addresses (triply-indirect address)
Represented as a list of directory entries, each of which contains an inode number and a filename.
Regular files 
Represented as a list of blocks, pointers for which go into indirect nodes. Blocks are headerless and contain raw data.
  • Hard links
  • Symbolic links
Special files 
  • Block devices
  • Character devices
  • FIFOs

See also

External links

Template:Linux-stubde:Ext2 es:EXT2 fr:Ext2 it:Ext2 he:EXT2 ja:Ext2 pl:Ext2 pt:Ext2 sk:ext2


Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)


  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Personal tools