/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml

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

Revision 1.25 Revision 1.39
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml,v 1.25 2008/05/19 09:10:06 nightmorph Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml,v 1.39 2011/08/22 17:28:40 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12The Linux kernel is the core of every distribution. This chapter 12The Linux kernel is the core of every distribution. This chapter
13explains how to configure your kernel. 13explains how to configure your kernel.
14</abstract> 14</abstract>
15 15
16<version>6.3</version> 16<version>10</version>
17<date>2008-05-19</date> 17<date>2011-08-22</date>
18 18
19<section> 19<section>
20<title>Timezone</title> 20<title>Timezone</title>
21<body> 21<body>
22 22
46<p> 46<p>
47The core around which all distributions are built is the Linux kernel. It is the 47The core around which all distributions are built is the Linux kernel. It is the
48layer between the user programs and your system hardware. Gentoo provides its 48layer between the user programs and your system hardware. Gentoo provides its
49users several possible kernel sources. A full listing with description is 49users several possible kernel sources. A full listing with description is
50available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 50available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
51Guide</uri>. 51Guide</uri>.
52</p> 52</p>
53 53
54<p> 54<p>
55For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c> 55For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c>
56(kernel source patched for extra features). 56(kernel source patched for extra features).
83the best way to optimize your environment. 83the best way to optimize your environment.
84</p> 84</p>
85 85
86<p> 86<p>
87If you want to manually configure your kernel, continue now with <uri 87If you want to manually configure your kernel, continue now with <uri
88link="#manual">Default: Manual Configuration</uri>. If you want to use 88link="#manual">Default: Manual Configuration</uri>. If you want to use
89<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using 89<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
90genkernel</uri> instead. 90genkernel</uri> instead.
91</p> 91</p>
92 92
93</body> 93</body>
94</subsection> 94</subsection>
105couple of kernels you don't even remember that it was difficult ;) 105couple of kernels you don't even remember that it was difficult ;)
106</p> 106</p>
107 107
108<p> 108<p>
109However, one thing <e>is</e> true: you must know your system when you start 109However, one thing <e>is</e> true: you must know your system when you start
110configuring a kernel manually. Most information can be gathered by emerging 110configuring a kernel manually. Most information can be gathered by emerging
111pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now 111pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
112be able to use <c>lspci</c> within the chrooted environment. You may safely 112be able to use <c>lspci</c> within the chrooted environment. You may safely
113ignore any <e>pcilib</e> warnings (like pcilib: cannot open 113ignore any <e>pcilib</e> warnings (like pcilib: cannot open
114/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run 114/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
115<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same. 115<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
116You can also run <c>lsmod</c> to see what kernel modules the Installation CD 116You can also run <c>lsmod</c> to see what kernel modules the Installation CD
117uses (it might provide you with a nice hint on what to enable). 117uses (it might provide you with a nice hint on what to enable).
118</p> 118</p>
119 119
120<p> 120<p>
121Now go to your kernel source directory and execute <c>make menuconfig</c>. This 121Now go to your kernel source directory and execute <c>make menuconfig</c>. This
153strongly recommends users enable MCE features so that they are able to be 153strongly recommends users enable MCE features so that they are able to be
154notified of any hardware problems. On x86_64, these errors are not printed to 154notified of any hardware problems. On x86_64, these errors are not printed to
155<c>dmesg</c> like on other architectures, but to <path>/dev/mcelog</path>. This 155<c>dmesg</c> like on other architectures, but to <path>/dev/mcelog</path>. This
156requires the <c>app-admin/mcelog</c> package. Make sure you select IA32 156requires the <c>app-admin/mcelog</c> package. Make sure you select IA32
157Emulation if you want to be able to run 32-bit programs. Gentoo will install a 157Emulation if you want to be able to run 32-bit programs. Gentoo will install a
158multilib system (mixed 32-bit/64-bit computing) by default, so you probably 158multilib system (mixed 32-bit/64-bit computing) by default, so this option is
159want this option. 159required.
160</p> 160</p>
161
162<note>
163If you plan to use a non-multilib profile (for a pure 64-bit system), then you
164don't have to select IA32 Emulation support. However, you'll also need to follow
165the <uri link="?part=1&amp;chap=6#doc_chap2_sect2">instructions</uri> for
166switching to a <uri link="/doc/en/gentoo-amd64-faq.xml">non-multilib
167profile</uri>, as well as choosing the correct <uri
168link="?part=1&amp;chap=10#doc_chap2_sect2">bootloader</uri>.
169</note>
161 170
162<pre caption="Selecting processor type and features"> 171<pre caption="Selecting processor type and features">
163Processor type and features ---> 172Processor type and features --->
173 [ ] Machine Check / overheating reporting
164 [ ] Intel MCE Features 174 [ ] Intel MCE Features
165 [ ] AMD MCE Features 175 [ ] AMD MCE Features
166 Processor family (AMD-Opteron/Athlon64) ---> 176 Processor family (AMD-Opteron/Athlon64) --->
167 ( ) AMD-Opteron/Athlon64 177 ( ) Opteron/Athlon64/Hammer/K8
178 ( ) Intel P4 / older Netburst based Xeon
179 ( ) Core 2/newer Xeon
168 ( ) Intel EM64T 180 ( ) Intel Atom
169 ( ) Generic-x86-64 181 ( ) Generic-x86-64
170Executable file formats / Emulations ---> 182Executable file formats / Emulations --->
171 [*] IA32 Emulation 183 [*] IA32 Emulation
172</pre> 184</pre>
173 185
199 Pseudo Filesystems ---&gt; 211 Pseudo Filesystems ---&gt;
200 [*] /proc file system support 212 [*] /proc file system support
201 [*] Virtual memory file system support (former shm fs) 213 [*] Virtual memory file system support (former shm fs)
202 214
203<comment>(Select one or more of the following options as needed by your system)</comment> 215<comment>(Select one or more of the following options as needed by your system)</comment>
216 &lt;*&gt; Second extended fs support
217 &lt;*&gt; Ext3 journalling file system support
218 &lt;*&gt; The Extended 4 (ext4) filesystem
204 &lt;*&gt; Reiserfs support 219 &lt;*&gt; Reiserfs support
205 &lt;*&gt; Ext3 journalling file system support
206 &lt;*&gt; JFS filesystem support 220 &lt;*&gt; JFS filesystem support
207 &lt;*&gt; Second extended fs support
208 &lt;*&gt; XFS filesystem support 221 &lt;*&gt; XFS filesystem support
222 ...
223 Pseudo Filesystems ---&gt;
224 [*] /proc file system support
225 [*] Virtual memory file system support (former shm fs)
209</pre> 226</pre>
210 227
211<p> 228<p>
212If you are using PPPoE to connect to the Internet or you are using a dial-up 229If you are using PPPoE to connect to the Internet or you are using a dial-up
213modem, you will need the following options in the kernel: 230modem, you will need the following options in the kernel:
214</p> 231</p>
215 232
216<pre caption="Selecting PPPoE necessary drivers"> 233<pre caption="Selecting PPPoE necessary drivers">
217Device Drivers ---&gt; 234Device Drivers ---&gt;
218 Networking Support ---&gt; 235 Networking device Support ---&gt;
219 &lt;*&gt; PPP (point-to-point protocol) support 236 &lt;*&gt; PPP (point-to-point protocol) support
220 &lt;*&gt; PPP support for async serial ports 237 &lt;*&gt; PPP support for async serial ports
221 &lt;*&gt; PPP support for sync tty ports 238 &lt;*&gt; PPP support for sync tty ports
222</pre> 239</pre>
223 240
261those as well: 278those as well:
262</p> 279</p>
263 280
264<pre caption="Activating USB Support for Input Devices"> 281<pre caption="Activating USB Support for Input Devices">
265Device Drivers ---&gt; 282Device Drivers ---&gt;
266 USB Support ---&gt; 283 [*] HID Devices ---&gt;
267 &lt;*&gt; USB Human Interface Device (full HID) support 284 &lt;*&gt; USB Human Interface Device (full HID) support
268</pre> 285</pre>
269 286
270</body> 287</body>
271<body test="func:keyval('arch')='x86'"> 288<body test="func:keyval('arch')='x86'">
274If you want PCMCIA support for your laptop, don't forget to enable 291If you want PCMCIA support for your laptop, don't forget to enable
275support for the PCMCIA card bridge present in your system: 292support for the PCMCIA card bridge present in your system:
276</p> 293</p>
277 294
278<pre caption="Enabling PCMCIA support"> 295<pre caption="Enabling PCMCIA support">
279Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---&gt; 296Bus options (PCI etc.) ---&gt;
280 PCCARD (PCMCIA/CardBus) support ---&gt; 297 PCCARD (PCMCIA/CardBus) support ---&gt;
281 &lt;*&gt; PCCard (PCMCIA/CardBus) support 298 &lt;*&gt; PCCard (PCMCIA/CardBus) support
282<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment> 299<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment>
283 &lt;*&gt; 16-bit PCMCIA support 300 &lt;*&gt; 16-bit PCMCIA support
284 [*] 32-bit CardBus support 301 [*] 32-bit CardBus support
285<comment>(select the relevant bridges below)</comment> 302<comment>(select the relevant bridges below)</comment>
286 --- PC-card bridges 303 *** PC-card bridges ***
287 &lt;*&gt; CardBus yenta-compatible bridge support (NEW) 304 &lt;*&gt; CardBus yenta-compatible bridge support (NEW)
288 &lt;*&gt; Cirrus PD6729 compatible bridge support (NEW) 305 &lt;*&gt; Cirrus PD6729 compatible bridge support (NEW)
289 &lt;*&gt; i82092 compatible bridge support (NEW) 306 &lt;*&gt; i82092 compatible bridge support (NEW)
290 &lt;*&gt; i82365 compatible bridge support (NEW)
291 &lt;*&gt; Databook TCIC host bridge support (NEW)
292</pre> 307</pre>
293 308
294<p> 309<p>
295When you've finished configuring the kernel, continue with <uri 310When you've finished configuring the kernel, continue with <uri
296link="#compiling">Compiling and Installing</uri>. 311link="#compiling">Compiling and Installing</uri>.
297</p> 312</p>
298 313
299</body> 314</body>
300</subsection> 315</subsection>
301<subsection id="compiling"> 316<subsection id="compiling">
302<title>Compiling and Installing</title> 317<title>Compiling and Installing</title>
303<body> 318<body>
304 319
305<p> 320<p>
306Now that your kernel is configured, it is time to compile and install it. Exit 321Now that your kernel is configured, it is time to compile and install it. Exit
307the configuration and start the compilation process: 322the configuration and start the compilation process:
308</p> 323</p>
309 324
310<pre caption="Compiling the kernel"> 325<pre caption="Compiling the kernel">
311# <i>make &amp;&amp; make modules_install</i> 326# <i>make &amp;&amp; make modules_install</i>
338If you are reading this section, you have chosen to use our <c>genkernel</c> 353If you are reading this section, you have chosen to use our <c>genkernel</c>
339script to configure your kernel for you. 354script to configure your kernel for you.
340</p> 355</p>
341 356
342<p> 357<p>
343Now that your kernel source tree is installed, it's now time to compile your 358Now that your kernel source tree is installed, it's now time to compile your
344kernel by using our <c>genkernel</c> script to automatically build a kernel for 359kernel by using our <c>genkernel</c> script to automatically build a kernel for
345you. <c>genkernel</c> works by configuring a kernel nearly identically to the 360you. <c>genkernel</c> works by configuring a kernel nearly identically to the
346way our Installation CD kernel is configured. This means that when you use 361way our Installation CD kernel is configured. This means that when you use
347<c>genkernel</c> to build your kernel, your system will generally detect all 362<c>genkernel</c> to build your kernel, your system will generally detect all
348your hardware at boot-time, just like our Installation CD does. Because 363your hardware at boot-time, just like our Installation CD does. Because
349genkernel doesn't require any manual kernel configuration, it is an ideal 364genkernel doesn't require any manual kernel configuration, it is an ideal
350solution for those users who may not be comfortable compiling their own kernels. 365solution for those users who may not be comfortable compiling their own kernels.
351</p> 366</p>
352 367
353<p> 368<p>
354Now, let's see how to use genkernel. First, emerge the genkernel ebuild: 369Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
356 371
357<pre caption="Emerging genkernel"> 372<pre caption="Emerging genkernel">
358# <i>emerge genkernel</i> 373# <i>emerge genkernel</i>
359</pre> 374</pre>
360 375
361</body>
362<body test="func:keyval('arch')='x86'">
363
364<p> 376<p>
365Next, copy over the kernel configuration used by the Installation CD to the 377Next, copy over the kernel configuration used by the Installation CD to the
366location where genkernel looks for the default kernel configuration: 378location where genkernel looks for the default kernel configuration:
367</p> 379</p>
368 380
369<pre caption="Copying over the Installation CD kernel config"> 381<pre test="func:keyval('arch')='x86'" caption="Copying over the Installation CD kernel config">
370# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i> 382# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/arch/x86/kernel-config</i>
371</pre> 383</pre>
372 384
373</body> 385<pre test="func:keyval('arch')='AMD64'" caption="Copying over the Installation CD kernel config">
374<body> 386# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/arch/x86_64/kernel-config</i>
387</pre>
375 388
376<p> 389<p>
377Now, compile your kernel sources by running <c>genkernel all</c>. Be aware 390Now, compile your kernel sources by running <c>genkernel all</c>. Be aware
378though, as <c>genkernel</c> compiles a kernel that supports almost all 391though, as <c>genkernel</c> compiles a kernel that supports almost all
379hardware, this compilation will take quite a while to finish! 392hardware, this compilation will take quite a while to finish!
380</p> 393</p>
381 394
382<p> 395<p>
383Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you 396Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
384might need to manually configure your kernel using <c>genkernel --menuconfig 397might need to manually configure your kernel using <c>genkernel --menuconfig
385all</c> and add support for your filesystem <e>in</e> the kernel (i.e. 398all</c> and add support for your filesystem <e>in</e> the kernel (i.e.
386<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add 399<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add
387<c>--evms2</c> or <c>--lvm2</c> as argument as well. 400<c>--evms2</c> or <c>--lvm2</c> as arguments as well.
388</p> 401</p>
389 402
390<pre caption="Running genkernel"> 403<pre caption="Running genkernel">
391# <i>genkernel all</i> 404# <i>genkernel all</i>
392</pre> 405</pre>
393 406
394<p> 407<p>
395Once <c>genkernel</c> completes, a kernel, full set of modules and 408Once <c>genkernel</c> completes, a kernel, full set of modules and
396<e>initial root disk</e> (initrd) will be created. We will use the kernel 409<e>initial ram disk</e> (initramfs) will be created. We will use the kernel
397and initrd when configuring a boot loader later in this document. Write 410and initrd when configuring a boot loader later in this document. Write
398down the names of the kernel and initrd as you will need it when writing 411down the names of the kernel and initrd as you will need it when writing
399the bootloader configuration file. The initrd will be started immediately after 412the bootloader configuration file. The initrd will be started immediately after
400booting to perform hardware autodetection (just like on the Installation CD) 413booting to perform hardware autodetection (just like on the Installation CD)
401before your "real" system starts up. 414before your "real" system starts up.
402</p> 415</p>
403 416
404<pre caption="Checking the created kernel image name and initrd"> 417<pre caption="Checking the created kernel image name and initrd">

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

  ViewVC Help
Powered by ViewVC 1.1.20