The compressed ROM/RAM file system (or cramfs) is a
free (
GPL'ed) read-only
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
file system designed for simplicity and space-efficiency. It is mainly used in
embedded 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 first decompressing it. For this reason, some
Linux distribution
A Linux distribution, often abbreviated as distro, is an operating system that includes the Linux kernel for its kernel functionality. Although the name does not imply product distribution per se, a distro—if distributed on its own—is oft ...
s use cramfs for
initrd
In Linux systems, initrd (''initial ramdisk'') is a scheme for loading a temporary root file system into memory, to be used as part of the Linux startup process. initrd and initramfs (from INITial RAM File System) refer to two different methods ...
images (
Debian
Debian () is a free and open-source software, free and open source Linux distribution, developed by the Debian Project, which was established by Ian Murdock in August 1993. Debian is one of the oldest operating systems based on the Linux kerne ...
3.1 in particular) and installation images (
SUSE Linux
openSUSE () is a free and open-source Linux distribution developed by the openSUSE project. It is offered in two main variations: ''Tumbleweed'', an upstream rolling release distribution, and ''Leap'', a stable release distribution which is so ...
in particular), where there are constraints on memory and image size.
In 2013, Linux maintainers indicated that cramfs was made obsolete by
squashfs
Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is ...
, but the file system got rehabilitated in 2017 for use in low-memory devices where using squashfs may not be viable.
cramfs: rehabilitate it
/ref>
Design
Files on cramfs file systems are zlib
zlib ( or "zeta-lib", ) is a software library used for data compression as well as a data format. zlib was written by Jean-loup Gailly and Mark Adler and is an abstraction of the DEFLATE compression algorithm used in their gzip file compre ...
-compressed one page
Page most commonly refers to:
* Page (paper), one side of a leaf of paper, as in a book
Page, PAGE, pages, or paging may also refer to:
Roles
* Page (assistance occupation), a professional occupation
* Page (servant), traditionally a young m ...
at a time to allow random read access. The metadata
Metadata (or metainformation) is "data that provides information about other data", but not the content of the data itself, such as the text of a message or the image itself. There are many distinct types of metadata, including:
* Descriptive ...
is not compressed, but is expressed in a terse representation that is 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
The following lists identify, characterize, and link to more thorough information on file systems.
Many older operating systems support only their one "native" file system, which does not bear any name apart from the name of the operating system i ...
* Comparison of file systems
The following tables compare general and technical information for a number of file systems.
General information
Metadata
All widely used file systems record a last modified time stamp (also known as "mtime"). It is not included i ...
* SquashFS
Squashfs is a compressed read-only file system for Linux. Squashfs compresses files, inodes and directories, and supports block sizes from 4 KiB up to 1 MiB for greater compression. Several compression algorithms are supported. Squashfs is ...
, a read-only compressed file system
* Util-linux
is a package of utilities distributed by the Linux Kernel Organization for use in a Linux operating system. A fork, (with meaning "next generation"), was created when development stalled, but has been renamed back to , and is the official ve ...
contains the cramfs utilities
References
External links
*
*
{{Filesystem
Free special-purpose file systems
Compression file systems
Read-only file systems supported by the Linux kernel