Cramfs

Last updated
Cramfs
Other
Supported operating systems Linux
Website sourceforge.net/projects/cramfs/

The compressed ROM/RAM file system (or cramfs) is a free (GPL'ed) read-only Linux file system designed for simplicity and space-efficiency. It is mainly used in embedded and small-footprint systems.

Contents

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 distributions use cramfs for initrd images (Debian 3.1 in particular) and installation images (SUSE Linux in particular), where there are constraints on memory and image size.

In 2013, Linux maintainers indicated that cramfs was made obsolete by squashfs, [1] but the file system got rehabilitated in 2017 for use in low-memory devices where using squashfs may not be viable. [2]

Design

Files on cramfs file systems are zlib-compressed one page at a time to allow random read access. The metadata 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

Related Research Articles

Computer data storage Storage of digital data readable by computers

Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers.

Lossless compression is a class of data compression algorithms that allows the original data to be perfectly reconstructed from the compressed data. By contrast, lossy compression permits reconstruction only of an approximation of the original data, though usually with greatly improved compression rates.

In computing, a core dump, memory dump, crash dump, system dump, or ABEND dump consists of the recorded state of the working memory of a computer program at a specific time, generally when the program has crashed or otherwise terminated abnormally. In practice, other key pieces of program state are usually dumped at the same time, including the processor registers, which may include the program counter and stack pointer, memory management information, and other processor and operating system flags and information. A snapshot dump is a memory dump requested by the computer operator or by the running program, after which the program is able to continue. Core dumps are often used to assist in diagnosing and debugging errors in computer programs.

Live CD

A live CD is a complete bootable computer installation including operating system which runs directly from a CD-ROM or similar storage device into a computer's memory, rather than loading from a hard disk drive. A Live CD allows users to run an operating system for any purpose without installing it or making any changes to the computer's configuration. Live CDs can run on a computer without secondary storage, such as a hard disk drive, or with a corrupted hard disk drive or file system, allowing data recovery.

Defragmentation

In the maintenance of file systems, defragmentation is a process that reduces the degree of fragmentation. It does this by physically organizing the contents of the mass storage device used to store files into the smallest number of contiguous regions. It also attempts to create larger regions of free space using compaction to impede the return of fragmentation. Some defragmentation utilities try to keep smaller files within a single directory together, as they are often accessed in sequence.

Bootable business card

A bootable business card (BBC) is a CD-ROM that has been cut, pressed, or molded to the size and shape of a business card. Alternative names for this form factor include "credit card," "hockey rink," and "wallet-size". The cards are designed to hold about 50 MB. The CD-ROM business cards are generally used for commercial product demos, are mailed to prospective customers, and are given away at trade shows.

Conventional memory

In DOS memory management, conventional memory, also called base memory, is the first 640 kilobytes of the memory on IBM PC or compatible systems. It is the read-write memory directly addressable by the processor for use by the operating system and application programs. As memory prices rapidly declined, this design decision became a limitation in the use of large memory capacities until the introduction of operating systems and processors that made it irrelevant.

dd is a command-line utility for Unix and Unix-like operating systems, the primary purpose of which is to convert and copy files.

Quarterdeck Expanded Memory Manager (QEMM) is a memory manager produced by Quarterdeck Office Systems in the late 1980s through late 1990s. It was the most popular third-party memory manager for the MS-DOS and other DOS operating systems.

The compressed loop device (cloop) is a module for the Linux kernel. It adds support for transparently decompressed, read-only block devices. It is not a compressed file system: cloop is mostly used as a convenient way to compress conventional file systems onto Live CDs.

Executable compression is any means of compressing an executable file and combining the compressed data with decompression code into a single executable. When this compressed executable is executed, the decompression code recreates the original code from the compressed code before executing it. In most cases this happens transparently so the compressed executable can be used in exactly the same way as the original. Executable compressors are often referred to as "runtime packers", "software packers", "software protectors".

The Journaling Flash File System is a log-structured file system for use on NOR flash memory devices on the Linux operating system. It has been superseded by JFFS2.

In computer science, execute in place (XIP) is a method of executing programs directly from long-term storage rather than copying it into RAM. It is an extension of using shared memory to reduce the total amount of memory required.

Amiga Disk File (ADF) is a file format used by Amiga computers and emulators to store images of disks. It has been around almost as long as the Amiga itself, although it was not initially called by any particular name. Before it was known as ADF, it was used in commercial game production, backup and disk virtualization. ADF is a track-by-track dump of the disk data as read by the Amiga operating system, and so the "format" is really fixed-width AmigaDOS data tracks appended one after another and held in a file. This file would, typically, be formatted, like the disk, in OFS.

In computing, initrd is a scheme for loading a temporary root file system into memory, which may be used as part of the Linux startup process. initrd and initramfs refer to two different methods of achieving this. Both are commonly used to make preparations before the real root file system can be mounted.

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 also the name of free software, licensed under the GPL, for accessing Squashfs filesystems.

Das U-Boot

Das U-Boot is an open-source, primary boot loader used in embedded devices to package the instructions to boot the device's operating system kernel. It is available for a number of computer architectures, including 68k, ARM, Blackfin, MicroBlaze, MIPS, Nios, SuperH, PPC, RISC-V and x86.

A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described by a single entry in the page table. It is the smallest unit of data for memory management in a virtual memory operating system. Similarly, a page frame is the smallest fixed-length contiguous block of physical memory into which memory pages are mapped by the operating system.

AXFS is a compressed read-only file system for Linux, initially developed at Intel, and now maintained at Numonyx. It was designed to use execute in place (XIP) alongside compression aiming to reduce boot and program load times, while retaining a small memory footprint for embedded devices. This is achieved by mixing compressed and uncompressed pages in the same executable file. AXFS is free software.

References