/[gentoo]/xml/htdocs/doc/en/genkernel.xml
Gentoo

Diff of /xml/htdocs/doc/en/genkernel.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.17 Revision 1.27
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.17 2005/07/24 16:51:15 plasmaroo Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.27 2007/05/18 15:01:48 rane Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide link="/doc/en/genkernel.xml"> 5<guide link="/doc/en/genkernel.xml">
6<title>Gentoo Linux Genkernel Guide</title> 6<title>Gentoo Linux Genkernel Guide</title>
7 7
19 Thomas Seiler 19 Thomas Seiler
20</author> 20</author>
21 21
22<abstract> 22<abstract>
23This guide intends to provide a reference of all the functions provided by 23This guide intends to provide a reference of all the functions provided by
24genkernel. 24genkernel.
25</abstract> 25</abstract>
26 26
27<license/> 27<license/>
28 28
29<version>1.2</version> 29<version>1.4.3</version>
30<date>2005-07-24</date> 30<date>2005-12-16</date>
31 31
32<chapter> 32<chapter>
33<title>Introduction</title> 33<title>Introduction</title>
34<section> 34<section>
35<title>Rationale</title> 35<title>Rationale</title>
46loaded for proper operation. 46loaded for proper operation.
47</p> 47</p>
48 48
49</body> 49</body>
50</section> 50</section>
51
52<section> 51<section>
53<title>Target Audience</title> 52<title>Target Audience</title>
54<body> 53<body>
55 54
56<p> 55<p>
75<title>Installing genkernel</title> 74<title>Installing genkernel</title>
76<body> 75<body>
77 76
78<p> 77<p>
79To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you 78To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you
80are using the 79are using the <uri
81<uri link="http://www.gentoo.org/doc/en/handbook/2005.0/hb-install-about.xml#doc_chap2_sect1"> 80link="/doc/en/handbook/2005.1/hb-install-about.xml#doc_chap2_sect1">Gentoo
82Gentoo Reference Platform</uri> (GRP), remember to install binary packages by 81Reference Platform</uri> (GRP), remember to install binary packages by passing
83passing the <c>-k</c> flag to emerge. Since the GRP is bundled with an older 82the <c>-k</c> flag to emerge. Since the GRP is bundled with an older version of
84version of genkernel, the flags may be different. In any case, consult 83genkernel, the flags may be different. In any case, consult <c>genkernel
85<c>genkernel --help</c> for help on how to use the version of genkernel 84--help</c> for help on how to use the version of genkernel installed on your
86installed on your system. 85system.
87</p> 86</p>
88 87
89</body> 88</body>
90</section> 89</section>
91</chapter> 90</chapter>
92 91
93<chapter> 92<chapter>
104and may increase compile time. Below is an illustration of a more efficient 103and may increase compile time. Below is an illustration of a more efficient
105approach, achieved by passing certain flags to genkernel as root: 104approach, achieved by passing certain flags to genkernel as root:
106</p> 105</p>
107 106
108<pre caption="Running genkernel (with flags)"> 107<pre caption="Running genkernel (with flags)">
109# genkernel --bootsplash --no-install --no-clean --menuconfig all 108# <i>genkernel --bootsplash --no-install --no-clean --menuconfig all</i>
110</pre> 109</pre>
111 110
112<p> 111<p>
113The above operation causes genkernel to create a bootsplash-enabled kernel 112The above operation causes genkernel to create a bootsplash-enabled kernel
114(<c>--bootsplash</c>) that will have to be manually installed 113(<c>--bootsplash</c>) that will have to be manually installed
144and their effects are enclosed within the square brackets, []. 143and their effects are enclosed within the square brackets, [].
145</p> 144</p>
146 145
147</body> 146</body>
148</section> 147</section>
149
150<section> 148<section>
151<title>Configuration Flags</title> 149<title>Configuration Flags</title>
152<body> 150<body>
153 151
154<p> 152<p>
157choose whether or not the configuration file created in the process should be 155choose whether or not the configuration file created in the process should be
158saved. The following are the primary configuration flags: 156saved. The following are the primary configuration flags:
159</p> 157</p>
160 158
161<ul> 159<ul>
162 <li> 160 <li>
163 <b>--<c>no-</c>menuconfig</b>: Activates <e>[or deactivates]</e> the 161 <b>--<c>no-</c>menuconfig</b>: Activates <e>[or deactivates]</e> the
164 <c>make menuconfig</c> command (which invokes an interactive, menu-based 162 <c>make menuconfig</c> command (which invokes an interactive, menu-based
165 kernel configuration utility), before building the kernel. 163 kernel configuration utility), before building the kernel.
166 </li> 164 </li>
167 <li> 165 <li>
168 <b>--gconfig</b>: Provides a kernel configuration utility which depends 166 <b>--gconfig</b>: Provides a kernel configuration utility which depends on
169 on the GTK+ libraries. The advantage of this option is that most users 167 the GTK+ libraries. The advantage of this option is that most users find it
170 find it easier and clearer to configure the kernel using this tool, since 168 easier and clearer to configure the kernel using this tool, since it relies
171 it relies on the X-windowing system. The disadvantage of this option is 169 on the X-windowing system. The disadvantage of this option is that you
172 that you <b>need</b> the X-windowing system to use it, so it will not 170 <b>need</b> the X-windowing system to use it, so it will not work on the
173 work on the command line. 171 command line.
174 </li> 172 </li>
175 <li> 173 <li>
176 <b>--xconfig</b>: Provides a kernel configuration utility which depends 174 <b>--xconfig</b>: Provides a kernel configuration utility which depends on
177 on the QT libraries. The advantage of this option is that most users find 175 the QT libraries. The advantage of this option is that most users find it
178 it easier and clearer to configure the kernel using this tool, since it 176 easier and clearer to configure the kernel using this tool, since it relies
179 relies on the X-windowing system. The disadvantage of this option is that 177 on the X-windowing system. The disadvantage of this option is that you
180 you <b>need</b> the X-windowing system to use it, so it will not work on 178 <b>need</b> the X-windowing system to use it, so it will not work on the
181 the command line. 179 command line.
182 </li> 180 </li>
183 <li> 181 <li>
184 <b>--<c>no-</c>save-config</b>: Saves [or does not save] the kernel 182 <b>--<c>no-</c>save-config</b>: Saves <e>[or does not save]</e> the kernel
185 configuration to a file in the <path>/etc/kernels/</path> directory for 183 configuration to a file in the <path>/etc/kernels/</path> directory for
186 later use. 184 later use.
187 </li> 185 </li>
188</ul> 186</ul>
189 187
190</body> 188</body>
191</section> 189</section>
192
193<section> 190<section>
194<title>Compilation Flags</title> 191<title>Compilation Flags</title>
195<body> 192<body>
196 193
197<p> 194<p>
198The following flags usually take effect during the actual compilation: 195The following flags usually take effect during the actual compilation:
199</p> 196</p>
200 197
201<ul> 198<ul>
202 <li> 199 <li>
203 <b>--kerneldir=<path>/path/to/sources/</path></b>: Specifies an 200 <b>--kerneldir=<path>/path/to/sources/</path></b>: Specifies an alternative
204 alternative kernel source location, rather than the default 201 kernel source location, rather than the default
205 <path>/usr/src/linux/</path> location. 202 <path>/usr/src/linux/</path> location.
206 </li> 203 </li>
207 <li> 204 <li>
208 <b>--kernel-config=<path>/path/to/config-file</path></b>: Specifies what 205 <b>--kernel-config=<path>/path/to/config-file</path></b>: Specifies what
209 alternative kernel configuration will be used, rather than the default 206 alternative kernel configuration will be used, rather than the default
210 <path>/path/to/sources/.config</path> file. 207 <path>/path/to/sources/.config</path> file.
211 </li> 208 </li>
212 <li> 209 <li>
213 <b>--module-prefix=<path>/path/to/prefix-directory/</path></b>: Specifies 210 <b>--module-prefix=<path>/path/to/prefix-directory/</path></b>: Specifies a
214 a prefix to the directory where kernel modules will be installed (default 211 prefix to the directory where kernel modules will be installed (default
215 path is the <path>/lib/modules/</path> directory.) 212 path is the <path>/lib/modules/</path> directory.)
216 </li> 213 </li>
217</ul> 214</ul>
218 215
219<ul> 216<ul>
220 <li> 217 <li>
221 <b>--<c>no-</c>clean</b>: Activates <e>[or deactivates]</e> the 218 <b>--<c>no-</c>clean</b>: Activates <e>[or deactivates]</e> the <c>make
222 <c>make clean</c> command before compiling your kernel. The 219 clean</c> command before compiling your kernel. The <c>make clean</c>
220 command removes all object files and dependencies from the kernel's source
221 tree.
222 </li>
223 <li>
224 <b>--<c>no-</c>mrproper</b>: Activates <e>[or deactivates]</e> the <c>make
225 mrproper</c> command before kernel compilation. Like the <c>make clean</c>
223 <c>make clean</c> command removes all object files and dependencies from 226 command, <c>make mrproper</c> removes all object files and dependencies
227 from the kernel's source tree. However, any previous configuration files
228 (in <path>/path/to/sources/.config</path> or
229 <path>/path/to/sources/.config.old</path>) will <b>also</b> be purged from
224 the kernel's source tree. 230 the kernel's source tree.
225 </li> 231 </li>
226 <li> 232 <li>
227 <b>--<c>no-</c>mrproper</b>: Activates <e>[or deactivates]</e> the
228 <c>make mrproper</c> command before kernel compilation. Like the
229 <c>make clean</c> command, <c>make mrproper</c> removes all object files
230 and dependencies from the kernel's source tree. However, any previous
231 configuration files (in <path>/path/to/sources/.config</path> or
232 <path>/path/to/sources/.config.old</path>) will <b>also</b> be purged
233 from the kernel's source tree.
234 </li>
235 <li>
236 <b>--oldconfig</b>: Issues the <c>make oldconfig</c> command, which 233 <b>--oldconfig</b>: Issues the <c>make oldconfig</c> command, which
237 attempts to collect configuration information for the system's 234 attempts to collect configuration information for the system's architecture
238 architecture from a generic script in <path>/usr/share/genkernel/</path>. 235 from a generic script in <path>/usr/share/genkernel/</path>. This is a
239 This is a non-interactive process; no user input is entertained. Also, if 236 non-interactive process; no user input is entertained. Also, if
240 <c>--oldconfig</c> is used in conjunction with <c>--clean</c>, the latter 237 <c>--oldconfig</c> is used in conjunction with <c>--clean</c>, the latter
241 flag is negated, resulting in the activation of the <c>--no-clean</c> 238 flag is negated, resulting in the activation of the <c>--no-clean</c> flag.
242 flag.
243 </li> 239 </li>
244</ul> 240</ul>
245 241
246<ul> 242<ul>
247 <li> 243 <li>
248 <b>--callback="<c>echo hello</c>"</b>: Calls the specified arguments 244 <b>--callback="<c>echo hello</c>"</b>: Calls the specified arguments
249 (<c>echo hello</c>, in this case) after the kernel and the relevant modules 245 (<c>echo hello</c>, in this case) after the kernel and the relevant modules
250 have been built, but before building the initrd image. This may be useful 246 have been built, but before building the initrd image. This may be useful
251 if you want to install external modules in the initrd image by emerging the 247 if you want to install external modules in the initrd image by emerging the
252 relevant item using the callback feature, and then redefining a genkernel 248 relevant item(s) with the callback feature, and then redefining a genkernel
253 module group. 249 module group.
254 </li> 250 </li>
255</ul> 251</ul>
256 252
257<ul> 253<ul>
258 <li> 254 <li>
259 <b>--udev</b>: Activates support for the userspace device file system 255 <b>--<c>no-</c>install</b>: Activates <e>[or deactivates]</e> the <c>make
260 (udev) in the initrd image. 256 install</c> command, which installs your new kernel image, configuration
257 file, initrd image and system map onto your mounted boot partition. Any
258 compiled modules will be installed as well.
261 </li> 259 </li>
262 <li> 260 <li>
263 <b>--<c>no-</c>install</b>: Activates <e>[or deactivates]</e> the
264 <c>make install</c> command, which installs your new kernel image,
265 configuration file, initrd image and system map onto your mounted boot
266 partition. Any compiled modules will be installed as well.
267 </li>
268 <li>
269 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to 261 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to the
270 the genkernel-created initrd image. This flag is an exception to the rule 262 genkernel-created initrd image. This flag is an exception to the rule about
271 about the <c>no-</c> prefix; omission of this prefix creates an invalid 263 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel
272 genkernel flag. 264 flag.
273 </li> 265 </li>
274 <li> 266 <li>
275 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image. 267 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image.
276 (This hack currently applies only to PPC Pegasos systems.) 268 (This hack currently applies only to PPC Pegasos systems.)
277 </li> 269 </li>
278</ul> 270</ul>
279 271
280</body> 272</body>
281</section> 273</section>
282
283<section> 274<section>
284<title>Compiler Flags</title> 275<title>Compiler Flags</title>
285<body> 276<body>
286 277
287<p> 278<p>
290<e>compiler</e> used for the kernel compilation process, albeit at a much lower 281<e>compiler</e> used for the kernel compilation process, albeit at a much lower
291level. 282level.
292</p> 283</p>
293 284
294<ul> 285<ul>
295 <li> 286 <li>
296 <b>--kernel-cc=<c>someCompiler</c></b>: Specifies the compiler employed 287 <b>--kernel-cc=<c>someCompiler</c></b>: Specifies the compiler employed
297 during the kernel compilation process. 288 during the kernel compilation process.
298 </li> 289 </li>
299 <li> 290 <li>
300 <b>--kernel-ld=<c>someLinker</c></b>: Specifies the linker employed 291 <b>--kernel-ld=<c>someLinker</c></b>: Specifies the linker employed during
301 during the kernel compilation process. 292 the kernel compilation process.
302 </li> 293 </li>
303 <li> 294 <li>
304 <b>--kernel-as=<c>someAssembler</c></b>: Specifies the assembler employed 295 <b>--kernel-as=<c>someAssembler</c></b>: Specifies the assembler employed
305 during the kernel compilation process. 296 during the kernel compilation process.
306 </li> 297 </li>
307 <li> 298 <li>
308 <b>--kernel-make=<c>someMake</c></b>: Specifies an alternative to the 299 <b>--kernel-make=<c>someMake</c></b>: Specifies an alternative to the
309 <e>GNU make</e> utility employed during the kernel compilation process. 300 <e>GNU make</e> utility employed during the kernel compilation process.
310 </li> 301 </li>
311</ul>
312
313<ul> 302</ul>
303
304<ul>
314 <li> 305 <li>
315 <b>--utils-cc=<c>someCompiler</c></b>: Specifies the compiler employed 306 <b>--utils-cc=<c>someCompiler</c></b>: Specifies the compiler employed
316 during the compilation of support utilities. 307 during the compilation of support utilities.
317 </li> 308 </li>
318 <li> 309 <li>
319 <b>--utils-ld=<c>someLinker</c></b>: Specifies the linker employed during 310 <b>--utils-ld=<c>someLinker</c></b>: Specifies the linker employed during
320 the compilation of support utilities. 311 the compilation of support utilities.
321 </li> 312 </li>
322 <li> 313 <li>
323 <b>--utils-as=<c>someAssembler</c></b>: Specifies the assembler employed 314 <b>--utils-as=<c>someAssembler</c></b>: Specifies the assembler employed
324 during the compilation of support utilities. 315 during the compilation of support utilities.
325 </li> 316 </li>
326 <li> 317 <li>
327 <b>--utils-make=<c>someMake</c></b>: Specifies an alternative to the 318 <b>--utils-make=<c>someMake</c></b>: Specifies an alternative to the <e>GNU
328 <e>GNU make</e> utility employed during the compilation of support 319 make</e> utility employed during the compilation of support utilities.
329 utilities.
330 </li> 320 </li>
331</ul>
332
333<ul> 321</ul>
322
323<ul>
334 <li> 324 <li>
335 <b>--makeopts=<c>-jX</c></b>: Specifies the number of concurrent threads 325 <b>--makeopts=<c>-jX</c></b>: Specifies the number of concurrent threads
336 that the make utility can implement while the kernel (and utilities) are 326 that the make utility can implement while the kernel (and utilities) are
337 being compiled. The variable <b>'X'</b> is a number obtained by adding 327 being compiled. The variable <b>'X'</b> is a number obtained by adding one
338 one (1) to the number of CPUs used by the system. So, for a system with 328 (1) to the number of CPUs used by the system. So, for a system with one
339 one CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will 329 CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will use
340 use the <c>-j3</c> flag, and so on. <e>(A system with one processor that 330 the <c>-j3</c> flag, and so on. <e>(A system with one processor that
341 supports Hyper-Threading&#8482; (HT) Technology can use the</e><c>-j3</c> 331 supports Hyper-Threading&trade; (HT) Technology can use the
342 <e>flag, provided Symmetric Multi-Processing (SMP) support is enabled in 332 </e><c>-j3</c><e> flag, provided Symmetric Multi-Processing (SMP) support is
343 the kernel.)</e> 333 enabled in the kernel.)</e>
344 </li> 334 </li>
345</ul> 335</ul>
346 336
347</body> 337</body>
348</section> 338</section>
349
350<section> 339<section>
351<title>Debugging Flags</title> 340<title>Debugging Flags</title>
352<body> 341<body>
353 342
354<p> 343<p>
355The use debugging flags during the kernel compilation process controls the 344The use of debugging flags during the kernel compilation process controls the
356amount of information reported, as well as the presentation of said data. 345amount of information reported, as well as the presentation of said data.
357</p> 346</p>
358 347
359<ul> 348<ul>
360 <li> 349 <li>
361 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of 350 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of verbosity for
362 verbosity for information provided by genkernel. The variable 351 information provided by genkernel. The variable <c>verblevel</c> is an
363 <c>verblevel</c> is an integer between 0 and 5. The level '0' represents 352 integer between 0 and 5. The level '0' represents minimal output, while '5'
364 minimal output, while '5' provides as much information as possible about 353 provides as much information as possible about genkernel's activities
365 genkernel's activities during the kernel compilation process. 354 during the kernel compilation process.
366 </li> 355 </li>
367 <li> 356 <li>
368 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value 357 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value set
369 set by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging 358 by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging data
370 data produced by genkernel to the specified output file, which is located 359 produced by genkernel to the specified output file, which is located at
371 at <path>/var/log/genkernel.log</path> by default. 360 <path>/var/log/genkernel.log</path> by default.
372 </li> 361 </li>
373 <li> 362 <li>
374 <b>--no-color</b>: Activates [or deactivates] colored output of debugging 363 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of
375 information (reported by genkernel) using escape sequences. 364 debugging information (reported by genkernel) using escape sequences.
376 </li> 365 </li>
377</ul> 366</ul>
378 367
379</body> 368</body>
380</section> 369</section>
381 370
389enabling certain features on the system. 378enabling certain features on the system.
390</p> 379</p>
391 380
392<ul> 381<ul>
393 <li> 382 <li>
394 <b>--<c>no-</c>bootsplash</b>: Activates <e>[or deactivates]</e> 383 <b>--<c>no-</c>bootsplash</b>: Activates <e>[or deactivates]</e> support
395 bootsplash support in the genkernel-built initrd image. The bootsplash 384 for <uri link="http://www.bootsplash.org/">bootsplash</uri> in the
396 feature is supported on a limited number of architectures, and a kernel 385 genkernel-built initrd image. The bootsplash feature is supported on a
397 that supports bootsplash is also required. Bootsplash is only supported 386 limited number of architectures, and a kernel that supports bootsplash is
398 on 2.4 series kernels. 387 also required.
399 </li>
400 <li> 388 </li>
401 <b>--<c>no-</c>gensplash</b>: Activates <e>[or deactivates]</e>
402 gensplash support in the genkernel-built initrd image. The gensplash
403 utility is intended to be a replacement for bootsplash, and is designed for
404 use with 2.6.x series kernels.
405 </li> 389 <li>
390 <b>--<c>no-</c>gensplash</b>: Activates <e>[or deactivates]</e> support for
391 <uri
392 link="http://dev.gentoo.org/~spock/projects/gensplash/">gensplash</uri>
393 support in the genkernel-built initrd image. The gensplash utility is
394 intended to be a replacement for bootsplash, and is designed for use with
395 2.6.x series kernels. To override the default theme used by gensplash, use
396 <b>--gensplash=<c>PreferredTheme</c></b> (where <c>PreferredTheme</c> is
397 the title of one of the directories inside the <path>/etc/splash/</path>
398 directory.
406 <li> 399 </li>
407 <b>--do-keymap-auto</b>: Specifies which keymap to use during the boot
408 sequence.
409 </li> 400 <li>
401 <b>--gensplash-res=<c>PreferredResolution</c></b>: This flag allows you to
402 select which splash screen resolutions will be supported in the initrd
403 during the start-up of the system. This is useful for two reasons: First,
404 you are able to select only the splash screen resolution(s) relevant to
405 your system. Second, you avoid the unnecessary increase in the disk space
406 required by initrd (since the initrd does not have to support resolutions
407 that are irrelevant for your system configuration.) However, you may want
408 to omit this flag if the kernel is being compiled for an Installation CD;
409 this allows gensplash support for all possible resolutions.
410 <li> 410 </li>
411 <li>
412 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence.
413 </li>
414 <li>
411 <b>--lvm2</b>: Includes support for storage using via Logical Volume 415 <b>--lvm2</b>: Includes support for storage using via <uri
416 link="http://sources.redhat.com/lvm2/">Logical Volume Management</uri>
412 Management (LVM2) from static binaries, if available to the system. 417 (LVM2) from <e>static</e> binaries, if available to the system. Relevant
413 Relevant (static) LVM2 binaries are compiled if they are unavailable. 418 (static) LVM2 binaries are compiled if they are unavailable. Be sure to
414 Be sure to install the lvm2 package on your system with <c>emerge 419 install the lvm2 package on your system with <c>emerge lvm2</c> before
415 lvm2</c> before enabling this flag, and review the <uri 420 enabling this flag, and review the <uri link="/doc/en/lvm2.xml">Gentoo LVM2
416 link="http://www.gentoo.org/doc/en/lvm2.xml">Gentoo LVM2
417 Installation</uri> guide. 421 Installation</uri> guide.
418 </li> 422 </li>
419 <li> 423 <li>
420 <b>--evms2</b>: Includes support for storage using the Enterprise Volume 424 <b>--evms2</b>: Includes support for storage using the <uri
425 link="http://evms.sourceforge.net/">Enterprise Volume Management
421 Management System (EVMS/EVMS2), if available. Be sure to install the evms 426 System</uri> (EVMS2), if available. Be sure to install the evms package on
422 package on your system with <c>emerge evms</c> before using this flag. 427 your system with <c>USE=static emerge evms2</c> before using this
428 (genkernel) flag. <e>(Omitting the </e><c>USE=static</c><e> flag during
429 package installation will fail to include the necessary static
430 binaries.)</e>
423 </li> 431 </li>
424 <li> 432 <li>
425 <b>--dmraid</b>: Includes support for the DMRAID, the utility which 433 <b>--dmraid</b>: Includes support for <uri
434 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the
426 creates RAID mappings using the kernel device-mapper subsystem. DMRAID 435 utility which creates RAID mappings using the kernel device-mapper
427 discovers, activates, deactivates and displays properties of software 436 subsystem. DMRAID discovers, activates, deactivates and displays properties
428 RAID sets (ATARAID, for example) and contained DOS partitions. 437 of software RAID sets (ATARAID, for example) and contained DOS partitions.
429 </li> 438 </li>
430 <li> 439 <li>
431 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 440 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created
432 <e>linuxrc</e> &#8212; a script that is initialized during the start-up 441 <e>linuxrc</e> &mdash; a script that is initialized during the start-up
433 stage of the kernel, prior to the actual boot process. (A default linuxrc 442 stage of the kernel, prior to the actual boot process. (A default linuxrc
434 script should be in the <path>/usr/share/genkernel/</path> directory.) 443 script should be in the <path>/usr/share/genkernel/</path> directory.) This
435 This script allows you to boot into a small, modularized kernel and load 444 script allows you to boot into a small, modularized kernel and load the
436 the drivers that are needed (as modules) by the system. 445 drivers that are needed (as modules) by the system.
437 </li> 446 </li>
438 <li> 447 <li>
439 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location 448 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location
440 used while compiling the kernel. 449 used while compiling the kernel.
441 </li> 450 </li>
442 <li> 451 <li>
443 <b>--tempdir=/path/to/new/tempdir/</b>: Specifies the location of the 452 <b>--tempdir=/path/to/new/tempdir/</b>: Specifies the location of the
444 temporary directory used by genkernel while compiling the kernel. 453 temporary directory used by genkernel while compiling the kernel.
445 </li> 454 </li>
455 <li>
456 <b>--unionfs</b>: Includes support for the <uri
457 link="http://www.fsl.cs.sunysb.edu/project-unionfs.html">Unification File
458 System</uri> in the initrd image.
459 </li>
446</ul> 460</ul>
447 461
448</body> 462</body>
449</section> 463</section>
450
451<section> 464<section>
452<title>Miscellaneous Flags</title> 465<title>Miscellaneous Flags</title>
453<body> 466<body>
454 467
455<p> 468<p>
456The assortment of flags listed below are supported by genkernel, but do not fit 469The assortment of flags listed below are supported by genkernel, but do not fit
457neatly into any of the other categories: 470neatly into any of the other categories:
458</p> 471</p>
459 472
460<ul> 473<ul>
461 <li> 474 <li>
462 <b>--mountboot</b>: Detects whether or not the <path>/boot/</path> 475 <b>--mountboot</b>: Detects whether or not the <path>/boot/</path>
463 directory needs to be mounted on a separate partition. It will check 476 directory needs to be mounted on a separate partition. It will check
464 <path>/etc/fstab</path> script for instructions on how to mount the boot 477 <path>/etc/fstab</path> script for instructions on how to mount the boot
465 partition on a file system (if needed). 478 partition on a file system (if needed).
466 </li> 479 </li>
467 <li> 480 <li>
468 <b>--arch-override=<c>someArch</c></b>: Overrides the architecture 481 <b>--kernname=<c>NickName</c></b>: Allows you to modify the name of the
469 genkernel assumes for the kernel compilation process. This flag is useful 482 kernel and initrd images in the <path>/boot/</path> directory, so that the
470 if the auto-detection mechanism fails (please file a bug if it does!) or 483 images produced are kernel-<c>NickName</c>-version and
471 if you wish to cross-compile a kernel. The list of supported 484 initramfs-<c>NickName</c>-version.
472 architectures is available in the <path>/usr/share/genkernel/</path>
473 directory.
474 </li> 485 </li>
475</ul>
476
477<ul> 486</ul>
478 <li>
479 <b>--busybox-config=<path>/path/to/busybox-config</path></b>: Overrides
480 the default Busybox configuration with the specified file.
481 </li>
482 <li>
483 <b>--busybox-bin=<path>/path/to/busybox-binary.tar.bz2</path></b>: Using
484 this option means that a (static) Busybox binary will not be compiled;
485 the specified tarball would be used instead.
486 </li>
487</ul>
488 487
489<ul>
490 <li>
491 <b>--maxkernpackage=<path>/output/to/yourkernel.tar.bz2</path></b>:
492 Creates a package that includes the kernel, the initrd image, the
493 kernel's modules (located in <path>/lib/modules/</path>) and
494 configuration file.
495 </li>
496 <li>
497 <b>--minkernpackage=<path>/output/to/yourkernel.tar.bz2</path></b>:
498 Creates a package that includes the kernel, and initrd image. The
499 difference between this flag and the <b>--maxkernpackage</b> flag is that
500 the kernel's modules and configuration file are excluded from the package
501 created by this flag.
502 </li>
503</ul>
504
505</body> 488</body>
506</section> 489</section>
507
508
509<section> 490<section>
510<title>Possible Actions</title> 491<title>Possible Actions</title>
511<body> 492<body>
512 493
513<p> 494<p>
514An action tells genkernel what to build. Currently, the following actions are 495An action tells genkernel what to build. Currently, the following actions are
515supported: 496supported:
516</p> 497</p>
517 498
518<ul> 499<ul>
519 <li><c>initrd</c>: Only builds the initrd image</li> 500 <li><c>initrd</c>: Only builds the initrd image</li>
501 <li><c>bzImage</c>: Only builds the kernel image</li>
520 <li><c>kernel</c>: Only builds the kernel image and modules</li> 502 <li><c>kernel</c>: Only builds the kernel image and modules</li>
503 <li>
521 <li><c>all</c>: Builds all stages &#8212; the initrd, kernel image and 504 <c>all</c>: Builds all stages &mdash; the initrd, kernel image and modules.
522 modules.</li> 505 </li>
523</ul> 506</ul>
524 507
525<p> 508<p>
526The last action, <c>all</c>, is recommended for most users since it builds the 509The last action, <c>all</c>, is recommended for most users since it builds the
527stages required for a functional kernel. Remember, an <e>action</e> simply 510stages required for a functional kernel. Remember, an <e>action</e> simply
528tells genkernel what to <e>build</e>, not <e>install</e>. 511tells genkernel what to <e>build</e>, not <e>install</e>.
529</p> 512</p>
530 513
531</body> 514</body>
532</section> 515</section>
533
534
535<section> 516<section>
536<title>Bootloader Configuration</title> 517<title>Bootloader Configuration</title>
537<body> 518<body>
538 519
539<p> 520<p>
540To set up genkernel to work with your bootloader, three or four changes should 521To set up genkernel to work with your bootloader, three or four changes should
541to the bootloader's configuration file: 522be applied to the bootloader's configuration file:
542</p> 523</p>
543 524
544<ol> 525<ol>
545 <li> 526 <li>
546 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel 527 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel parameters
547 parameters passed to the kernel image. 528 passed to the kernel image.
548 </li> 529 </li>
549 <li> 530 <li>
550 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 531 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters
551 passed to the kernel image, if <path>/dev/hda3</path> contains your root 532 passed to the kernel image, if <path>/dev/hda3</path> contains your root
552 partition. 533 partition.
553 </li> 534 </li>
554 <li> 535 <li>
555 If you are using bootsplash, add a suitable mode line such as 536 If you are using bootsplash, add a suitable mode line such as
556 <c>vga=0x317</c> to the parameters passed to the kernel and also add 537 <c>vga=0x317</c> to the parameters passed to the kernel and also add
557 <c>splash=verbose</c> or <c>splash=silent</c> depending on the 538 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness
558 verboseness you require from your bootloader. 539 you require from your bootloader.
559 </li> 540 </li>
560 <li> 541 <li>
561 Add the initrd information as required by the bootloader. Consult the 542 Add the initrd information as required by the bootloader. Consult the <uri
562 <uri link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10"> 543 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader
563 Bootloader Configuration Chapter</uri> of the Gentoo Handbook for details 544 Configuration Chapter</uri> of the Gentoo Handbook for details on how to
564 on how to make your bootloader initrd-aware. 545 make your bootloader initrd-aware.
565 </li> 546 </li>
566</ol> 547</ol>
567 548
568</body> 549</body>
569</section> 550</section>
570
571</chapter> 551</chapter>
572 552
573<chapter> 553<chapter>
574<title>Configuration Options</title> 554<title>Configuration Options</title>
575
576<section> 555<section>
577<title>Editing /etc/genkernel.conf</title> 556<title>Editing /etc/genkernel.conf</title>
578<body> 557<body>
579 558
580<p> 559<p>
581Passing flags to genkernel from the command line can be cumbersome, especially 560Passing flags to genkernel from the command line can be cumbersome, especially
582if you have about a dozen flags: 561if you have about a dozen flags:
583</p> 562</p>
584 563
585<pre caption="Running genkernel (overloaded with flags)"> 564<pre caption="Running genkernel (overloaded with flags)">
586# genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash\ 565# <i>genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash \
587--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig --udev\ 566--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \
588--kernel-config=/path/to/preferred/configfile --save-config --mountboot all 567--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i>
589</pre> 568</pre>
590 569
570<p>
591<p>Fortunately, there is a configuration file where most of the basic options 571Fortunately, there is a configuration file where most of the basic options can
592can be set (or changed) as necessary. What follows is a rundown of the more 572be set (or changed) as necessary. What follows is a rundown of the more
593relevant options: 573relevant options:
594</p> 574</p>
595 575
596<ul> 576<ul>
597 <li> 577 <li>
598 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the 578 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the
599 <c>--menuconfig</c> flag used by genkernel, which in turn uses the 579 <c>--menuconfig</c> flag used by genkernel, which in turn uses the <c>make
600 <c>make menuconfig</c> command to invoke a command-line based kernel 580 menuconfig</c> command to invoke a command-line based kernel configuration
601 configuration utility. To invoke the utility automatically during kernel 581 utility. To invoke the utility automatically during kernel configuration
602 configuration via this script, set this option to 'yes' here; otherwise, 582 via this script, set this option to 'yes' here; otherwise, choose 'no'.
603 choose 'no'.
604 </li> 583 </li>
605 <li> 584 <li>
606 <b>CLEAN=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 585 <b>CLEAN=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent to
607 to the <c>--clean</c> flag used by genkernel, and invokes the 586 the <c>--clean</c> flag used by genkernel, and invokes the <c>make
608 <c>make clean</c> command to remove all object files and dependencies 587 clean</c> command to remove all object files and dependencies from the
609 from the kernel's source tree. Setting this option to 'no' creates a 588 kernel's source tree. Setting this option to 'no' creates a cascade effect
610 cascade effect &#8212; it is equivalent to genkernel's <c>--no-clean</c> 589 &#8212; it is equivalent to genkernel's <c>--no-clean</c> flag, which
611 flag, which disables the <c>make clean</c> command and implies 590 disables the <c>make clean</c> command and implies genkernel's
612 genkernel's <c>--no-mrproper</c> flag &#8212; essentially nullifying the 591 <c>--no-mrproper</c> flag &mdash; essentially nullifying the <c>make
613 <c>make mrproper</c> command. 592 mrproper</c> command.
614 </li> 593 </li>
615 <li> 594 <li>
616 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is 595 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
617 equivalent to <c>--mrproper</c> flag used by genkernel, and invokes the 596 to <c>--mrproper</c> flag used by genkernel, and invokes the <c>make
618 <c>make mrproper</c> command, which purges the kernel source tree of any 597 mrproper</c> command, which purges the kernel source tree of any
619 configuration files. Selecting 'no' here is equivalent to genkernel's 598 configuration files. Selecting 'no' here is equivalent to genkernel's
620 <c>--no-mrproper</c> flag, which disables the <c>make mrproper</c> 599 <c>--no-mrproper</c> flag, which disables the <c>make mrproper</c> command.
621 command.
622 </li> 600 </li>
623 <li> 601 <li>
624 <b>MOUNTBOOT=<c>[yes|no]</c></b>: Setting this option to 'yes' is 602 <b>MOUNTBOOT=<c>[yes|no]</c></b>: Setting this option to 'yes' is
625 equivalent to the <c>--mountboot</c> flag, and automatically mounts the 603 equivalent to the <c>--mountboot</c> flag, and automatically mounts the
626 <path>/boot/</path> directory (if needed) at compile time. If the 604 <path>/boot/</path> directory (if needed) at compile time. If the
627 <path>/boot/</path> directory is on a separate partition, consider 605 <path>/boot/</path> directory is on a separate partition, consider enabling
628 enabling this option; it will make for one less (essential) step to 606 this option; it will make for one less (essential) step to remember later.
629 remember later.
630 </li> 607 </li>
631 <li> 608 <li>
632 <b>SAVE_CONFIG=<c>[yes|no]</c></b>: After configuring the kernel, the 609 <b>SAVE_CONFIG=<c>[yes|no]</c></b>: After configuring the kernel, the
633 selected options are stored as <path>.config</path> in the kernel source 610 selected options are stored as <path>.config</path> in the kernel source
634 tree. This script may be overwritten during the next kernel compilation, 611 tree. This script may be overwritten during the next kernel compilation, or
635 or even purged from the kernel source tree. Choosing 'yes' here is 612 even purged from the kernel source tree. Choosing 'yes' here is equivalent
636 equivalent to the <c>--save-config</c> flag, and stores all options 613 to the <c>--save-config</c> flag, and stores all options selected during
637 selected during kernel configuration as a script in the 614 kernel configuration as a script in the <path>/etc/kernels/</path>
638 <path>/etc/kernels/</path> directory. Choosing 'no' preserves the 615 directory. Choosing 'no' preserves the <e>status quo</e>.
639 <e>status quo</e>.
640 </li> 616 </li>
641 <li> 617 <li>
642 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is 618 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
643 equivalent to the <c>--color</c> flag, which colors genkernel's output 619 to the <c>--color</c> flag, which colors genkernel's output to ease
644 to ease debugging (when needed.) 620 debugging (when needed.)
645 </li> 621 </li>
646 <li> 622 <li>
647 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the 623 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the
648 verbosity of the output produced by genkernel &#8212; setting this option 624 verbosity of the output produced by genkernel &mdash; setting this option to
649 to '0' with <c>--debuglevel=0</c> will suppress all output produced by 625 '0' with <c>--debuglevel=0</c> will suppress all output produced by
650 genkernel; setting this option to '5' with <c>--debuglevel=5</c> 626 genkernel; setting this option to '5' with <c>--debuglevel=5</c> provides
651 provides the user with all output produced by genkernel. 627 the user with all output produced by genkernel.
652 </li> 628 </li>
653</ul> 629</ul>
654 630
655<p> 631<p>
656By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 632By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
657can halve the number of flags passed to genkernel from the command line: 633can halve the number of flags passed to genkernel from the command line:
658</p> 634</p>
659 635
660<pre caption="Running genkernel (with flags), after employing genkernel.conf"> 636<pre caption="Running genkernel (with flags), after employing genkernel.conf">
661# genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources --udev\ 637# <i>genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources \
662--kernel-config=/path/to/preferred/configfile --install all 638--kernel-config=/path/to/preferred/configfile --install all</i>
663</pre> 639</pre>
664 640
665<p> 641<p>
666Identical results are obtained from both approaches, but the latter has most of 642Identical results are obtained from both approaches, but the latter has most of
667the options stored in a script that can be modified at a later date. 643the options stored in a script that can be modified at a later date.
668</p> 644</p>
669 645
670</body> 646</body>
671</section> 647</section>
672
673</chapter> 648</chapter>
674 649
675<chapter> 650<chapter>
676<title>Network-Booting with genkernel</title> 651<title>Network-Booting with genkernel</title>
677
678<section> 652<section>
679<title>Network Booting from an Installation CD</title> 653<title>Network Booting from an Installation CD</title>
680<body> 654<body>
681 655
682<p> 656<p>
683The genkernel utility can build kernel and initrd images that provide support 657The genkernel utility can build kernel and initrd images that provide support
684for network booting, or <e>netboot</e>ing . With any luck, you should be able 658for network booting, or <e>netboot</e>ing. With any luck, you should be able
685to netboot any recent computer into the environment provided by the 659to netboot any recent computer into the environment provided by the
686Installation CD. 660Installation CD.
687</p> 661</p>
688 662
689<p> 663<p>
692Installation CD can take over, as if the CD was present locally. 666Installation CD can take over, as if the CD was present locally.
693</p> 667</p>
694 668
695</body> 669</body>
696</section> 670</section>
697
698<section> 671<section>
699<title>Building Kernel and Initrd Images with Support for Netbooting</title> 672<title>Building Kernel and Initrd Images with Support for Netbooting</title>
700<body> 673<body>
701 674
702<p> 675<p>
708Support for netbooting with genkernel is experimental and may contain bugs. 681Support for netbooting with genkernel is experimental and may contain bugs.
709</warn> 682</warn>
710 683
711<p> 684<p>
712First, the kernel image must include the drivers for your Network Interface 685First, the kernel image must include the drivers for your Network Interface
713Cards (NIC). Normally, these drivers will be compiled as modules. However, it 686Cards (NIC). Normally, drivers for such devices will be compiled as modules.
714is essential (for netbooting) that you such drivers compiled directly into the 687However, it is essential (for netbooting) that you have such drivers compiled
715kernel image and <b>not</b> as modules. 688directly into the kernel image and <b>not</b> as modules.
716</p> 689</p>
717 690
718<pre caption="Configuring a 2.6.x series kernel to support your NIC driver"> 691<pre caption="Configuring a 2.6.x series kernel to support your NIC driver">
719Device Drivers ---> 692Device Drivers --->
720 Networking Support ---> 693 Networking Support --->
721 Ethernet (10 or 100Mbit) ---> 694 Ethernet (10 or 100Mbit) --->
722 [*] Ethernet (10 or 100Mbit) 695 [*] Ethernet (10 or 100Mbit)
723 &lt;*&gt; the driver for your network card 696 &lt;*&gt; the driver for your network card
724<comment>(Be sure to select &lt;*&gt; and not &lt;m&gt;)</comment> 697<comment>(Be sure to select &lt;*&gt; and not &lt;M&gt;)</comment>
725</pre> 698</pre>
726 699
727<p> 700<p>
728Secondly, we suggest that you enable <c>IP: kernel level 701Secondly, we suggest that you enable <c>IP: kernel level autoconfiguration</c>
729autoconfiguration</c> and the <c>IP: DHCP support</c> options. This avoids an 702and the <c>IP: DHCP support</c> options. This avoids an unnecessary layer of
730unnecessary layer of complexity since the IP address and the NFS path to the 703complexity since the IP address and the NFS path to the Installation CD can be
731Installation CD can be configured on a DHCP server. Of course, this means the 704configured on a DHCP server. Of course, this means the kernel command line
732kernel command line will remain constant for any machine &#8212; which is very 705will remain constant for any machine &mdash; which is very important for
733important for <e>etherbooting</e>. 706<e>etherbooting</e>.
734</p> 707</p>
735 708
736<pre caption="Configuring a 2.6.x series kernel to support DHCP"> 709<pre caption="Configuring a 2.6.x series kernel to support DHCP">
737Device Drivers ---> 710Device Drivers --->
738 Networking Support ---> 711 Networking Support --->
739 Networking options 712 Networking options
740 [*] TCP/IP networking---> 713 [*] TCP/IP networking--->
741 [*] IP: kernel level autoconfiguration 714 [*] IP: kernel level autoconfiguration
742 [*] IP: DHCP support 715 [*] IP: DHCP support
743<comment>(These options tell the kernel to send a DHCP request at bootup.)</comment> 716<comment>(These options tell the kernel to send a DHCP request at bootup.)</comment>
744</pre> 717</pre>
749generic kernel source tree. To enable SquashFS, apply the necessary patches to 722generic kernel source tree. To enable SquashFS, apply the necessary patches to
750the generic kernel source or install <c>gentoo-sources</c>. 723the generic kernel source or install <c>gentoo-sources</c>.
751</p> 724</p>
752 725
753<pre caption="Configuring the kernel to support SquashFS"> 726<pre caption="Configuring the kernel to support SquashFS">
754File systems---> 727File systems--->
755 Miscellaneous filesystems ---> 728 Miscellaneous filesystems --->
756 [*] SquashFS 2.X - Squashed file system support 729 [*] SquashFS 2.X - Squashed file system support
757</pre> 730</pre>
758 731
759<p> 732<p>
762your kernel version does not match the kernel image version on the Installation 735your kernel version does not match the kernel image version on the Installation
763CD. 736CD.
764</p> 737</p>
765 738
766<pre caption="Creating a compressed tarball containing the kernel modules"> 739<pre caption="Creating a compressed tarball containing the kernel modules">
767<comment># Create a tar.gz containing all the modules</comment> 740<comment>(Create a tar.gz containing all the modules)</comment>
768cd / 741# <i>cd /</i>
769tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/ 742# <i>tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i>
770</pre> 743</pre>
771 744
772<p> 745<p>
773Depending on your network boot mechanism, you will need to do some of the 746Depending on your network boot mechanism, you will need to do some of the
774following steps: 747following steps:
775</p> 748</p>
776 749
777<pre caption="Creating a boot image"> 750<pre caption="Creating a boot image">
778<comment># Create a etherboot image</comment> 751<comment>(Create an etherboot image)</comment>
779emerge mknbi 752# <i>emerge mknbi</i>
780cd /boot 753# <i>cd /boot</i>
781mkelf-linux -params="root=/dev/ram0 init=/linuxrc ip=dhcp" kernel... initrd... > etherboot.img 754# <i>mkelf-linux -params="root=/dev/ram0 init=/linuxrc ip=dhcp" kernel... initrd... > etherboot.img</i>
782 755
783<comment># Create a OpenBoot / SPARC64 TFTP image</comment> 756<comment>(Create a OpenBoot / SPARC64 TFTP image)</comment>
784emerge sparc-utils 757# <i>emerge sparc-utils</i>
785cd /boot 758# <i>cd /boot</i>
786elftoaout kernel... -o kernel.aout 759# <i>elftoaout kernel... -o kernel.aout</i>
787piggyback64 kernel.aout System.map-... initrd-... 760# <i>piggyback64 kernel.aout System.map-... initrd-...</i>
788mv kernel.aout openboot.img <comment># This is the boot image</comment> 761# <i>mv kernel.aout openboot.img</i> <comment>(This is the boot image)</comment>
789 762
790<comment># PXE does not need any more steps, the kernel and initrd can be used as is</comment> 763<comment>(PXE does not need any more steps, the kernel and initrd can be used as is)</comment>
791</pre> 764</pre>
792 765
793<p> 766<p>
794Finally, copy this kernel to your TFTP server. The details are 767Finally, copy this kernel to your TFTP server. The details are
795architecture-dependent and are beyond the scope of this guide. Please refer to 768architecture-dependent and are beyond the scope of this guide. Please refer to
796the documentation for your platform. 769the documentation for your platform.
797</p> 770</p>
798 771
799</body> 772</body>
800</section> 773</section>
801
802<section> 774<section>
803<title>NFS Setup</title> 775<title>NFS Setup</title>
804<body> 776<body>
805 777
806<p> 778<p>
811the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path> 783the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path>
812directory. 784directory.
813</p> 785</p>
814 786
815<pre caption="Preparing the NFS share"> 787<pre caption="Preparing the NFS share">
816<comment># This assumes that /nfs/livecd is a exported NFS share</comment> 788<comment>(This assumes that /nfs/livecd is a exported NFS share)</comment>
817mount /mnt/cdrom /tmp/gentoo-livecd.iso -o loop 789# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i>
818cp -p /mnt/cdrom /nfs/livecd 790# <i>cp -p /mnt/cdrom /nfs/livecd</i>
819umount /mnt/cdrom 791# <i>umount /mnt/cdrom</i>
820 792
821<comment># Copy the modules.tar.gz into /add</comment> 793<comment>(Copy the modules.tar.gz into /add)</comment>
822mkdir /nfs/livecd/add 794# <i>mkdir /nfs/livecd/add</i>
823cp /tmp/modules-X.Y.Z.tar.gz /nfs/livecd/add 795# <i>cp /tmp/modules-X.Y.Z.tar.gz /nfs/livecd/add</i>
824</pre> 796</pre>
825 797
826</body> 798</body>
827</section> 799</section>
828
829<section> 800<section>
830<title>DHCP Setup</title> 801<title>DHCP Setup</title>
831<body> 802<body>
832 803
833<p> 804<p>
834The netboot images will ask your DHCP server for an IP as well as a 805The netboot images will ask your DHCP server for an IP as well as a root-path
835root-path parameter. Both can be specified per host using a MAC 806parameter. Both can be specified per host using a MAC address to identify
836address to identify machines: 807machines:
837</p> 808</p>
838 809
839<pre caption="Sample client dhcpd.conf setup"> 810<pre caption="Sample client dhcpd.conf setup">
840... 811...
841 812
849... 820...
850</pre> 821</pre>
851 822
852</body> 823</body>
853</section> 824</section>
854
855<section> 825<section>
856<title>Netbooting Instructions</title> 826<title>Netbooting Instructions</title>
857<body> 827<body>
858 828
859<p> 829<p>
860Netbooting itself is again very platform-specific. The important part 830Netbooting itself is again very platform-specific. The important part is to
861is to specify the <c>ip=dhcp</c> and <c>init=/linuxrc</c> parameters 831specify the <c>ip=dhcp</c> and <c>init=/linuxrc</c> parameters on the kernel
862on the kernel command line, as this will bring up the 832command line, as this will bring up the network interface and tell the initrd
863network interface and tell the initrd scripts to mount the Installation CD via 833scripts to mount the Installation CD via NFS. Here are some platform-specific
864NFS. Here are some platform-specific tips: 834tips:
865</p> 835</p>
866 836
867<pre caption="Netbooting Instructions"> 837<pre caption="Netbooting Instructions">
868<comment># Etherboot - insert the etherboot disk into the drive and reboot 838<comment># Etherboot - insert the etherboot disk into the drive and reboot
869# The kernel command line was specified when the image was constructed</comment> 839# The kernel command line was specified when the image was constructed</comment>
870 840
871<comment># Sparc64 - Hit Stop-A at the boot prompt </comment> 841<comment># Sparc64 - Hit Stop-A at the boot prompt</comment>
872ok boot net ip=dhcp init=/linuxrc 842ok boot net ip=dhcp init=/linuxrc
873 843
874<comment># PXE - Setup pxelinux (part of syslinux), then create a pxelinux.cfg/default along the lines of:</comment> 844<comment># PXE - Setup pxelinux (part of syslinux),
845then create a pxelinux.cfg/default along the lines of:</comment>
875 846
876DEFAULT gentoo 847DEFAULT gentoo
877TIMEOUT 40 848TIMEOUT 40
878PROMPT 1 849PROMPT 1
879 850
880LABEL gentoo 851LABEL gentoo
881 KERNEL kernel-X.Y.Z 852 KERNEL kernel-X.Y.Z
882 APPEND initrd=initrd-X.Y.Z root=/dev/ram0 init=/linuxrc ip=dhcp 853 APPEND initrd=initrd-X.Y.Z root=/dev/ram0 init=/linuxrc ip=dhcp
883</pre> 854</pre>
884 855
885</body> 856</body>
886</section> 857</section>
887
888</chapter> 858</chapter>
889 859
890<chapter> 860<chapter>
891<title>Conclusion</title> 861<title>Conclusion</title>
892
893<section> 862<section>
894<title>To Automate or not to Automate?</title> 863<title>To Automate or not to Automate?</title>
895<body> 864<body>
896 865
897<p> 866<p>
898The purpose of genkernel is to provide an (easier) alternative to the 867The purpose of genkernel is to provide an (easier) alternative to the
899time-tested approach to kernel compilation, where you have to issue a variety 868time-tested approach to kernel compilation. As always, you are free to decide
900of commands. As always, you are free to decide on whether or not you want to 869on whether or not you want to automate the kernel compilation process.
901automate the kernel compilation process.
902</p> 870</p>
903 871
904</body> 872</body>
905</section> 873</section>
906
907</chapter> 874</chapter>
908 875
909</guide> 876</guide>

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20