MAKEROOT(8)

NAME
makeroot - Tool to create root filesystem images given a tree containing a manifest

SYNOPSIS
makeroot [-d] [-B byte-order] [-e extras-manifest] [-f filelist] [-k keydir [-K user]] [-l label] [-p master.passwd [-g group]] [-s size] image-file rootdir

DESCRIPTION
The makeroot script creates a UFS filesystem image into imagefile. By default, all filesystem objects listed in the METALOG file contained in the rootdir directory will be placed in the root of the UFS image image-file.

Images can be customized with a number of different flags:

-B byte-order
    Set the byte order of the image to byte-order. This argument is passed directly to makefs(8).

-d  Enable debugging output.

-e manifest
    Extra files listed in the nmtree(8) format manifest file are added to the filesystem image. If no contents= tag is specified or a contents= tag is relative then files are found relative to the basename of the full path of the manifest. If a contents= tag is provided and it is an absolute path then the file will be from that path.

-f filelist
    Constrain set of filesystem objects included from rootdir to those listed (one per line) in the filelist plus any required directories.

-k keydir [-K user]
    Create a .ssh/authorized_keys file from a collection of public key files stored in keydir and install it in the home directory of user. If no -K argument is supplied then the files will be installed in the root user's directory.

-l label
    Set the file system volume label.

-p master.passwd [-g group]
    Install an alternate master.passwd file and optionally an alternative group file.

-s size
    Set the size of the image to size. The -s argument is passed directly to makefs(8).

FILES
METALOG
    mtree(5) 2.0 format manifest of permissions and ownership for files in the root directory. This file is generated by installworld, distribution, and installkernel.

EXAMPLES
    $ makeroot.sh -k keys -K ctsrd -p extras/etc/master.passwd -g extras/etc/group -e extras/mdroot.mtree -e demo/demo.mtree -e extras/ctsrd.mtree -s 26112k -f demo.files cheribsd-demo.img /path/to/dist

SEE ALSO
mtree(5), makefs(8), nmtree(8)

AUTHORS
This software and this manual page were developed by SRI International and the University of Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) (“CTSRD”), as part of the DARPA CRASH research programme.