Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
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 special
       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  re-
	      quired.

       -d source
	      Use  the	specified directory as the source, not the current di-
	      rectory.

       -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	speci-
	      fied  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. Pat-
	      terns either don't contain any  slashes,	in  which  case	 files
	      matching those patterns are matched in all directories, or start
	      with a leading slash, in which case they are matched against ab-
	      solute  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 ex-
	      clude CVS	directories and	backup files (ending in	a '~').

       -i pattern
	      Include files that match a pattern.  You can mix	and  match  -i
	      and  -x  options,	they will be processed in the order specified.
	      You can exclude  files  matching	*.bin  but  include  boot*.bin
	      later.

       -v     Verbose  operation,  genromfs  will print	each file which	is in-
	      cluded in	the image, along with its offset.

EXTENSION OPTIONS
       Except for the alignment	options, these are not	supported  in  current
       in-kernel romfs implementations as of early 2009.

       -ealign:N,PATTERN
	      Same as the -AN,PATTERN option.

       -ealign:N
	      Same as the -aN option.

       -eperm:N[,PATTERN]
	      Will  try	 to store the numeric (octal) permission for the files
	      matching the pattern.  Examples are 600 for files	accessible  to
	      their owners only, or 4711 for setuid files.  The	PATTERN	is op-
	      tional,  if  missing,  it	 will apply to all files (which	is not
	      generally	useful).

       -eperm[,PATTERN]
	      Similar to the above option, except that the permission to store
	      will be retrieved	from the actual	file.

       -euid:N[,PATTERN]

       -euid[,PATTERN]

       -egid:N[,PATTERN]

       -egid[,PATTERN]
	      Similarly	to the -eperm option, these options allow to store the
	      file user-id and group-id	information.

       -etime:N[,PATTERN]

       -etime[,PATTERN]
	      Similarly, these options allow to	store  the  file  modification
	      timestamp.  The number is	the Unix time, the seconds since Janu-
	      ary 1, 1970, 00:00:00 UTC.

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 di-
       rectory 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  <clame-
       ter@debian.org>,	for the	Debian GNU/Linux system.

SEE ALSO
       mkfs(8),	mount(8), mkisofs(8)

Version	0.5.7			   Feb 2009			   GENROMFS(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=genromfs&sektion=8&manpath=FreeBSD+Ports+14.3.quarterly>

home | help