GENEXT2FS(8)

NAME
genext2fs - ext2 filesystem generator for embedded systems

SYNOPSIS
genext2fs [options] image

DESCRIPTION
genext2fs generates an ext2 filesystem as a normal (non-root) user. It doesn't require you to mount the image file to copy files on it. It doesn't even require you to be the superuser to make device nodes.

OPTIONS

-x image
    Use this image as a starting point

-d directory
    Add this directory as source

-f FILE

-D FILE
    Uses the named FILE as a device table file, to create device nodes and directories "on the fly".

-b blocks
    Size in blocks

-i inodes
    Number of inodes

-r reserved
    Number of reserved blocks

-g path
    Generate a block map file for this path

-e value
    Fill unallocated blocks with value

-z  Make files with holes

-U  Squash owners making all files be owned by root

-P  Squash permissions on all files

-q  Squash permissions and owners (same as -P -U)

-v  Print resulting filesystem structure

-h  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 content the device_table file dev.txt. 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

This device table creates the /dev directory, a character device node /dev/mem (major 1, minor 1), it also creates /dev/tty, /dev/tty[0-5], /dev/loop[0-1], /dev/hda, and /dev/hda0 to /dev/hda15

BUGS
genext2fs does not support hard links. Hard links present in the input tree will be represented as separate files in the ext2 image.

SEE ALSO
mkfs(8), genromfs(8), mkisofs(8).

AUTHOR
This manual page was written by David Kimdon <dwhedon@debian.org>, for the Debian GNU/Linux system (but may be used by others).