/[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.27 Revision 1.32
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.27 2007/05/18 15:01:48 rane Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.32 2010/12/06 12:00:32 nightmorph 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 disclaimer="obsolete">
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.3</version> 35<version>2</version>
30<date>2005-12-16</date> 36<date>2010-12-06</date>
31 37
32<chapter> 38<chapter>
33<title>Introduction</title> 39<title>Introduction</title>
34<section> 40<section>
35<title>Rationale</title> 41<title>Rationale</title>
74<title>Installing genkernel</title> 80<title>Installing genkernel</title>
75<body> 81<body>
76 82
77<p> 83<p>
78To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you 84To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you
79are using the <uri 85are using the <uri link="/doc/en/handbook/2008/hb-install-about.xml">Gentoo
80link="/doc/en/handbook/2005.1/hb-install-about.xml#doc_chap2_sect1">Gentoo
81Reference Platform</uri> (GRP), remember to install binary packages by passing 86Reference 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 87the <c>-k</c> flag to emerge. Since the GRP is bundled with an older version
83genkernel, the flags may be different. In any case, consult <c>genkernel 88of genkernel, 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 89--help</c> for help on how to use the version of genkernel installed on your
85system. 90system.
86</p> 91</p>
87 92
88</body> 93</body>
103and may increase compile time. Below is an illustration of a more efficient 108and may increase compile time. Below is an illustration of a more efficient
104approach, achieved by passing certain flags to genkernel as root: 109approach, achieved by passing certain flags to genkernel as root:
105</p> 110</p>
106 111
107<pre caption="Running genkernel (with flags)"> 112<pre caption="Running genkernel (with flags)">
108# <i>genkernel --bootsplash --no-install --no-clean --menuconfig all</i> 113# <i>genkernel --splash --no-install --no-clean --menuconfig all</i>
109</pre> 114</pre>
110 115
111<p> 116<p>
112The above operation causes genkernel to create a bootsplash-enabled kernel 117The above operation causes genkernel to create a framebuffer splash-enabled
113(<c>--bootsplash</c>) that will have to be manually installed 118kernel (<c>--splash</c>) that will have to be manually installed
114(<c>--no-install</c>). While preparing the kernel source tree, genkernel will 119(<c>--no-install</c>). While preparing the kernel source tree, genkernel will
115refrain from cleaning out any preexisting object files present in the source 120refrain from cleaning out any preexisting object files present in the source
116tree (<c>--no-clean</c>). A menu-driven kernel configuration utility will be 121tree (<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 122displayed that allows the user to select which modules will be built for the
118system (<c>--menuconfig</c>). 123system (<c>--menuconfig</c>).
256 install</c> command, which installs your new kernel image, configuration 261 install</c> command, which installs your new kernel image, configuration
257 file, initrd image and system map onto your mounted boot partition. Any 262 file, initrd image and system map onto your mounted boot partition. Any
258 compiled modules will be installed as well. 263 compiled modules will be installed as well.
259 </li> 264 </li>
260 <li> 265 <li>
261 <b>--<c>no-</c>initrdmodules</b>: Refrains from copying any modules to the 266 <b>--<c>no-</c>ramdisk-modules</b>: Refrains from copying any modules to the
262 genkernel-created initrd image. This flag is an exception to the rule about 267 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 268 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel
264 flag. 269 flag.
270 </li>
271 <li>
272 <b>--all-ramdisk-modules</b>: Copies all available modules to the
273 genkernel-created initrd image.
265 </li> 274 </li>
266 <li> 275 <li>
267 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image. 276 <b>--genzimage</b>: Creates the initrd image, prior to the kernel image.
268 (This hack currently applies only to PPC Pegasos systems.) 277 (This hack currently applies only to PPC Pegasos systems.)
269 </li> 278 </li>
345amount of information reported, as well as the presentation of said data. 354amount of information reported, as well as the presentation of said data.
346</p> 355</p>
347 356
348<ul> 357<ul>
349 <li> 358 <li>
350 <b>--debuglevel=<c>verblevel</c></b>: Controls the level of verbosity for 359 <b>--loglevel=<c>verblevel</c></b>: Controls the level of verbosity for
351 information provided by genkernel. The variable <c>verblevel</c> is an 360 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' 361 integer between 0 and 5. The level '0' represents minimal output, while '5'
353 provides as much information as possible about genkernel's activities 362 provides as much information as possible about genkernel's activities
354 during the kernel compilation process. 363 during the kernel compilation process.
355 </li> 364 </li>
356 <li> 365 <li>
357 <b>--debugfile=<path>/path/to/outputfile</path></b>: Ignores the value set 366 <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 367 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 368 produced by genkernel to the specified output file, which is located at
360 <path>/var/log/genkernel.log</path> by default. 369 <path>/var/log/genkernel.log</path> by default.
361 </li> 370 </li>
362 <li> 371 <li>
363 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of 372 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of
378enabling certain features on the system. 387enabling certain features on the system.
379</p> 388</p>
380 389
381<ul> 390<ul>
382 <li> 391 <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 392 <b>--<c>no-</c>splash</b>: Activates <e>[or deactivates]</e> support for
391 <uri 393 <uri link="http://fbsplash.berlios.de/wiki/doku.php">framebuffer
392 link="http://dev.gentoo.org/~spock/projects/gensplash/">gensplash</uri> 394 splash</uri> support in the genkernel-built initrd image. To override the
393 support in the genkernel-built initrd image. The gensplash utility is 395 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 396 (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 397 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> 398 </li>
399 <li>
401 <b>--gensplash-res=<c>PreferredResolution</c></b>: This flag allows you to 400 <b>--splash-res=<c>PreferredResolution</c></b>: This flag allows you to
402 select which splash screen resolutions will be supported in the initrd 401 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, 402 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 403 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 404 system. Second, you avoid the unnecessary increase in the disk space
406 required by initrd (since the initrd does not have to support resolutions 405 required by initrd (since the initrd does not have to support resolutions
407 that are irrelevant for your system configuration.) However, you may want 406 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; 407 omit this flag if the kernel is being compiled for an Installation CD; this
409 this allows gensplash support for all possible resolutions. 408 allows splash support for all possible resolutions.
410 </li> 409 </li>
411 <li> 410 <li>
412 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence. 411 <b>--do-keymap-auto</b>: Force keymap selection during the boot sequence.
413 </li> 412 </li>
414 <li> 413 <li>
435 utility which creates RAID mappings using the kernel device-mapper 434 utility which creates RAID mappings using the kernel device-mapper
436 subsystem. DMRAID discovers, activates, deactivates and displays properties 435 subsystem. DMRAID discovers, activates, deactivates and displays properties
437 of software RAID sets (ATARAID, for example) and contained DOS partitions. 436 of software RAID sets (ATARAID, for example) and contained DOS partitions.
438 </li> 437 </li>
439 <li> 438 <li>
439 <b>--luks</b>: Includes support for <uri
440 link="http://luks.endorphin.org/">Linux Unified Key Setup</uri> or LUKS.
441 This will allow you to use a device encrypted by LUKS which contains the
442 root filesystem. On the bootloader, you then set that encrypted device as
443 the value of crypt_root (and real_root shall be the unencrypted device LUKS
444 creates).
445 </li>
446 <li>
440 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 447 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created
441 <e>linuxrc</e> &mdash; a script that is initialized during the start-up 448 <e>linuxrc</e> &mdash; a script that is initialized during the start-up
442 stage of the kernel, prior to the actual boot process. (A default linuxrc 449 stage of the kernel, prior to the actual boot process. (A default linuxrc
443 script should be in the <path>/usr/share/genkernel/</path> directory.) This 450 script should be in the <path>/usr/share/genkernel/</path> directory.) This
444 script allows you to boot into a small, modularized kernel and load the 451 script allows you to boot into a small, modularized kernel and load the
531 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 538 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters
532 passed to the kernel image, if <path>/dev/hda3</path> contains your root 539 passed to the kernel image, if <path>/dev/hda3</path> contains your root
533 partition. 540 partition.
534 </li> 541 </li>
535 <li> 542 <li>
536 If you are using bootsplash, add a suitable mode line such as 543 If you are using splash, add a suitable mode line such as <c>vga=0x317</c>
537 <c>vga=0x317</c> to the parameters passed to the kernel and also add 544 to the parameters passed to the kernel and also add <c>splash=verbose</c> or
538 <c>splash=verbose</c> or <c>splash=silent</c> depending on the verboseness 545 <c>splash=silent</c> depending on the verboseness you require from your
539 you require from your bootloader. 546 bootloader.
540 </li> 547 </li>
541 <li> 548 <li>
542 Add the initrd information as required by the bootloader. Consult the <uri 549 Add the initrd information as required by the bootloader. Consult the <uri
543 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader 550 link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=10">Bootloader
544 Configuration Chapter</uri> of the Gentoo Handbook for details on how to 551 Configuration Chapter</uri> of the Gentoo Handbook for details on how to
560Passing flags to genkernel from the command line can be cumbersome, especially 567Passing flags to genkernel from the command line can be cumbersome, especially
561if you have about a dozen flags: 568if you have about a dozen flags:
562</p> 569</p>
563 570
564<pre caption="Running genkernel (overloaded with flags)"> 571<pre caption="Running genkernel (overloaded with flags)">
565# <i>genkernel --debuglevel=5 --no-color --no-mrproper --clean --gensplash \ 572# <i>genkernel --loglevel=5 --no-color --no-mrproper --clean --splash \
566--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \ 573--kerneldir=/path/to/alternate/kernel/sources --install --menuconfig \
567--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i> 574--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i>
568</pre> 575</pre>
569 576
570<p> 577<p>
618 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 625 <b>USECOLOR=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent
619 to the <c>--color</c> flag, which colors genkernel's output to ease 626 to the <c>--color</c> flag, which colors genkernel's output to ease
620 debugging (when needed.) 627 debugging (when needed.)
621 </li> 628 </li>
622 <li> 629 <li>
623 <b>DEBUGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the 630 <b>LOGLEVEL=<c>[0|1|2|3|4|5]</c></b>: This option is for adjusting the
624 verbosity of the output produced by genkernel &mdash; setting this option to 631 verbosity of the output produced by genkernel &mdash; setting this option to
625 '0' with <c>--debuglevel=0</c> will suppress all output produced by 632 '0' with <c>--loglevel=0</c> will suppress all output produced by
626 genkernel; setting this option to '5' with <c>--debuglevel=5</c> provides 633 genkernel; setting this option to '5' with <c>--loglevel=5</c> provides
627 the user with all output produced by genkernel. 634 the user with all output produced by genkernel.
628 </li> 635 </li>
629</ul> 636</ul>
630 637
631<p> 638<p>
632By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 639By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
633can halve the number of flags passed to genkernel from the command line: 640can halve the number of flags passed to genkernel from the command line:
634</p> 641</p>
635 642
636<pre caption="Running genkernel (with flags), after employing genkernel.conf"> 643<pre caption="Running genkernel (with flags), after employing genkernel.conf">
637# <i>genkernel --gensplash --kerneldir=/path/to/alternate/kernel/sources \ 644# <i>genkernel --splash --kerneldir=/path/to/alternate/kernel/sources \
638--kernel-config=/path/to/preferred/configfile --install all</i> 645--kernel-config=/path/to/preferred/configfile --install all</i>
639</pre> 646</pre>
640 647
641<p> 648<p>
642Identical results are obtained from both approaches, but the latter has most of 649Identical results are obtained from both approaches, but the latter has most of
783the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path> 790the <c>modules-X.Y.Z.tar.gz</c> archive to the <path>/nfs/livecd/add/</path>
784directory. 791directory.
785</p> 792</p>
786 793
787<pre caption="Preparing the NFS share"> 794<pre caption="Preparing the NFS share">
788<comment>(This assumes that /nfs/livecd is a exported NFS share)</comment> 795<comment>(This assumes that /nfs/livecd is an exported NFS share)</comment>
789# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i> 796# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i>
790# <i>cp -p /mnt/cdrom /nfs/livecd</i> 797# <i>cp -p /mnt/cdrom /nfs/livecd</i>
791# <i>umount /mnt/cdrom</i> 798# <i>umount /mnt/cdrom</i>
792 799
793<comment>(Copy the modules.tar.gz into /add)</comment> 800<comment>(Copy the modules.tar.gz into /add)</comment>
870</p> 877</p>
871 878
872</body> 879</body>
873</section> 880</section>
874</chapter> 881</chapter>
875
876</guide> 882</guide>

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

  ViewVC Help
Powered by ViewVC 1.1.20