2 .\" Copyright (c) 2010 The DragonFly Project. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in
12 .\" the documentation and/or other materials provided with the
14 .\" 3. Neither the name of The DragonFly Project nor the names of its
15 .\" contributors may be used to endorse or promote products derived
16 .\" from this software without specific, prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
21 .\" FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22 .\" COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
23 .\" INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
24 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
25 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
26 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
28 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .Nd build an initial ramdisk image for use as early userland
40 .Op Fl c Ar contentsdir
45 script builds a ramdisk (md) image based on the UFS filesystem containing
46 only the most basic tools, such as a minimal
53 It will also copy the contents of
55 onto the ramdisk, maintaining the same hierarchy.
56 This directory can be changed with the
60 On completion, the final image will be copied to
61 .Pa /boot/kernel/initrd.img.gz ,
62 ready to be used as an early userland.
63 The base directory for
64 .Pa kernel/initrd.img.gz
65 can be changed with the
68 .Ar bootdir (the default is
70 The temporary directory to be used for setting up the image can be specified
73 option (the default is
79 .Pa /etc/mkinitrd.conf
80 if it exists and use the configuration from this file to override the
81 following variables (defaults are in
82 .Pa /etc/defaults/mkinitrd.conf ) :
83 .Bd -literal -offset indent
90 Adding the following lines to
92 will enable the use of the created initrd image:
93 .Bd -literal -offset indent
95 initrd.img_type="md_image"
96 vfs.root.mountfrom="ufs:md0s0"
99 The format for vfs.root.realroot in
100 .Pa /boot/loader.conf
101 that allows the user to specify what system to mount as the
102 new root in the initrd is specified in its general form below:
103 .Bd -literal -offset indent
104 vfs.root.realroot="<type>:[arg1[:arg2[:argN]]]"
107 Currently, three types of real root are supported,
114 type allows to mount any local file system that does not require any
115 special setup apart from the initial discovery and calling the
117 program. The general format is as follows:
118 .Bd -literal -offset indent
119 vfs.root.realroot="local:<FS TYPE>:<DEVICE PATH>[:<OPTIONS>]"
124 type allows to mount volumes supported by cryptsetup. The device will
125 be set up by prompting the user for his key, and this volume will then
126 be mounted as the new root.
127 .Bd -literal -offset indent
128 vfs.root.realroot="crypt:<FS TYPE>:<DEVICE PATH>:<VOLUME NAME>[:<OPTIONS>]"
133 type allows to mount volumes supported by
135 The device will be set up by prompting the user for his key, and this
136 volume will then be mounted as the new root.
137 .Bd -literal -offset indent
138 vfs.root.realroot="tcplay:<FS TYPE>:<DEVICE PATH>:<VOLUME NAME>[:<OPTIONS>]"
141 .Bd -literal -offset indent
142 vfs.root.realroot="local:ufs:/dev/vg00/lv0[:OPTIONS]"
144 .Bd -literal -offset indent
145 vfs.root.realroot="crypt:ufs:/dev/ad0s0a:secvolume[:OPTIONS]"
153 command first appeared in
158 .An Alex Hornung Aq Mt ahornung@gmail.com .