DragonFly On-Line Manual Pages


MKINITRD(8)	       DragonFly System Manager's Manual	   MKINITRD(8)

NAME

mkinitrd -- build an initial ramdisk image for use as early userland

SYNOPSIS

mkinitrd [-b bootdir] [-t tmpdir]

DESCRIPTION

The mkinitrd script builds a ramdisk (md) image based on the UFS filesys- tem containing only the most basic tools, such as a minimal init(8), sh(1) as well as many mount(8) utilities. It will also copy the contents of /usr/share/initrd onto the ramdisk, maintaining the same hierarchy. On completion, the final image will be copied to /boot/kernel/initrd.img.gz, ready to be used as an early userland. The base directory for kernel/initrd.img.gz can be changed with the -b option to an optional bootdir (the default is /boot). The temporary directory to be used for setting up the image can be specified using the -t option (the default is /tmp). The mkinitrd script will read /etc/mkinitrd.conf if it exists and use the configuration from this file to override the following variables (defaults are in /etc/defaults/mkinitrd.conf): BUILD_DIR INITRD_SIZE INITRD_DIRS CONTENT_DIRS Adding the following lines to /boot/loader.conf will enable the use of the created initrd image: initrd.img_load="YES" initrd.img_type="md_image" vfs.root.mountfrom="ufs:md0s0" The format for vfs.root.realroot in /boot/loader.conf that allows the user to specify what system to mount as the new root in the initrd is specified in its general form below: vfs.root.realroot="<type>:[arg1[:arg2[:argN]]]" Currently, three types of real root are supported, local, tcplay and crypt. The local type allows to mount any local file system that does not require any special setup apart from the initial discovery and call- ing the mount program. The general format is as follows: vfs.root.realroot="local:<FS TYPE>:<DEVICE PATH>[:<OPTIONS>]" The crypt type allows to mount volumes supported by cryptsetup. The device will be set up by prompting the user for his key, and this volume will then be mounted as the new root. vfs.root.realroot="crypt:<FS TYPE>:<DEVICE PATH>:<VOLUME NAME>[:<OPTIONS>]" The tcplay type allows to mount volumes supported by tcplay(8). The device will be set up by prompting the user for his key, and this volume will then be mounted as the new root. vfs.root.realroot="tcplay:<FS TYPE>:<DEVICE PATH>:<VOLUME NAME>[:<OPTIONS>]"

EXAMPLES

vfs.root.realroot="local:ufs:/dev/vg00/lv0[:OPTIONS]" vfs.root.realroot="crypt:ufs:/dev/ad0s0a:secvolume[:OPTIONS]"

SEE ALSO

md(4), loader.conf(5)

HISTORY

The mkinitrd command first appeared in DragonFly 2.7.

AUTHORS

mkinitrd was written by Alex Hornung <ahornung@gmail.com>. DragonFly 3.7 December 12, 2011 DragonFly 3.7