8900b192cd4dbc5c6b86aed293f5c3a77ad5f0e1
[genkernel.git] / genkernel.8
1 .TH GENKERNEL "8" "June 2006" "genkernel 3.3" "Gentoo Linux"
2 .SH NAME
3 genkernel \- the Gentoo Linux automatic kernel compiler.
4 .SH SYNOPSIS
5 \fBgenkernel\fR \fI[options...] action\fR
6 .SH INTRODUCTION
7 Genkernel is designed to allow users who are not previously used to
8 compiling a kernel to use a similar setup to that one that is used on
9 the Gentoo LiveCDs which auto-detects your hardware.
10 .PP
11 Some users may also be interested in using genkernel for hardware
12 which requires initialization and a working kernel before it can be
13 booted because genkernel also automatically compiles your kernel
14 modules, allowing hardware which needs to be loaded with module
15 parameters to be used.
16 .SH USAGE
17 All that is needed to run genkernel is just ``genkernel'' with an action
18 and any flags you might need:
19 .PP
20 # genkernel --menuconfig --no-clean --no-install --bootsplash all
21 .PP
22 This would produce a kernel, asking you what how to configure it
23 to your desire, leaving alone any existing compiled object files, enabling
24 bootsplash support but not installing anything.
25 .SH ACTIONS
26 An action tells genkernel what you want it to do - the following
27 actions are supported:
28 .PP
29 .I \fBall\fR
30 .RS
31 Build all steps - the kernel, modules, and the initrd.
32 .RE
33 .I \fBbzImage\fR
34 .RS
35 Build only the kernel.
36 .RE
37 .I \fBkernel\fR
38 .RS
39 Build only the kernel and the modules.
40 .RE
41 .I \fBinitrd\fR
42 .RS
43 Build only the initrd.
44 .RE
45 .SH OPTIONS
46 Genkernel supports the following options which alter its
47 behaviour. Certain options have ``\fB--no-\fR'' variants which
48 do the opposite thing. You can specify your options in any order.
49 .PP
50 .BR Debugging \ Options
51 .TP
52 \fB\-\-debuglevel=\fR<0-5>
53 This controls the out verbosity level of genkernel output - if this is set
54 to 0, minimal debugging is done; if this is set to 5 as much output as
55 possible is given.
56 .TP
57 \fB\-\-debugfile=\fR<outfile>
58 This outputs full debugging data; regardless of --debuglevel to the file 
59 <outfile>. By default this is
60 .I /var/log/genkernel.log\fR.
61 .TP
62 \fB\-\-\fR[no\-]\fBcolor\fR
63 Turns on, or off, output in color using escape sequences.
64 .PP
65 .BR Kernel \ Configuration
66 .TP
67 \fB\-\-\fR[no\-]\fBmenuconfig\fR
68 Runs, or does not run "make menuconfig" after running "make oldconfig".
69 .TP
70 \fB\-\-\fR[no\-]\fBsave\-config\fR
71 Saves, or does not save the kernel configuration to
72 .I /etc/kernels
73 if the kernel is successfully compiled.
74 .TP
75 \fB\-\-gconfig\fR
76 Run "make gconfig" after "make oldconfig".
77 .TP
78 \fB\-\-xconfig\fR
79 Run "make xconfig" after "make oldconfig".
80 .PP
81 .BR Kernel \ Compilation
82 .TP
83 \fB\-\-\fR[no\-]\fBclean\fR
84 Runs, or does not run, "make clean" before compilation - this erases any
85 compiled object files in the kernel source tree but does not have an impact
86 on the kernel configuration. Specifying \fB\-\-no\-clean\fR implies
87 \fB\-\-no\-mrproper\fR.
88 .TP
89 \fB\-\-\fR[no\-]\fBmrproper\fR
90 Runs, or does not run, "make mrproper" before compilation - this erases both
91 any compiled object files in the kernel source tree as well as the kernel
92 configuration.
93 .TP
94 \fB\-\-\fR[no\-]\fBinstall\fR
95 Installs, or does not install the kernel to
96 .I /boot
97 after building. If MOUNTBOOT is set in
98 .I /etc/genkernel.conf
99 then
100 .I /boot
101 will be automatically mounted if it is
102 not already mounted before the initrd and kernel image is copied over.
103 .TP
104 \fB\-\-\fR[no\-]\fBsymlink\fR
105 Manages, or does not manage, symlinks in 
106 .I /boot
107 like the manual kernel "make install" process does. A
108 .I kernel
109 (or, depending on options, 
110 .I kernelz\fR)
111 symlink will link to the most recently built kernel image and a
112 .I kernel.old
113 (or
114 .I kernelz.old\fR)
115 symlink will link to the second most recently built image, if one exists.
116 Similar symlinks (both * and *.old) are managed for
117 .I initramfs\fR (or
118 .I initrd\fR)
119 and
120 .I System.map\f.
121 The corresponding work products (i.e., the actual kernel and inirtamfs images, 
122 and System.map) are also managed accordingly.  NOTE:  Specifying --symlink 
123 does nothing unless --install is also specified.
124 .TP
125 \fB\-\-no\-initrdmodules\fR
126 Don't copy any modules to the initrd.
127 .TP
128 \fB\-\-oldconfig\fR
129 Implies \fB\-\-no\-clean\fR, and thus \fB\-\-no\-mrproper\fR, running a
130 "make oldconfig".
131 .TP
132 \fB\-\-callback=\fR<...>
133 Run the specified arguments in the current environment after the kernel and
134 modules have been compiled.
135 .PP
136 .BR Kernel \ Locations
137 .TP
138 \fB\-\-kerneldir=\fR<dir>
139 This specifies the location of the kernel sources; the default is
140 /usr/src/linux.
141 .TP
142 \fB\-\-kernel\-config=\fR<file>
143 This specifies a kernel configuration file to use for compilation; by
144 default .config in the kernel source tree is used.
145 .PP
146 .BR Low-Level \ Compilation \ Options
147 .TP
148 \fB\-\-kernel\-cc=\fR<compiler>
149 Compiler to use for the kernel compilation (e.g. distcc).
150 .TP
151 \fB\-\-kernel\-as=\fR<assembler>
152 Assembler to use for the kernel compilation.
153 .TP
154 \fB\-\-kernel\-ld=\fR<linker>
155 Linker to use for the kernel compilation.
156 .TP
157 \fB\-\-kernel\-make=\fR<makeprg>
158 GNU Make to use for the kernel compilation.
159 .TP
160 \fB\-\-utils\-cc=\fR<compiler>
161 Compiler to use for utilities.
162 .TP
163 \fB\-\-utils\-as=\fR<assembler>
164 Assembler to use for utilities.
165 .TP
166 \fB\-\-utils\-ld=\fR<linker>
167 Linker to use for utilities.
168 .TP
169 \fB\-\-utils\-make=\fR<makeprog>
170 GNU Make to use for utilities.
171 .TP
172 \fB\-\-makeopts=\fR<makeopts>
173 GNU Make options such as \fB\-j2\fR, etc. \fB\-j\fRX is filtered during the
174 module compilation stage of 2.4 series kernels to avoid bottlenecks; the
175 2.6 build system does not have this issue and \fB\-j\fRX is not filtered for it.
176 .PP
177 .BR Initialization
178 .TP
179 \fB\-\-\fR[no\-]\fBbootsplash=\fR<theme>
180 If the extra argument is specified, bootsplash is forced using <theme>
181 rather than the default theme specified in your bootsplash
182 configuration. If \fB\-\-no-bootsplash\fR is specified, then
183 bootsplash is disabled.
184 .TP
185 \fB\-\-\fR[no\-]\fBgensplash=\fR<theme>
186 If the extra argument is specified, gensplash is forced using <theme>
187 rather than the default theme specified in your gensplash
188 configuration. If \fB\-\-no-gensplash\fR is specified, then
189 gensplash is disabled.
190 .TP
191 \fB\-\-gensplash-res=\fR<resolutions>
192 Optionally select gensplash resolutions to include.
193 .TP
194 \fB\-\-do\-keymap\-auto\fR
195 Force keymap selection at boot.
196 .TP
197 \fB\-\-dmraid\fR
198 Add DMRAID support.
199 .TP
200 \fB\-\-evms2\fR
201 Add in EVMS2 support from static binaries if they exist on the system:
202 you should run "emerge evms2" first.
203 .TP
204 \fB\-\-lvm2\fR
205 .RS
206 Add in LVM2 support from static binaries if they exist on the system,
207 or compile static LVM2 binaries if static ones do not exist.
208 .RE
209 .TP
210 \fB\-\-no-udev\fR
211 Force devfs on 2.6 series kernels. Not recommended or supported.
212 .TP
213 \fB\-\-static\fR
214 This builds a monolithic kernel without any modules on any initial ramdisks.
215 .TP
216 \fB\-\-linuxrc=\fR<file>
217 Use <file> for the linuxrc instead of the genkernel linuxrc.
218 .PP
219 .BR Internals
220 .TP
221 \fB\-\-arch\-override=\fR<arch>
222 Force the architecture settings described by the <arch> profile
223 instead of autodetecting the running architecture.
224 .PP
225 .BR Output \ Settings
226 .TP
227 \fB\-\-kernname=\fR<...>
228 Tag the kernel and initrd with a name, if not defined this option defaults to genkernel
229 .TP
230 \fB\-\-minkernpackage=\fR<tbz2>
231 File to output a .tar.bz2'd kernel and initrd: no modules outside of the
232 initrd will be included...
233 .TP
234 \fB\-\-modulespackage=\fR<tbz2>
235 File to output a .tar.bz2'd modules after the callbacks have run
236 .TP
237 \fB\-\-kerncache=\fR<tbz2>
238 File to output a .tar.bz2'd kernel, contents of /lib/modules/ and the kernel config.
239 \fBNOTE\fR: This is created before the callbacks are run.
240 .TP
241 \fB\-\-no\-kernel\-sources=\fR<tbz2>
242 This option is only valid if kerncache is defined
243 If there is a valid kerncache no checks will be made
244 against a kernel source tree.
245 .TP
246 \fB\-\-initramfs\-overlay=\fR<dir>
247 Directory structure to inject into the initramfs.
248 Only available on 2.6 kernels that don't use bootsplash; use a CPIO
249 archive as a parameter.
250 .SH INITRD OPTIONS
251 The following options can be passed as kernel parameters from the
252 bootloader, which the initrd scripts would recognize.
253 .TP
254 \fBreal_root=\fR<...>
255 Specifies the device node of the root filesystem to mount.
256 .TP
257 \fBdodmraid=\fR<...>
258 Passes arguments to dmraid on bootup.
259 .TP
260 \fBreal_init=\fR<...>
261 Passes arguments to init on bootup.
262 .TP
263 \fBscandelay=\fR<...>
264 Pauses for 10 seconds before running devfsd if no argument is specified;
265 otherwise pauses for the number of specified seconds.
266 .TP 
267 \fBip=\fR<...>
268 Normally used to tell the kernel that it should start a network interface. If present, the initrd will try to mount a livecd over NFS.
269 .TP 
270 \fBnfsroot=\fR<...>
271 If present, the initrd will try to mount a livecd from that location. Otherwise the location will be deduced from the DCHP request (option root\-path)
272 .TP
273 \fBdoevms2\fR
274 Activate EVMS2 volumes on bootup
275 .TP
276 \fBdolvm2\fR
277 Activate LVM2 volumes on bootup
278
279 .SH NETBOOTING
280 The initrd scripts have limited support for network booting.
281 This is activated if the ip=<...> kernel parameter was given. Please refer to the genkernel guide at http://www.gentoo.org/doc/en/genkernel.xml for more information.
282
283 The initrd scripts will extract any *.tar.gz files found in the \fB/add\fR directory of the livecd into the root filesystem during boot. This way it is easy to extend a netbooted LiveCD i.e. add custom tools, or other kernel modules.
284 .SH REPORTING BUGS
285 If you believe you have found a bug in the genkernel scripts, then please
286 file a bug on the Gentoo Linux Bugzilla: 
287 .I http://bugs.gentoo.org\fR,
288 assigning your bug to genkernel@gentoo.org. We cannot assist you
289 with kernel compilation failures unless they are caused by a genkernel
290 bug.
291 .PP
292 Kernel issues for Gentoo-supported kernels, including compilation
293 failures should go to
294 .I http://bugs.gentoo.org
295 and should be assigned to kernel@gentoo.org. Please check if an
296 existing bug documents the same issue before opening a new bug. Issues
297 for kernel sources not supported by Gentoo should go to their relevant
298 authors.
299 .SH AUTHORS
300 .nf
301 Tim Yamin <plasmaroo@gentoo.org>
302 Eric Edgar <rocket@gentoo.org>
303 NFS Support by Thomas Seiler <thseiler@gmail.com>
304 .fi
305 .SH SEE ALSO
306 \fB/etc/genkernel.conf\fR \- genkernel configuration file