GENROMFS(8)
GENROMFS(8) π
okay bestie, welcome to the System Manager's Manual corner of the internet, where today's main character is genromfs β the girl who literally builds romfs images from scratch and doesn't even break a sweat. β¨
πΈ NAME πΈ
genromfs β create a romfs image
π SYNOPSIS π
genromfs -f device [ -d source ] [ -V label ] [ -a alignment ] [ -A
alignment,pattern ] [ -x pattern ] [ -v ]
π¦ DESCRIPTION π¦
so genromfs is the girl who creates a romfs file system image. usually she's writing straight onto a block device, but for test purposes she can also just write into a plain file, ngl. she's basically the mkfs equivalent of other filesystems β same energy, different font. π
here's the vibe: genromfs scans the current directory and all its subdirectories, builds a romfs image out of every file she finds, and outputs that image to the file or device you told her to. periodt. π
and during that scan, she recognizes a special notation that is lowkey iconic. if a file begins with the @ sign (and is empty otherwise), it's referring to a device special node, in this format:
@name,type,major,minor
where type can be:
bβ block devicescβ character devicespβ fifos
so the linux virtual console 1 can be included as a file named @tty1,c,4,1 β not me thinking that's the cutest little syntax ever π₯Ί
β¨ OPTIONS β¨
-foutput β specifies the file to output the image to. this one is required, bestie, you literally cannot skip it. π¨-dsource β use the specified directory as the source, instead of the current directory.-Vlabel β build the image with the specified volume label. rn it is not used by the kernel, but it will be recorded in the image. so it's decorative, but the good kind of decorative. π-aalignment β align regular files to a larger boundary.genromfswill align the data of each regular file in the resulting image to the specified alignment, while keeping the image compatible with the original romfs definition (by adding pad bytes between the last node before the file and the file's header). by default,genromfsguarantees only an alignment of 16 bytes.-Aalignment,pattern β align objects matching the shell wildcard pattern to alignment bytes. if one object matches more patterns, then the highest alignment is chosen. alignment has to be a power of two. patterns either don't contain any slashes, in which case files matching those patterns are matched in all directories, or they start with a leading slash, in which case they are matched against absolute paths inside of the romfs filesystem (that is, as if you chrooted into the rom filesystem). π§-xpattern β allows you to exclude files that match a pattern. super useful for excluding CVS directories and backup files (the ones ending in a~). π-vβ verbose operation,genromfswill print each file which is included in the image, along with its offset. she's chatty and honestly? we love that for her. π¬
π₯ EXAMPLES π₯
genromfs -d root -f /dev/fd0 -V 'Secret labs install disk'
all files in the root directory will be written to /dev/fd0 as a new romfs filesystem image. slay. πΎ
genromfs -d root -f /dev/fd0 -A 2048,/.. -A '4096,*.boot' -a 512 -V 'Bootable floppy'
generate the image and place file data of all regular files on 512 bytes boundaries, or on 4K boundaries if they have the .boot extension. additionally, align the romfs header of the '..' entry in the root directory on a 2K boundary. effectively, this makes sure that the romfs image uses the least possible space in the first 2048 bytes. efficiency queen π
you can use the generated image (if you have the romfs module loaded, or compiled into the kernel) via:
mount -t romfs /dev/fd0 /mnt
π AUTHOR π
this manual page was initially written by Christoph Lameter <clameter@debian.org>, for the Debian GNU/Linux system. thank you for your service π«Ά
β SEE ALSO β
okay that's the whole page, bestie β go forth and build romfs images, you absolute icon π
Version 0.5.2 Β· Jun 2007 β that's the source and the date, and this has been your girl signing off. mwah. πβ¨
π¦ where this page comes from
- debian bookworm: genromfs 0.5.2-4+b1 Β· GPL-2.0-or-later
- debian trixie: genromfs 0.5.2-4+b2 Β· GPL-2.0-or-later
- fedora 43: genromfs 0.5.2-37.fc43 Β· GPL-2.0-or-later
- fedora 44: genromfs 0.5.2-38.fc44 Β· GPL-2.0-or-later
- nixos 26.05: genromfs 0.5.2
- nixpkgs unstable: genromfs 0.5.2
- ubuntu jammy: genromfs 0.5.2-4 Β· GPL-2.0-or-later
- ubuntu noble: genromfs 0.5.2-4 Β· GPL-2.0-or-later
- ubuntu resolute: genromfs 0.5.2-4build1 Β· GPL-2.0-or-later
- ubuntu stonking: genromfs 0.5.2-4.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms