/[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.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.24 2005/09/04 23:04:25 cam 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
24genkernel. 24genkernel.
25</abstract> 25</abstract>
26 26
27<license/> 27<license/>
28 28
29<version>1.4.1</version> 29<version>1.4.3</version>
30<date>2005-08-11</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>
75<body> 75<body>
76 76
77<p> 77<p>
78To 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
79are using the <uri 79are using the <uri
80link="/doc/en/handbook/2005.0/hb-install-about.xml#doc_chap2_sect1">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 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 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 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--help</c> for help on how to use the version of genkernel installed on your
85system. 85system.
177 on the X-windowing system. The disadvantage of this option is that you 177 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 178 <b>need</b> the X-windowing system to use it, so it will not work on the
179 command line. 179 command line.
180 </li> 180 </li>
181 <li> 181 <li>
182 <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
183 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
184 later use. 184 later use.
185 </li> 185 </li>
186</ul> 186</ul>
187 187
326 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
327 being compiled. The variable <b>'X'</b> is a number obtained by adding one 327 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 328 (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 329 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 330 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> 331 supports Hyper-Threading&trade; (HT) Technology can use the
332 <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
333 the kernel.)</e> 333 enabled in the kernel.)</e>
334 </li> 334 </li>
335</ul> 335</ul>
336 336
337</body> 337</body>
338</section> 338</section>
339<section> 339<section>
340<title>Debugging Flags</title> 340<title>Debugging Flags</title>
341<body> 341<body>
342 342
343<p> 343<p>
344The use debugging flags during the kernel compilation process controls the 344The use of debugging flags during the kernel compilation process controls the
345amount of information reported, as well as the presentation of said data. 345amount of information reported, as well as the presentation of said data.
346</p> 346</p>
347 347
348<ul> 348<ul>
349 <li> 349 <li>
358 by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging data 358 by the <c>--debuglevel</c> argument, and sends <b>all</b> debugging data
359 produced by genkernel to the specified output file, which is located at 359 produced by genkernel to the specified output file, which is located at
360 <path>/var/log/genkernel.log</path> by default. 360 <path>/var/log/genkernel.log</path> by default.
361 </li> 361 </li>
362 <li> 362 <li>
363 <b>--no-color</b>: Activates [or deactivates] colored output of debugging 363 <b>--no-color</b>: Activates <e>[or deactivates]</e> colored output of
364 information (reported by genkernel) using escape sequences. 364 debugging information (reported by genkernel) using escape sequences.
365 </li> 365 </li>
366</ul> 366</ul>
367 367
368</body> 368</body>
369</section> 369</section>
423 <li> 423 <li>
424 <b>--evms2</b>: Includes support for storage using the <uri 424 <b>--evms2</b>: Includes support for storage using the <uri
425 link="http://evms.sourceforge.net/">Enterprise Volume Management 425 link="http://evms.sourceforge.net/">Enterprise Volume Management
426 System</uri> (EVMS2), if available. Be sure to install the evms package on 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 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 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.) 429 package installation will fail to include the necessary static
430 </e> 430 binaries.)</e>
431 </li> 431 </li>
432 <li> 432 <li>
433 <b>--dmraid</b>: Includes support for <uri 433 <b>--dmraid</b>: Includes support for <uri
434 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the 434 link="http://people.redhat.com/~heinzm/sw/dmraid/readme">DMRAID</uri>; the
435 utility which creates RAID mappings using the kernel device-mapper 435 utility which creates RAID mappings using the kernel device-mapper
436 subsystem. DMRAID discovers, activates, deactivates and displays properties 436 subsystem. DMRAID discovers, activates, deactivates and displays properties
437 of software RAID sets (ATARAID, for example) and contained DOS partitions. 437 of software RAID sets (ATARAID, for example) and contained DOS partitions.
438 </li> 438 </li>
439 <li> 439 <li>
440 <b>--linuxrc=/path/to/your/linuxrc</b>: Specifies a user-created 440 <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 441 <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 442 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 443 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 444 script allows you to boot into a small, modularized kernel and load the
445 that are needed (as modules) by the system. 445 drivers that are needed (as modules) by the system.
446 </li> 446 </li>
447 <li> 447 <li>
448 <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
449 used while compiling the kernel. 449 used while compiling the kernel.
450 </li> 450 </li>
498 498
499<ul> 499<ul>
500 <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> 501 <li><c>bzImage</c>: Only builds the kernel image</li>
502 <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>
503 <li><c>all</c>: Builds all stages the initrd, kernel image and modules.</li> 504 <c>all</c>: Builds all stages &mdash; the initrd, kernel image and modules.
505 </li>
504</ul> 506</ul>
505 507
506<p> 508<p>
507The 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
508stages required for a functional kernel. Remember, an <e>action</e> simply 510stages required for a functional kernel. Remember, an <e>action</e> simply
584 the <c>--clean</c> flag used by genkernel, and invokes the <c>make 586 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 587 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 588 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 589 &#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 590 disables the <c>make clean</c> command and implies genkernel's
589 <c>--no-mrproper</c> flag &#8212; essentially nullifying the <c>make 591 <c>--no-mrproper</c> flag &mdash; essentially nullifying the <c>make
590 mrproper</c> command. 592 mrproper</c> command.
591 </li> 593 </li>
592 <li> 594 <li>
593 <b>MRPROPER=<c>[yes|no]</c></b>: Setting this option to 'yes' is equivalent 595 <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 596 to <c>--mrproper</c> flag used by genkernel, and invokes the <c>make
617 to the <c>--color</c> flag, which colors genkernel's output to ease 619 to the <c>--color</c> flag, which colors genkernel's output to ease
618 debugging (when needed.) 620 debugging (when needed.)
619 </li> 621 </li>
620 <li> 622 <li>
621 <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
622 verbosity of the output produced by genkernel setting this option to '0' 624 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; 625 '0' with <c>--debuglevel=0</c> will suppress all output produced by
624 setting this option to '5' with <c>--debuglevel=5</c> provides the user 626 genkernel; setting this option to '5' with <c>--debuglevel=5</c> provides
625 with all output produced by genkernel. 627 the user with all output produced by genkernel.
626 </li> 628 </li>
627</ul> 629</ul>
628 630
629<p> 631<p>
630By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you 632By choosing the appropriate options in <path>/etc/genkernel.conf</path>, you
698<p> 700<p>
699Secondly, we suggest that you enable <c>IP: kernel level autoconfiguration</c> 701Secondly, 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 702and 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 703complexity 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 704configured on a DHCP server. Of course, this means the kernel command line
703will remain constant for any machine which is very important for 705will remain constant for any machine &mdash; which is very important for
704<e>etherbooting</e>. 706<e>etherbooting</e>.
705</p> 707</p>
706 708
707<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">
708Device Drivers ---> 710Device Drivers --->
735</p> 737</p>
736 738
737<pre caption="Creating a compressed tarball containing the kernel modules"> 739<pre caption="Creating a compressed tarball containing the kernel modules">
738<comment>(Create a tar.gz containing all the modules)</comment> 740<comment>(Create a tar.gz containing all the modules)</comment>
739# <i>cd /</i> 741# <i>cd /</i>
740# <i> tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i> 742# <i>tar -cf /tmp/modules-X.Y.Z.tar.gz /lib/modules/X.Y.Z/</i>
741</pre> 743</pre>
742 744
743<p> 745<p>
744Depending 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
745following steps: 747following steps:
782directory. 784directory.
783</p> 785</p>
784 786
785<pre caption="Preparing the NFS share"> 787<pre caption="Preparing the NFS share">
786<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>
787# <i>mount /mnt/cdrom /tmp/gentoo-livecd.iso -o loop</i> 789# <i>mount /tmp/gentoo-livecd.iso /mnt/cdrom -o loop</i>
788# <i>cp -p /mnt/cdrom /nfs/livecd</i> 790# <i>cp -p /mnt/cdrom /nfs/livecd</i>
789# <i>umount /mnt/cdrom</i> 791# <i>umount /mnt/cdrom</i>
790 792
791<comment>(Copy the modules.tar.gz into /add)</comment> 793<comment>(Copy the modules.tar.gz into /add)</comment>
792# <i>mkdir /nfs/livecd/add</i> 794# <i>mkdir /nfs/livecd/add</i>

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

  ViewVC Help
Powered by ViewVC 1.1.20