[go: up one dir, main page]

File: mkinitrd.8

package info (click to toggle)
initrd-tools 0.1.32woody.3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 96 kB
  • ctags: 10
  • sloc: sh: 591; makefile: 37
file content (194 lines) | stat: -rw-r--r-- 4,391 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
.\" Man page for mkinitrd
.\"
.\" Copyright (C) 2001-2002 Herbert Xu <herbert@debian.org>
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation; either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program; if not, write to the Free Software
.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
.\"
.\" $Id: mkinitrd.8,v 1.17 2002/10/18 23:10:10 herbert Exp $
.TH MKINITRD 8 "$Date: 2002/10/18 23:10:10 $" "Initrd Tools"

.SH NAME
mkinitrd \- make an initrd image

.SH SYNOPSIS

.B mkinitrd
.RB [ \-k ]
.RB [ \-d
.IR confdir ]
.RB [ \-m
.IR command ]
.B \-o
.I outfile
.RB [ \-r
.IR root ]
.RI [ moduledir ]

.SH DESCRIPTION

The
.B mkinitrd
script constructs a directory structure that can serve as an
.B initrd
root file system.  It then generates an image containing that directory
structure using
.BR mkcramfs (8),
which can be loaded using the
.B initrd
mechanism.  The kernel modules placed in the directory structure will be taken
from
.IR moduledir .
This defaults to
.IR "/lib/modules/$(uname -r)" .

The directory structure can be customised by placing scripts into
.IR confdir/scripts .
They will be run using
.BR run-parts (8)
just before the directory is fed to
.BR mkcramfs (8).
You can also specify modules to load by putting them in
.IR confdir/modules ,
whose format is identical to that of
.IR /etc/modules ,
which is described in
.BR modules(5) .

When the system boots using an
.B initrd
image created by
.BR mkinitrd (8),
the
.B linuxrc
will wait for an amount of time which is configured through
.BR mkinitrd.conf (5),
during which it may be interrupted by pressing
.BR ENTER .
After that, the modules specified in
.I confdir/modules
(and possibly others if
.B ROOT
is not null) will be loaded, followed by any actions generated when
.B ROOT
is not null.  Finally any scripts or executables in
.I /scripts
will be run in alphabetical order.

.SH OPTIONS

.TP
\fB\-d \fIconfdir
By default
.B mkinitrd
looks for its configuration files in
.IR /etc/mkinitrd .
Use this option to override that.

.TP
.B \-k
Do not delete the temporary working directory that
.B mkinitrd
uses.  This is useful for debugging.

.TP
\fB\-m \fIcommand
This option overrides the setting of
.B MKIMAGE
in
.IR mkinitrd.conf .

.TP
\fB\-o \fIoutfile
This option causes
.B mkinitrd
to write the image to
.IR outfile .

.TP
\fB\-r \fIroot
This option overrides the setting of
.B ROOT
in
.IR mkinitrd.conf .

.SH FILES

.TP
.I /etc/mkinitrd/exe
This file contains full paths to shared executables that should be included
in the
.B initrd
image.
.B mkinitrd
will include them as well as any shared libraries that they are linked with.

.TP
.I /etc/mkinitrd/files
This file contains full paths to files that should be included in the
.B initrd
image.

.TP
.I /etc/mkinitrd/mkinitrd.conf
The default configuration file for the script.

.TP
.I /etc/mkinitrd/modules
All modules specified in this file will be loaded when the system boots
using the generated image.  However, they are not automatically included
on the image.  You will either have to use the appropriate
.B MODULES
setting, or copy them in using a script in
.IR /etc/mkinitrd/scripts .

.TP
.I /etc/mkinitrd/scripts
Scripts in this directory are run just before the image is generated from.
The environment variables
.B INITRDDIR
and
.B MODULEDIR
are available to the scripts.  They contain the path to the
.B initrd
directory structure under construction and the value of
.IR moduledir ,
respectively.

.SH NOTES

By default
.B mkinitrd
will generate a
.B CRAMFS
image.  This is
.B not
currently supported by
.BR Linux .
However, the
.B Debian
prepackaged kernels have been patched to support it.  You can also generate an
.B initrd
image of another type by changing the
.B MKIMAGE
setting in
.IR mkinitrd.conf .

.SH "SEE ALSO"

.BR mkcramfs (8),
.BR mkinitrd.conf (5)

.SH AUTHOR
Herbert Xu <herbert@debian.org>