Cramfs
Encyclopedia
The compressed ROM file system (or cramfs) is a free
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

 (GPL
GNU General Public License
The GNU General Public License is the most widely used free software license, originally written by Richard Stallman for the GNU Project....

'ed) read-only Linux
Linux kernel
The Linux kernel is an operating system kernel used by the Linux family of Unix-like operating systems. It is one of the most prominent examples of free and open source software....

 file system
File system
A file system is a means to organize data expected to be retained after a program terminates by providing procedures to store, retrieve and update data, as well as manage the available space on the device which contain it. A file system organizes data in an efficient manner and is tuned to the...

 designed for simplicity and space-efficiency. It is mainly used in embedded system
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...

s and small-footprint systems.

Unlike a compressed image of a conventional file system, a cramfs image can be used as it is i.e. without the need to decompress the image first. For this reason, some Linux distribution
Linux distribution
A Linux distribution is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications...

s also use cramfs for initrd
Initrd
In computing, initrd is a scheme for loading a temporary file system into memory in the boot process of the Linux kernel. initrd and initramfs refer to slightly different methods of achieving this...

 images (Debian
Debian
Debian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. Debian GNU/Linux, which includes the GNU OS tools and Linux kernel, is a popular and influential...

 3.1 in particular) and installation images (SUSE Linux in particular), where there are constraints on memory and image size.

Design

Files on cramfs file systems are zlib
Zlib
zlib is a software library used for data compression. zlib was written by Jean-Loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compression program. Zlib is also a crucial component of many software platforms including Linux, Mac OS X,...

-compressed one page at a time to allow random read access. The meta-data is not compressed, but is expressed in a terse representation that is designed to be more space-efficient than conventional file systems.

The file system is intentionally read-only to simplify its design; random write access for compressed files is difficult to implement. cramfs ships with a utility (mkcramfs) to pack files into new cramfs images.

File sizes are limited to less than 16MB.

Maximum file system size is a little under 272MB. (The last file on the file system must begin before the 256MB block, but can extend past it.)

See also

  • List of file systems
  • Comparison of file systems
    Comparison of file systems
    -General information:-Limits:-Metadata:-Features:-Allocation and layout policies:-Supporting operating systems:-See also:* Comparison of archive formats* Comparison of file archivers* List of archive formats* List of file archivers...

  • SquashFS
    SquashFS
    SquashFS is a compressed read-only file system for Linux. SquashFS compresses files, inodes and directories, and supports block sizes up to 1 MB for greater compression...

    , a read-only compressed file system
  • Util-linux
    Util-linux
    util-linux is a standard package of the Linux operating system. A fork, util-linux-ng—with ng meaning "next generation"—was created when development stalled, but as of January 2011 has been renamed back to util-linux, and is the official version of the package.It includes the following...

    contains the cramfs utilities
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK