/[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.24 Revision 1.39
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.24 2005/09/04 23:04:25 cam Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.39 2013/07/23 14:38:52 swift 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>
6<title>Gentoo Linux Genkernel Guide</title> 6<title>Gentoo Linux Genkernel Guide</title>
7 7
8<author title="Author"> 8<author title="Author">
9 <mail link="plasmaroo@gentoo.org">Tim Yamin</mail> 9 <mail link="plasmaroo@gentoo.org">Tim Yamin</mail>
10</author> 10</author>
11
12<!-- folajimi@speakeasy.net --> 11<!-- folajimi@speakeasy.net -->
13<author title="Contributor"> 12<author title="Contributor">
14 Jimi Ayodele 13 Jimi Ayodele
15</author> 14</author>
16
17<!-- thseiler@gmail.com --> 15<!-- thseiler@gmail.com -->
18<author title="NFS Support"> 16<author title="NFS Support">
19 Thomas Seiler 17 Thomas Seiler
20</author> 18</author>
19<author title="Editor">
20 <mail link="nightmorph"/>
21</author>
22<author title="Contributor">
23 <mail link="sping"/>
24</author>
21 25
22<abstract> 26<abstract>
23This guide intends to provide a reference of all the functions provided by 27This guide intends to provide a reference of all the functions provided by
24genkernel. 28genkernel.
25</abstract> 29</abstract>
26 30
31<!-- The content of this document is licensed under the CC-BY-SA license -->
32<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
27<license/> 33<license/>
28 34
29<version>1.4.1</version> 35<version>9</version>
36<!-- Latest real content change: 2012-06-29 -->
30<date>2005-08-11</date> 37<date>2013-07-23</date>
31 38
32<chapter> 39<chapter>
33<title>Introduction</title> 40<title>Introduction</title>
34<section> 41<section>
35<title>Rationale</title> 42<title>Rationale</title>
36<body> 43<body>
37 44
38<p> 45<p>
39For users who are not privy to kernel compilation, genkernel is a tool to 46For users who don't want to manually compile their kernels, genkernel is a tool
40automate this process. It can help you create a kernel image akin to those 47to automate this process. It can help you create a kernel image akin to those
41available on Gentoo Installation CDs, which are designed to auto-detect the 48available on Gentoo Installation CDs, which are designed to auto-detect the
42hardware configuration of your system. Some users may also be interested in 49hardware configuration of your system. Some users may also be interested in
43using genkernel for hardware requiring initialization and a working kernel 50using genkernel for hardware requiring initialization and a working kernel
44before the system starts up. Since genkernel automatically compiles your kernel 51before the system starts up.
45modules, you can use hardware that may require certain module parameters to be
46loaded for proper operation.
47</p> 52</p>
48 53
49</body> 54</body>
50</section> 55</section>
51<section> 56<section>
73<section> 78<section>
74<title>Installing genkernel</title> 79<title>Installing genkernel</title>
75<body> 80<body>
76 81
77<p> 82<p>
78To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you 83To obtain genkernel, run <c>emerge genkernel</c> from the command line. Consult
79are using the <uri
80link="/doc/en/handbook/2005.0/hb-install-about.xml#doc_chap2_sect1">Gentoo
81Reference Platform</uri> (GRP), remember to install binary packages by passing
82the <c>-k</c> flag to emerge. Since the GRP is bundled with an older version of
83genkernel, the flags may be different. In any case, consult <c>genkernel
84--help</c> for help on how to use the version of genkernel installed on your 84<c>genkernel --help</c> for help on how to use the version of genkernel
85system. 85installed on your system.
86</p> 86</p>
87 87
88</body> 88</body>
89</section> 89</section>
90</chapter> 90</chapter>
103and 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
104approach, achieved by passing certain flags to genkernel as root: 104approach, achieved by passing certain flags to genkernel as root:
105</p> 105</p>
106 106
107<pre caption="Running genkernel (with flags)"> 107<pre caption="Running genkernel (with flags)">
108# <i>genkernel --bootsplash --no-install --no-clean --menuconfig all</i> 108# <i>genkernel --splash --no-install --no-clean --menuconfig all</i>
109</pre> 109</pre>
110 110
111<p> 111<p>
112The above operation causes genkernel to create a bootsplash-enabled kernel 112The above operation causes genkernel to create a framebuffer splash-enabled
113(<c>--bootsplash</c>) that will have to be manually installed 113kernel (<c>--splash</c>) that will have to be manually installed
114(<c>--no-install</c>). While preparing the kernel source tree, genkernel will 114(<c>--no-install</c>). While preparing the kernel source tree, genkernel will
115refrain from cleaning out any preexisting object files present in the source 115refrain from cleaning out any preexisting object files present in the source
116tree (<c>--no-clean</c>). A menu-driven kernel configuration utility will be 116tree (<c>--no-clean</c>). A menu-driven kernel configuration utility will be
117displayed that allows the user to select which modules will be built for the 117displayed that allows the user to select which modules will be built for the
118system (<c>--menuconfig</c>). 118system (<c>--menuconfig</c>).
119</p> 119</p>
120 120
121<p> 121<p>
122There are other flags which alter the result provided by genkernel. For 122There are other flags which alter the result provided by genkernel. For
123instance, replacing <c>--no install</c> with the <c>--install</c> flag allows 123instance, replacing <c>--no-install</c> with the <c>--install</c> flag allows
124genkernel to automatically install the new kernel in the <path>/boot</path> 124genkernel to automatically install the new kernel in the <path>/boot</path>
125directory, and will create symlinks for you if <c>--symlink</c> is specified.
125directory. Using the <c>--mountboot</c> flag allows genkernel to mount your 126Using the <c>--mountboot</c> flag allows genkernel to mount your
126<path>/boot</path> partition automatically, if necessary. 127<path>/boot</path> partition automatically, if necessary.
127</p> 128</p>
128 129
129<p> 130<p>
130Remember, genkernel is designed to make kernel compilation easy and 131Remember, genkernel is designed to make kernel compilation easy and
135there are flags that affect kernel assembling, packaging and even kernel 136there are flags that affect kernel assembling, packaging and even kernel
136initialization. 137initialization.
137</p> 138</p>
138 139
139<p> 140<p>
140The rest of this chapter examines the functionality of various flags and 141The rest of this chapter examines the functionality of various flags,
141actions available for genkernel. Some of the flags have variants which perform 142configuration variables, and actions available for genkernel. For a more
143complete list, please refer to <c>man genkernel</c> and the comments in
144<path>/etc/genkernel.conf</path>. Some of the flags have variants which
142a converse operation. The converse variants carry the <b><c>no-</c></b> prefix, 145perform a converse operation. The converse variants carry the <b><c>no-</c></b>
143and their effects are enclosed within the square brackets, []. 146prefix, and their effects are enclosed within the square brackets, [].
144</p> 147</p>
145 148
146</body> 149</body>
147</section> 150</section>
148<section> 151<section>
177 on the X-windowing system. The disadvantage of this option is that you 180 on the X-windowing system. The disadvantage of this option is that you
178 <b>need</b> the X-windowing system to use it, so it will not work on the 181 <b>need</b> the X-windowing system to use it, so it will not work on the
179 command line. 182 command line.
180 </li> 183 </li>
181 <li> 184 <li>
182 <b>--<c>no-</c>save-config</b>: Saves [or does not save] the kernel 185 <b>--<c>no-</c>save-config</b>: Saves <e>[or does not save]</e> the kernel
183 configuration to a file in the <path>/etc/kernels/</path> directory for 186 configuration to a file in the <path>/etc/kernels/</path> directory for
184 later use. 187 later use.
185 </li> 188 </li>
186</ul> 189</ul>
187 190
256 install</c> command, which installs your new kernel image, configuration 259 install</c> command, which installs your new kernel image, configuration
257 file, initrd image and system map onto your mounted boot partition. Any 260 file, initrd image and system map onto your mounted boot partition. Any
258 compiled modules will be installed as well. 261 compiled modules will be installed as well.
259 </li> 262 </li>
260 <li> 263 <li>
261 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to the 264 <b>--no-ramdisk-modules</b>: Refrains from copying any modules to the
262 genkernel-created initrd image. This flag is an exception to the rule about 265 genkernel-created initrd image. This flag is an exception to the rule about
263 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel 266 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel
264 flag. 267 flag.
268 </li>
269 <li>
270 <b>--all-ramdisk-modules</b>: Copies all available modules to the
271 genkernel-created initrd image.
265 </li> 272 </li>
266 <li> 273 <li>
267 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image. 274 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image.
268 (This hack currently applies only to PPC Pegasos systems.) 275 (This hack currently applies only to PPC Pegasos systems.)
269 </li> 276 </li>
326 that the make utility can implement while the kernel (and utilities) are 333 that the make utility can implement while the kernel (and utilities) are
327 being compiled. The variable <b>'X'</b> is a number obtained by adding one 334 being compiled. The variable <b>'X'</b> is a number obtained by adding one
328 (1) to the number of CPUs used by the system. So, for a system with one 335 (1) to the number of CPUs used by the system. So, for a system with one
329 CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will use 336 CPU, the appropriate flag is <c>-j2</c>; a system with two CPUs will use
330 the <c>-j3</c> flag, and so on. <e>(A system with one processor that 337 the <c>-j3</c> flag, and so on. <e>(A system with one processor that
331 supports Hyper-Threading (HT) Technology can use the</e><c>-j3</c> 338 supports Hyper-Threading&trade; (HT) Technology can use the
332 <e>flag, provided Symmetric Multi-Processing (SMP) support is enabled in 339 </e><c>-j3</c><e> flag, provided Symmetric Multi-Processing (SMP) support is
333 the kernel.)</e> 340 enabled in the kernel.)</e>
334 </li> 341 </li>
335</ul> 342</ul>
336 343
337</body> 344</body>
338</section> 345</section>
339<section> 346<section>
340<title>Debugging Flags</title> 347<title>Debugging Flags</title>
341<body> 348<body>
342 349
343<p> 350<p>
344The use debugging flags during the kernel compilation process controls the 351The use of debugging flags during the kernel compilation process controls the
345amount of information reported, as well as the presentation of said data. 352amount of information reported, as well as the presentation of said data.
346</p> 353</p>
347 354
348<ul> 355<ul>
349 <li> 356 <li>
350 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of verbosity for 357 <b>--loglevel=<c>verblevel</c></b>: Controls the level of verbosity for
351 information provided by genkernel. The variable <c>verblevel</c> is an 358 information provided by genkernel. The variable <c>verblevel</c> is an
352 integer between 0 and 5. The level '0' represents minimal output, while '5' 359 integer between 0 and 5. The level '0' represents minimal output, while '5'
353 provides as much information as possible about genkernel's activities 360 provides as much information as possible about genkernel's activities
354 during the kernel compilation process. 361 during the kernel compilation process.
355 </li> 362 </li>
356 <li> 363 <li>
357 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value set 364 <b>--logfile=<path>/path/to/outputfile</path></b>: Ignores the value set
358 by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging data 365 by the <c>--loglevel</c> argument, and sends <b>all</b> debugging data
359 produced by genkernel to the specified output file, which is located at 366 produced by genkernel to the specified output file, which is located at
360 <path>/var/log/genkernel.log</path> by default. 367 <path>/var/log/genkernel.log</path> by default.
361 </li> 368 </li>
362 <li> 369 <li>
363 <b>--no-color</b>: Activates [or deactivates] colored output of debugging 370 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of
364 information (reported by genkernel) using escape sequences. 371 debugging information (reported by genkernel) using escape sequences.
365 </li> 372 </li>
366</ul> 373</ul>
367 374
368</body> 375</body>
369</section> 376</section>
378enabling certain features on the system. 385enabling certain features on the system.
379</p> 386</p>
380 387
381<ul> 388<ul>
382 <li> 389 <li>
383 <b>--<c>no-</c>bootsplash</b>: Activates <e>[or deactivates]</e> support
384 for <uri link="http://www.bootsplash.org/">bootsplash</uri> in the
385 genkernel-built initrd image. The bootsplash feature is supported on a
386 limited number of architectures, and a kernel that supports bootsplash is
387 also required.
388 </li>
389 <li>
390 <b>--<c>no-</c>gensplash</b>: Activates <e>[or deactivates]</e> support for 390 <b>--<c>no-</c>splash</b>: Activates <e>[or deactivates]</e> support for
391 <uri 391 <uri link="http://fbsplash.berlios.de/wiki/doku.php">framebuffer
392 link="http://dev.gentoo.org/~spock/projects/gensplash/">gensplash</uri> 392 splash</uri> support in the genkernel-built initrd image. To override the
393 support in the genkernel-built initrd image. The gensplash utility is 393 default theme used by fbsplash, use <b>--splash=<c>PreferredTheme</c></b>
394 intended to be a replacement for bootsplash, and is designed for use with 394 (where <c>PreferredTheme</c> is the title of one of the directories inside
395 2.6.x series kernels. To override the default theme used by gensplash, use 395 the <path>/etc/splash/</path> directory.
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.
399 </li>
400 <li> 396 </li>
397 <li>
401 <b>--gensplash-res=<c>PreferredResolution</c></b>: This flag allows you to 398 <b>--splash-res=<c>PreferredResolution</c></b>: This flag allows you to
402 select which splash screen resolutions will be supported in the initrd 399 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, 400 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 401 you are able to select only the splash screen resolution(s) relevant to your
405 your system. Second, you avoid the unnecessary increase in the disk space 402 system. Second, you avoid the unnecessary increase in the disk space
406 required by initrd (since the initrd does not have to support resolutions 403 required by initrd (since the initrd does not have to support resolutions
407 that are irrelevant for your system configuration.) However, you may want 404 that are irrelevant for your system configuration.) However, you may want to
408 to omit this flag if the kernel is being compiled for an Installation CD; 405 omit this flag if the kernel is being compiled for an Installation CD; this
409 this allows gensplash support for all possible resolutions. 406 allows splash support for all possible resolutions.
410 </li> 407 </li>
411 <li> 408 <li>
412 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence. 409 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence.
413 </li> 410 </li>
414 <li> 411 <li>
415 <b>--lvm2</b>: Includes support for storage using via <uri 412 <b>--lvm</b>: Includes support for storage using via <uri
416 link="http://sources.redhat.com/lvm2/">Logical Volume Management</uri> 413 link="http://sources.redhat.com/lvm2/">Logical Volume Management</uri>
417 (LVM2) from <e>static</e> binaries, if available to the system. Relevant 414 (LVM2) from <e>static</e> binaries, if available to the system. Relevant
418 (static) LVM2 binaries are compiled if they are unavailable. Be sure to 415 (static) LVM2 binaries are compiled if they are unavailable. Be sure to
419 install the lvm2 package on your system with <c>emerge lvm2</c> before 416 install the lvm2 package on your system with <c>emerge lvm2</c> before
420 enabling this flag, and review the <uri link="/doc/en/lvm2.xml">Gentoo LVM2 417 enabling this flag, and review the <uri
421 Installation</uri> guide. 418 link="https://wiki.gentoo.org/wiki/LVM">LVM article</uri>
422 </li> 419 on the Gentoo wiki.
423 <li>
424 <b>--evms2</b>: Includes support for storage using the <uri
425 link="http://evms.sourceforge.net/">Enterprise Volume Management
426 System</uri> (EVMS2), if available. Be sure to install the evms package on
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 binaries.)
430 </e>
431 </li> 420 </li>
432 <li> 421 <li>
433 <b>--dmraid</b>: Includes support for <uri 422 <b>--dmraid</b>: Includes support for <uri
434 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the 423 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the
435 utility which creates RAID mappings using the kernel device-mapper 424 utility which creates RAID mappings using the kernel device-mapper
436 subsystem. DMRAID discovers, activates, deactivates and displays properties 425 subsystem. DMRAID discovers, activates, deactivates and displays properties
437 of software RAID sets (ATARAID, for example) and contained DOS partitions. 426 of software RAID sets (ATARAID, for example) and contained DOS partitions.
438 </li> 427 </li>
439 <li> 428 <li>
429 <b>--luks</b>: Includes support for <uri
430 link="http://luks.endorphin.org/">Linux Unified Key Setup</uri> or LUKS.
431 This will allow you to use a device encrypted by LUKS which contains the
432 root filesystem. On the bootloader, you then set that encrypted device as
433 the value of crypt_root (and real_root shall be the unencrypted device LUKS
434 creates).
435 </li>
436 <li>
437 <b>--disklabel</b>: Adds support for disk label and UUID support to your
438 initrd.
439 </li>
440 <li>
441 <b>--iscsi</b>: Adds support for iSCSI to your initrd.
442 </li>
443 <li>
444 <b>--multipath</b>: Adds support for <uri
445 link="/doc/en/multipath.xml">Multipath</uri> to your initrd.
446 </li>
447 <li>
440 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 448 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created
441 <e>linuxrc</e> a script that is initialized during the start-up stage of 449 <e>linuxrc</e> &mdash; a script that is initialized during the start-up
442 the kernel, prior to the actual boot process. (A default linuxrc script 450 stage of the kernel, prior to the actual boot process. (A default linuxrc
443 should be in the <path>/usr/share/genkernel/</path> directory.) This script 451 script should be in the <path>/usr/share/genkernel/</path> directory.) This
444 allows you to boot into a small, modularized kernel and load the drivers 452 script allows you to boot into a small, modularized kernel and load the
445 that are needed (as modules) by the system. 453 drivers that are needed (as modules) by the system.
446 </li> 454 </li>
447 <li> 455 <li>
448 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location 456 <b>--cachedir=/path/to/alt/dir/</b>: Overrides the default cache location
449 used while compiling the kernel. 457 used while compiling the kernel.
450 </li> 458 </li>
495An action tells genkernel what to build. Currently, the following actions are 503An action tells genkernel what to build. Currently, the following actions are
496supported: 504supported:
497</p> 505</p>
498 506
499<ul> 507<ul>
500 <li><c>initrd</c>: Only builds the initrd image</li> 508 <li>
509 <c>all</c>: Builds all stages &mdash; the initrd, kernel image and modules.
510 </li>
501 <li><c>bzImage</c>: Only builds the kernel image</li> 511 <li><c>bzImage</c>: Only builds the kernel image</li>
502 <li><c>kernel</c>: Only builds the kernel image and modules</li> 512 <li><c>kernel</c>: Only builds the kernel image and modules</li>
503 <li><c>all</c>: Builds all stages — the initrd, kernel image and modules.</li> 513 <li><c>initramfs</c>: Only builds the initramfs/ramdisk image</li>
514 <li><c>ramdisk</c>: Only builds the initramfs/ramdisk image</li>
504</ul> 515</ul>
505 516
506<p> 517<p>
507The last action, <c>all</c>, is recommended for most users since it builds the 518The first action, <c>all</c>, is recommended for most users since it builds the
508stages required for a functional kernel. Remember, an <e>action</e> simply 519stages required for a functional kernel. Remember, an <e>action</e> simply
509tells genkernel what to <e>build</e>, not <e>install</e>. 520tells genkernel what to <e>build</e>, not <e>install</e>.
510</p> 521</p>
511 522
512</body> 523</body>
520be applied to the bootloader's configuration file: 531be applied to the bootloader's configuration file:
521</p> 532</p>
522 533
523<ol> 534<ol>
524 <li> 535 <li>
525 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel parameters
526 passed to the kernel image.
527 </li>
528 <li>
529 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 536 Add <c>real_root=/dev/sda3</c>, for example, to the kernel parameters
530 passed to the kernel image, if <path>/dev/hda3</path> contains your root 537 passed to the kernel image, if <path>/dev/sda3</path> contains your root
531 partition. 538 partition.
532 </li> 539 </li>
533 <li> 540 <li>
534 If you are using bootsplash, add a suitable mode line such as 541 If you are using splash, add a suitable mode line such as <c>vga=0x317</c>
535 <c>vga=0x317</c> to the parameters passed to the kernel and also add 542 to the parameters passed to the kernel and also add <c>splash=verbose</c> or
536 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness 543 <c>splash=silent</c> depending on the verboseness you require from your
537 you require from your bootloader. 544 bootloader.
538 </li> 545 </li>
539 <li> 546 <li>
540 Add the initrd information as required by the bootloader. Consult the <uri 547 Add the initrd information as required by the bootloader. Consult the <uri
541 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader 548 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader
542 Configuration Chapter</uri> of the Gentoo Handbook for details on how to 549 Configuration Chapter</uri> of the Gentoo Handbook for details on how to
558Passing flags to genkernel from the command line can be cumbersome, especially 565Passing flags to genkernel from the command line can be cumbersome, especially
559if you have about a dozen flags: 566if you have about a dozen flags:
560</p> 567</p>
561 568
562<pre caption="Running genkernel (overloaded with flags)"> 569<pre caption="Running genkernel (overloaded with flags)">
563# <i>genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash \ 570# <i>genkernel --loglevel=5 --no-color --no-mrproper --clean --splash \
564--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \ 571--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \
565--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i> 572--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i>
566</pre> 573</pre>
567 574
568<p> 575<p>
569Fortunately, there is a configuration file where most of the basic options can 576Fortunately, there is a configuration file where most of the basic options can
570be set (or changed) as necessary. What follows is a rundown of the more 577be set (or changed) as necessary: <path>/etc/genkernel.conf</path>. What follows
571relevant options: 578is a rundown of the more relevant options:
572</p> 579</p>
573 580
574<ul> 581<ul>
575 <li> 582 <li>
576 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the 583 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the
584 the <c>--clean</c> flag used by genkernel, and invokes the <c>make 591 the <c>--clean</c> flag used by genkernel, and invokes the <c>make
585 clean</c> command to remove all object files and dependencies from the 592 clean</c> command to remove all object files and dependencies from the
586 kernel's source tree. Setting this option to 'no' creates a cascade effect 593 kernel's source tree. Setting this option to 'no' creates a cascade effect
587 &#8212; it is equivalent to genkernel's <c>--no-clean</c> flag, which 594 &#8212; it is equivalent to genkernel's <c>--no-clean</c> flag, which
588 disables the <c>make clean</c> command and implies genkernel's 595 disables the <c>make clean</c> command and implies genkernel's
589 <c>--no-mrproper</c> flag &#8212; essentially nullifying the <c>make 596 <c>--no-mrproper</c> flag &mdash; essentially nullifying the <c>make
590 mrproper</c> command. 597 mrproper</c> command.
591 </li> 598 </li>
592 <li> 599 <li>
593 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 600 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
594 to <c>--mrproper</c> flag used by genkernel, and invokes the <c>make 601 to <c>--mrproper</c> flag used by genkernel, and invokes the <c>make
616 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 623 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
617 to the <c>--color</c> flag, which colors genkernel's output to ease 624 to the <c>--color</c> flag, which colors genkernel's output to ease
618 debugging (when needed.) 625 debugging (when needed.)
619 </li> 626 </li>
620 <li> 627 <li>
621 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the 628 <b>LOGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the
622 verbosity of the output produced by genkernel setting this option to '0' 629 verbosity of the output produced by genkernel &mdash; setting this option to
623 with <c>--debuglevel=0</c> will suppress all output produced by genkernel; 630 '0' with <c>--loglevel=0</c> will suppress all output produced by
624 setting this option to '5' with <c>--debuglevel=5</c> provides the user 631 genkernel; setting this option to '5' with <c>--loglevel=5</c> provides
625 with all output produced by genkernel. 632 the user with all output produced by genkernel.
626 </li> 633 </li>
627</ul> 634</ul>
635
636<note>
637More options are described in <path>/etc/genkernel.conf</path>.
638</note>
628 639
629<p> 640<p>
630By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 641By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
631can halve the number of flags passed to genkernel from the command line: 642can halve the number of flags passed to genkernel from the command line:
632</p> 643</p>
633 644
634<pre caption="Running genkernel (with flags), after employing genkernel.conf"> 645<pre caption="Running genkernel (with flags), after employing genkernel.conf">
635# <i>genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources \ 646# <i>genkernel --splash --kerneldir=/path/to/alternate/kernel/sources \
636--kernel-config=/path/to/preferred/configfile --install all</i> 647--kernel-config=/path/to/preferred/configfile --install all</i>
637</pre> 648</pre>
638 649
639<p> 650<p>
640Identical results are obtained from both approaches, but the latter has most of 651Identical results are obtained from both approaches, but the latter has most of
698<p> 709<p>
699Secondly, we suggest that you enable <c>IP: kernel level autoconfiguration</c> 710Secondly, we suggest that you enable <c>IP: kernel level autoconfiguration</c>
700and the <c>IP: DHCP support</c> options. This avoids an unnecessary layer of 711and the <c>IP: DHCP support</c> options. This avoids an unnecessary layer of
701complexity since the IP address and the NFS path to the Installation CD can be 712complexity since the IP address and the NFS path to the Installation CD can be
702configured on a DHCP server. Of course, this means the kernel command line 713configured on a DHCP server. Of course, this means the kernel command line
703will remain constant for any machine which is very important for 714will remain constant for any machine &mdash; which is very important for
704<e>etherbooting</e>. 715<e>etherbooting</e>.
705</p> 716</p>
706 717
707<pre caption="Configuring a 2.6.x series kernel to support DHCP"> 718<pre caption="Configuring a 2.6.x series kernel to support DHCP">
708Device Drivers ---> 719Device Drivers --->
735</p> 746</p>
736 747
737<pre caption="Creating a compressed tarball containing the kernel modules"> 748<pre caption="Creating a compressed tarball containing the kernel modules">
738<comment>(Create a tar.gz containing all the modules)</comment> 749<comment>(Create a tar.gz containing all the modules)</comment>
739# <i>cd /</i> 750# <i>cd /</i>
740# <i> tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i> 751# <i>tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i>
741</pre> 752</pre>
742 753
743<p> 754<p>
744Depending on your network boot mechanism, you will need to do some of the 755Depending on your network boot mechanism, you will need to do some of the
745following steps: 756following steps:
781the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path> 792the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path>
782directory. 793directory.
783</p> 794</p>
784 795
785<pre caption="Preparing the NFS share"> 796<pre caption="Preparing the NFS share">
786<comment>(This assumes that /nfs/livecd is a exported NFS share)</comment> 797<comment>(This assumes that /nfs/livecd is an exported NFS share)</comment>
787# <i>mount /mnt/cdrom /tmp/gentoo-livecd.iso -o loop</i> 798# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i>
788# <i>cp -p /mnt/cdrom /nfs/livecd</i> 799# <i>cp -p /mnt/cdrom /nfs/livecd</i>
789# <i>umount /mnt/cdrom</i> 800# <i>umount /mnt/cdrom</i>
790 801
791<comment>(Copy the modules.tar.gz into /add)</comment> 802<comment>(Copy the modules.tar.gz into /add)</comment>
792# <i>mkdir /nfs/livecd/add</i> 803# <i>mkdir /nfs/livecd/add</i>
854</body> 865</body>
855</section> 866</section>
856</chapter> 867</chapter>
857 868
858<chapter> 869<chapter>
870<title>Booting a genkernel initramfs</title>
871<section>
872<title>Introduction</title>
873<body>
874
875<p>
876If you installed an initramfs with genkernel, you should definitely take a look
877at the various boot options that you can (or need to) define in your bootloader
878configuration. The most common ones are added to this guide for your reference.
879</p>
880
881</body>
882</section>
883<section>
884<title>Loading LVM or software-RAID</title>
885<body>
886
887<p>
888If your system uses LVM or software-RAID, you undoubtedly have built the
889initramfs using the <c>--lvm</c> and <c>--mdadm</c> options (didn't you).
890However, you should not forget to enable support during boot as well. This can
891be done using the <c>dolvm</c> and <c>domdadm</c> options.
892</p>
893
894<pre caption="Enabling LVM and/or MDADM support">
895<comment># Example for GRUB 1.x</comment>
896title Gentoo Linux
897root (hd0,0)
898kernel /vmlinuz root=/dev/md3 <i>dolvm domdadm</i>
899initrd /initramfs-genkernel-x86_64-3.4.3
900</pre>
901
902</body>
903</section>
904<section>
905<title>Booting in single-user mode</title>
906<body>
907
908<p>
909If for some reason boot-up fails, you might be able to rescue your system by
910booting in the single-user mode. This will only load the really necessary
911services and then drop you to a rescue (root) shell.
912</p>
913
914<pre caption="Booting in single-user mode">
915<comment># Example for GRUB 1.x</comment>
916title Gentoo Linux
917root (hd0,0)
918kernel /vmlinuz root=/dev/md3 <i>init_opts=S</i>
919initrd /initramfs-genkernel-x86_64-3.4.3
920</pre>
921
922</body>
923</section>
924</chapter>
925
926<chapter>
859<title>Conclusion</title> 927<title>Conclusion</title>
860<section> 928<section>
861<title>To Automate or not to Automate?</title> 929<title>To Automate or not to Automate?</title>
862<body> 930<body>
863 931

Legend:
Removed from v.1.24  
changed lines
  Added in v.1.39

  ViewVC Help
Powered by ViewVC 1.1.20