Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

genromfs(8) [debian man page]

GENROMFS(8)						      System Manager's Manual						       GENROMFS(8)

NAME
genromfs - create a romfs image SYNOPSIS
genromfs -f device [ -d source ] [ -V label ] [ -a alignment ] [ -A alignment,pattern ] [ -x pattern ] [ -v ] DESCRIPTION
genromfs is used to create a romfs file system image, usually directly on a block device, or for test purposes, in a plain file. It is the mkfs equivalent of other filesystems. genromfs will scan the current directory and its subdirectories, build a romfs image from the files found, and output it to the file or device you specified. During scanning, it recognizes a special notation. If a file begins with the @ sign (and is empty otherwise), it refers to a device spe- cial node in the format: @name,type,major,minor. type can be b for block devices, c for character devices, and p for fifos. The linux virtual console 1 can thus be included as a file with the name: @tty1,c,4,1 OPTIONS
-f output Specifies the file to output the image to. This option is required. -d source Use the specified directory as the source, not the current directory. -V label Build the image with the specified volume label. Currently it is not used by the kernel, but it will be recorded in the image. -a alignment Align regular files to a larger boundary. genromfs will align 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 last node before the file and file's header). By default, genromfs will guarantee only an alignment of 16 bytes. -A alignment,pattern Align objects matching 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 pat- terns are matched in all directories, or 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). -x pattern Allow to exclude files that match a pattern. It's useful to exclude CVS directories and backup files (ending in a '~'). -v Verbose operation, genromfs will print each file which is included in the image, along with its offset. 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. 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. 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. SEE ALSO
mkfs(8), mount(8), mkisofs(8) Version 0.5.2 Jun 2007 GENROMFS(8)

Check Out this Related Man Page

GENEXT2FS(8)						      System Manager's Manual						      GENEXT2FS(8)

NAME
genext2fs - ext2 filesystem generator for embedded systems SYNOPSIS
genext2fs [ options ] [ output-image ] DESCRIPTION
genext2fs generates an ext2 filesystem as a normal (non-root) user. It does not require you to mount the image file to copy files on it, nor does it require that you become the superuser to make device nodes. The filesystem image is created in the file output-image. If not specified, it is sent to stdout. By default, the maximum number of inodes in the filesystem is the minimum number required to accommodate the initial contents. In this way, a minimal filesystem (typically read-only) can be created with minimal free inodes. If required, free inodes can be added by passing the relevant options. The filesystem image size in blocks can be minimised by trial and error. OPTIONS
-x, --starting-image image Use this image as a starting point. -d, --root directory[:path] Add the given directory and contents at a particular path (by default the root). -D, --devtable spec-file[:path] Use spec-file to specify inodes to be added, at the given path (by default the root), including files, directories and special files like devices. If the specified files are already present in the image, their ownership and permission modes will be adjusted accordingly. Furthermore, you can use a single table entry to create many devices with a range of minor numbers (see examples below). All specified inodes receive the mtime of spec-file itself. -b, --size-in-blocks blocks Size of the image in blocks. -N, --number-of-inodes inodes Maximum number of inodes. -i, --bytes-per-inode ratio Used to calculate the maximum number of inodes from the available blocks. -m, --reserved-percentage Number of reserved blocks as a percentage of size. Reserving 0 blocks will prevent creation of the "lost+found" directory. -g, --block-map path Generate a block map file for this path. -e, --fill-value value Fill unallocated blocks with value. -z, --allow-holes Make files with holes. -f, --faketime Use a timestamp of 0 for inode and filesystem creation, instead of the present. Useful for testing. -q, --squash Squash permissions and owners (same as -P -U). -U, --squash-uids Squash ownership of inodes added using the -d option, making them all owned by root:root. -P, --squash-perms Squash permissions of inodes added using the -d option. Analogous to "umask 077". -v, --verbose Print resulting filesystem structure. -V, --version Print genext2fs version. -h, --help Display help. EXAMPLES
genext2fs -b 1440 -d src /dev/fd0 All files in the src directory will be written to /dev/fd0 as a new ext2 filesystem image. You can then mount the floppy as usual. genext2fs -b 1024 -d src -D device_table.txt flashdisk.img This example builds a filesystem from all the files in src, then device nodes are created based on the contents of the file device_ta- ble.txt. Entries in the device table take the form of: <name> <type> <mode> <uid> <gid> <major> <minor> <start> <inc> <count> where name is the file name and type can be one of: f A regular file d Directory c Character special device file b Block special device file p Fifo (named pipe) uid is the user id for the target file, gid is the group id for the target file. The rest of the entries (major, minor, etc) apply only to device special files. An example device file follows: # name type mode uid gid major minor start inc count /dev d 755 0 0 - - - - - /dev/mem c 640 0 0 1 1 0 0 - /dev/tty c 666 0 0 5 0 0 0 - /dev/tty c 666 0 0 4 0 0 1 6 /dev/loop b 640 0 0 7 0 0 1 2 /dev/hda b 640 0 0 3 0 0 0 - /dev/hda b 640 0 0 3 1 1 1 16 /dev/log s 666 0 0 - - - - - This device table creates the /dev directory, a character device node /dev/mem (major 1, minor 1), and also creates /dev/tty, /dev/tty[0-5], /dev/loop[0-1], /dev/hda, /dev/hda1 to /dev/hda15 and /dev/log socket. SEE ALSO
mkfs(8), genromfs(8), mkisofs(8), mkfs.jffs2(1) AUTHOR
This manual page was written by David Kimdon <dwhedon@debian.org>, for the Debian GNU/Linux system (but may be used by others). Examples provided by Erik Andersen <andersen@codepoet.org>. August 19, 2006 GENEXT2FS(8)
Man Page