# Romfs

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Romfs
> Markdown URL: https://mediated.wiki/source/Romfs.md
> Source: https://en.wikipedia.org/wiki/Romfs
> Source revision: 1334433709
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Simple read-only file system used chiefly for early boot and embedded systems}}
{{ infobox file system
| name                    = romfs
| developer               = 
| full_name               = 
| variants                = 
| introduction_date       = 
| introduction_os         = 
| partition_id            = 
| directory_struct        = 
| file_struct             = 
| file_types              = 
| bad_blocks_struct       = 
| bootable                = 
| min_volume_size         = 
| max_volume_size         = 
| max_file_size           = 
| file_size_granularity   = 
| max_files_no            = 
| max_filename_size       =
| max_dirname_size        = 
| max_directory_depth     = 
| filename_character_set  = 
| dates_recorded          = 
| date_range              = 
| date_resolution         = 
| forks_streams           = 
| attributes              = 
| file_system_permissions = 
| compression             = 
| encryption              = 
| data_deduplication      = 
| copy_on_write           = 
| OS                      = [Unix-like](/source/Unix-like) systems
| website                 = 
}}

{{Portal|Free and open-source software}}
'''ROMFS''' (Read-Only Memory File System) is a minimal, read-only [computing](/source/computing) [file system](/source/file_system) designed for storing files in read-only memory, particularly in [Electrically Erasable Programmable Read-Only Memory](/source/Electrically_Erasable_Programmable_Read-Only_Memory) ([EEPROM](/source/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 Kernel](/source/Linux) since version 2.1.21<ref>{{cite web|url=https://romfs.sourceforge.net/|title=romfs information}}</ref> and can be implemented on other [Unix-like](/source/Unix-like) systems with appropriate support.<ref>{{cite web |title=ROMFS - ROM File System |url=https://docs.kernel.org/filesystems/romfs.html |website=Linux Kernel Documentation |access-date=14 August 2025}}</ref>

== Usage ==
ROMFS is often used as an initial ROM or [initial RAM disk](/source/initramfs) containing kernel modules or essential system files that can be loaded during the boot process.<ref>{{cite web |title=Is this exactly what RomFS in the Linux kernel does? |url=https://stackoverflow.com/questions/10595624/is-this-exactly-what-romfs-in-linux-kernel-does |website=Stack Overflow |access-date=14 August 2025}}</ref> Its implementation requires minimal code, making it suitable for embedded systems and boot floppies.<ref>{{cite book |last=Yaghmour |first=Karim |title=Building Embedded Linux Systems |publisher=O'Reilly Media |year=2003 |isbn=978-0596002220}}</ref> The primary advantage of ROMFS is the ability to decrease the size of a kernel. (excluding modules) <ref>{{cite web|url=https://docs.kernel.org/filesystems/romfs.html|title=ROMFS - ROM File System}}</ref>

== Technical details ==
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](/source/LXR_Cross_Referencer) romfs.rst.<ref>{{cite web |title=ROMFS filesystem layout |url=http://lxr.linux.no/source/Documentation/filesystems/romfs.rst |website=LXR Cross Referencer |access-date=14 August 2025}}</ref>
ROMFS does not store modification dates or [UNIX-like](/source/UNIX-like) permissions.<ref>{{cite web|url=https://romfs.sourceforge.net/|title=romfs information}}</ref>

== Limitations ==
ROMFS works on data aligned to 16 byte boundaries, yet most hardware works on data aligned to 1024 byte boundaries.<ref>{{cite web|url=https://docs.kernel.org/filesystems/romfs.html|title=ROMFS - ROM File System}}</ref> As a result, the file system must be padded.

== Platform Support and Tools ==
Apart from support in the [Linux Kernel](/source/Linux)
Nikolay Aleksandrov developed romfser (ROMFS Extractor/Reader), an open-source tool to extract and manipulate ROMFS images, which primarily intended for the [BSD](/source/BSD) family of operating systems, which do not include native ROMFS support.<ref>{{cite web |title=romfser GitHub repository |url=https://github.com/NikAleksandrov/romfser |access-date=14 August 2025}}</ref> Another tool is genromfs, which is a user program for creating a romfs filesystem.<ref>{{cite web|url=https://docs.kernel.org/filesystems/romfs.html|title=ROMFS - ROM File System}}</ref>

== References ==
{{Reflist}}

== External links ==
* [https://docs.kernel.org/filesystems/romfs.html Linux Kernel Documentation – ROMFS]
* [http://lxr.linux.no/source/Documentation/filesystems/romfs.rst ROMFS layout on LXR]

Category:Free special-purpose file systems
Category:File systems supported by the Linux kernel

{{Linux-stub}}

---
Adapted from the Wikipedia article [Romfs](https://en.wikipedia.org/wiki/Romfs) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Romfs?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
