/[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.34 Revision 1.35
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.34 2010/12/07 20:49:23 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/genkernel.xml,v 1.35 2011/01/20 07:51:37 nightmorph Exp $ -->
3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 3<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4 4
5<guide disclaimer="obsolete"> 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>
30 30
31<!-- The content of this document is licensed under the CC-BY-SA license --> 31<!-- The content of this document is licensed under the CC-BY-SA license -->
32<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 32<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
33<license/> 33<license/>
34 34
35<version>4</version> 35<version>5</version>
36<date>2010-12-07</date> 36<date>2011-01-19</date>
37 37
38<chapter> 38<chapter>
39<title>Introduction</title> 39<title>Introduction</title>
40<section> 40<section>
41<title>Rationale</title> 41<title>Rationale</title>
42<body> 42<body>
43 43
44<p> 44<p>
45For users who are not privy to kernel compilation, genkernel is a tool to 45For users who don't want to manually compile their kernels, genkernel is a tool
46automate this process. It can help you create a kernel image akin to those 46to automate this process. It can help you create a kernel image akin to those
47available on Gentoo Installation CDs, which are designed to auto-detect the 47available on Gentoo Installation CDs, which are designed to auto-detect the
48hardware configuration of your system. Some users may also be interested in 48hardware configuration of your system. Some users may also be interested in
49using genkernel for hardware requiring initialization and a working kernel 49using genkernel for hardware requiring initialization and a working kernel
50before the system starts up. Since genkernel automatically compiles your kernel 50before the system starts up.
51modules, you can use hardware that may require certain module parameters to be
52loaded for proper operation.
53</p> 51</p>
54 52
55</body> 53</body>
56</section> 54</section>
57<section> 55<section>
79<section> 77<section>
80<title>Installing genkernel</title> 78<title>Installing genkernel</title>
81<body> 79<body>
82 80
83<p> 81<p>
84To obtain genkernel, run <c>emerge genkernel</c> from the command line. If you 82To obtain genkernel, run <c>emerge genkernel</c> from the command line. Consult
85are using the <uri link="/doc/en/handbook/2008.0/hb-install-about.xml">Gentoo
86Reference Platform</uri> (GRP), remember to install binary packages by passing
87the <c>-k</c> flag to emerge. Since the GRP is bundled with an older version
88of genkernel, the flags may be different. In any case, consult <c>genkernel
89--help</c> for help on how to use the version of genkernel installed on your 83<c>genkernel --help</c> for help on how to use the version of genkernel
90system. 84installed on your system.
91</p> 85</p>
92 86
93</body> 87</body>
94</section> 88</section>
95</chapter> 89</chapter>
125 119
126<p> 120<p>
127There are other flags which alter the result provided by genkernel. For 121There are other flags which alter the result provided by genkernel. For
128instance, replacing <c>--no-install</c> with the <c>--install</c> flag allows 122instance, replacing <c>--no-install</c> with the <c>--install</c> flag allows
129genkernel to automatically install the new kernel in the <path>/boot</path> 123genkernel to automatically install the new kernel in the <path>/boot</path>
124directory, and will create symlinks for you if <c>--symlink</c> is specified.
130directory. Using the <c>--mountboot</c> flag allows genkernel to mount your 125Using the <c>--mountboot</c> flag allows genkernel to mount your
131<path>/boot</path> partition automatically, if necessary. 126<path>/boot</path> partition automatically, if necessary.
132</p> 127</p>
133 128
134<p> 129<p>
135Remember, genkernel is designed to make kernel compilation easy and 130Remember, genkernel is designed to make kernel compilation easy and
140there are flags that affect kernel assembling, packaging and even kernel 135there are flags that affect kernel assembling, packaging and even kernel
141initialization. 136initialization.
142</p> 137</p>
143 138
144<p> 139<p>
145The rest of this chapter examines the functionality of various flags and 140The rest of this chapter examines the functionality of various flags,
146actions available for genkernel. Some of the flags have variants which perform 141configuration variables, and actions available for genkernel. For a more
142completel list, please refer to <c>man genkernel</c> and the comments in
143<path>/etc/genkernel.conf</path>. Some of the flags have variants which
147a converse operation. The converse variants carry the <b><c>no-</c></b> prefix, 144perform a converse operation. The converse variants carry the <b><c>no-</c></b>
148and their effects are enclosed within the square brackets, []. 145prefix, and their effects are enclosed within the square brackets, [].
149</p> 146</p>
150 147
151</body> 148</body>
152</section> 149</section>
153<section> 150<section>
261 install</c> command, which installs your new kernel image, configuration 258 install</c> command, which installs your new kernel image, configuration
262 file, initrd image and system map onto your mounted boot partition. Any 259 file, initrd image and system map onto your mounted boot partition. Any
263 compiled modules will be installed as well. 260 compiled modules will be installed as well.
264 </li> 261 </li>
265 <li> 262 <li>
266 <b>--<c>no-</c>ramdisk-modules</b>: Refrains from copying any modules to the 263 <b>--no-ramdisk-modules</b>: Refrains from copying any modules to the
267 genkernel-created initrd image. This flag is an exception to the rule about 264 genkernel-created initrd image. This flag is an exception to the rule about
268 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel 265 the <c>no-</c> prefix; omission of this prefix creates an invalid genkernel
269 flag. 266 flag.
270 </li> 267 </li>
271 <li> 268 <li>
441 This will allow you to use a device encrypted by LUKS which contains the 438 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 439 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 440 the value of crypt_root (and real_root shall be the unencrypted device LUKS
444 creates). 441 creates).
445 </li> 442 </li>
443 <li>
444 <b>--disklabel</b>: Adds support for disk label and UUID support to your
445 initrd.
446 </li>
447 <li>
448 <b>--iscsi</b>: Adds support for iSCSI to your initrd.
449 </li>
450 <li>
451 <b>--multipath</b>: Adds support for <uri
452 link="/doc/en/multipath.xml">Multipath</uri> to your initrd.
453 </li>
446 <li> 454 <li>
447 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 455 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created
448 <e>linuxrc</e> &mdash; a script that is initialized during the start-up 456 <e>linuxrc</e> &mdash; a script that is initialized during the start-up
449 stage of the kernel, prior to the actual boot process. (A default linuxrc 457 stage of the kernel, prior to the actual boot process. (A default linuxrc
450 script should be in the <path>/usr/share/genkernel/</path> directory.) This 458 script should be in the <path>/usr/share/genkernel/</path> directory.) This
530be applied to the bootloader's configuration file: 538be applied to the bootloader's configuration file:
531</p> 539</p>
532 540
533<ol> 541<ol>
534 <li> 542 <li>
535 Add <c>root=/dev/ram0</c> and <c>init=/linuxrc</c> to the kernel parameters
536 passed to the kernel image.
537 </li>
538 <li>
539 Add <c>real_root=/dev/hda3</c>, for example, to the kernel parameters 543 Add <c>real_root=/dev/sda3</c>, for example, to the kernel parameters
540 passed to the kernel image, if <path>/dev/hda3</path> contains your root 544 passed to the kernel image, if <path>/dev/sda3</path> contains your root
541 partition. 545 partition.
542 </li> 546 </li>
543 <li> 547 <li>
544 If you are using splash, add a suitable mode line such as <c>vga=0x317</c> 548 If you are using splash, add a suitable mode line such as <c>vga=0x317</c>
545 to the parameters passed to the kernel and also add <c>splash=verbose</c> or 549 to the parameters passed to the kernel and also add <c>splash=verbose</c> or
575--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i> 579--kernel-config=/path/to/preferred/configfile --save-config --mountboot all</i>
576</pre> 580</pre>
577 581
578<p> 582<p>
579Fortunately, there is a configuration file where most of the basic options can 583Fortunately, there is a configuration file where most of the basic options can
580be set (or changed) as necessary. What follows is a rundown of the more 584be set (or changed) as necessary: <path>/etc/genkernel.conf</path>. What follows
581relevant options: 585is a rundown of the more relevant options:
582</p> 586</p>
583 587
584<ul> 588<ul>
585 <li> 589 <li>
586 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the 590 <b>MENUCONFIG=<c>[yes|no]</c></b>: This option is equivalent to the
634 genkernel; setting this option to '5' with <c>--loglevel=5</c> provides 638 genkernel; setting this option to '5' with <c>--loglevel=5</c> provides
635 the user with all output produced by genkernel. 639 the user with all output produced by genkernel.
636 </li> 640 </li>
637</ul> 641</ul>
638 642
643<note>
644More options are described in <path>/etc/genkernel.conf</path>.
645</note>
646
639<p> 647<p>
640By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 648By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
641can halve the number of flags passed to genkernel from the command line: 649can halve the number of flags passed to genkernel from the command line:
642</p> 650</p>
643 651

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.20