Other | |
---|---|
Supported operating systems | Unix-like systems |
ROMFS (Read-Only Memory File System) is a minimal, read-only computing file system designed for storing files in read-only memory, particularly in Electrically Erasable Programmable Read-Only Memory (EEPROM) or similar ROM media. Due to its small size and straightforward design, it's commonly used in devices where system resources are limited. It's a part of the Linux Kernal since version 2.1.21 [1] and can be implemented on other Unix-like systems with appropriate support. [2]
ROMFS is often used as an initial ROM or initial RAM disk containing kernel modules or essential system files that can be loaded during the boot process. [3] Its implementation requires minimal code, making it suitable for embedded systems and boot floppies. [4] The primary advantage of ROMFS is the ability to decrease the size of a kernel. (excluding modules) [5]
ROMFS stores files sequentially in contiguous blocks. The description of the filesystem layout is documented in the Linux kernel source tree and can be accessed through the LXR romfs.rst. [6] ROMFS does not store modification dates or UNIX-like permissions. [7]
ROMFS works on data aligned to 16 byte boundaries, yet most hardware works on data aligned to 1024 byte boundaries. [8] As a result, the file system must be padded.
Apart from support in the Linux Kernel Nikolay Aleksandrov developed romfser (ROMFS Extractor/Reader), an open-source tool to extract and manipulate ROMFS images, which primarily intended for the BSD family of operating systems, which do not include native ROMFS support. [9] Another tool is genromfs, which is a user program for creating a romfs filesystem. [10]