/[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.11 Revision 1.37
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.11 2007/05/15 13:07:41 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml,v 1.37 2011/08/12 19:05:02 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>5.1</version> 16<version>9</version>
17<date>2007-05-15</date> 17<date>2011-08-12</date>
18 18
19<section> 19<section>
20<title>Timezone</title> 20<title>Timezone</title>
21<body> 21<body>
22 22
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 test="func:keyval('arch')='x86'">
55For x86-based systems we have, amongst other kernels, <c>gentoo-sources</c>
56(kernel source patched with performance-enhancing features).
57</p> 54<p>
58 55For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c>
59<p test="func:keyval('arch')='AMD64'"> 56(kernel source patched for extra features).
60For AMD64-based systems we have <c>gentoo-sources</c> (kernel source patched
61with amd64 specific fixes for stability, performance and hardware support).
62</p> 57</p>
63 58
64<p> 59<p>
65Choose your kernel source and install it using <c>emerge</c>. 60Choose your kernel source and install it using <c>emerge</c>.
66</p> 61</p>
143<subsection> 138<subsection>
144<title>Activating Required Options</title> 139<title>Activating Required Options</title>
145<body> 140<body>
146 141
147<p> 142<p>
148First of all, activate the use of development and experimental code/drivers.
149You need this, otherwise some very important code/drivers won't show up:
150</p>
151
152<pre caption="Selecting experimental code/drivers">
153Code maturity level options ---&gt;
154 [*] Prompt for development and/or incomplete code/drivers
155</pre>
156
157<p>
158Make sure that every driver that is vital to the booting of your system (such as 143Make sure that every driver that is vital to the booting of your system (such as
159SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module, 144SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module,
160otherwise your system will not be able to boot completely. 145otherwise your system will not be able to boot completely.
161</p> 146</p>
162 147
166<p> 151<p>
167We shall then select the exact processor type. The x86_64 kernel maintainer 152We shall then select the exact processor type. The x86_64 kernel maintainer
168strongly 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
169notified 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
170<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
171requires the <c>app-admin/mcelog</c> package. 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
158multilib system (mixed 32-bit/64-bit computing) by default, so this option is
159required.
172</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>
173 170
174<pre caption="Selecting processor type and features"> 171<pre caption="Selecting processor type and features">
175Processor type and features ---> 172Processor type and features --->
173 [ ] Machine Check / overheating reporting
176 [ ] Intel MCE Features 174 [ ] Intel MCE Features
177 [ ] AMD MCE Features 175 [ ] AMD MCE Features
178 Processor family (AMD-Opteron/Athlon64) ---> 176 Processor family (AMD-Opteron/Athlon64) --->
179 ( ) AMD-Opteron/Athlon64 177 ( ) Opteron/Athlon64/Hammer/K8
178 ( ) Intel P4 / older Netburst based Xeon
179 ( ) Core 2/newer Xeon
180 ( ) Intel EM64T 180 ( ) Intel Atom
181 ( ) Generic-x86-64 181 ( ) Generic-x86-64
182Executable file formats / Emulations --->
183 [*] IA32 Emulation
182</pre> 184</pre>
183 185
184</body> 186</body>
185<body test="func:keyval('arch')='x86'"> 187<body test="func:keyval('arch')='x86'">
186 188
201Now go to <c>File Systems</c> and select support for the filesystems you use. 203Now go to <c>File Systems</c> and select support for the filesystems you use.
202<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 204<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
203able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc 205able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
204file system</c>. 206file system</c>.
205</p> 207</p>
206
207</body>
208<body test="func:keyval('arch')='x86'">
209 208
210<pre caption="Selecting necessary file systems"> 209<pre caption="Selecting necessary file systems">
211File systems ---&gt; 210File systems ---&gt;
212 Pseudo Filesystems ---&gt; 211 Pseudo Filesystems ---&gt;
213 [*] /proc file system support 212 [*] /proc file system support
219 &lt;*&gt; JFS filesystem support 218 &lt;*&gt; JFS filesystem support
220 &lt;*&gt; Second extended fs support 219 &lt;*&gt; Second extended fs support
221 &lt;*&gt; XFS filesystem support 220 &lt;*&gt; XFS filesystem support
222</pre> 221</pre>
223 222
224</body>
225<body test="func:keyval('arch')='AMD64'">
226
227<pre caption="Selecting necessary file systems">
228File systems ---&gt;
229 Pseudo Filesystems ---&gt;
230 [*] /proc file system support
231 [*] Virtual memory file system support (former shm fs)
232
233<comment>(Select one or more of the following options as needed by your system)</comment>
234 &lt;*&gt; Reiserfs support
235 &lt;*&gt; Ext3 journalling file system support
236 &lt;*&gt; JFS filesystem support
237 &lt;*&gt; Second extended fs support
238 &lt;*&gt; XFS filesystem support
239</pre>
240
241</body>
242<body>
243
244<p>
245Do not forget to enable DMA for your drives:
246</p>
247
248<pre caption="Activating DMA">
249Device Drivers ---&gt;
250 ATA/ATAPI/MFM/RLL support ---&gt;
251 [*] Generic PCI bus-master DMA support
252 [*] Use PCI DMA by default when available
253</pre>
254
255<p> 223<p>
256If you are using PPPoE to connect to the Internet or you are using a dial-up 224If you are using PPPoE to connect to the Internet or you are using a dial-up
257modem, you will need the following options in the kernel: 225modem, you will need the following options in the kernel:
258</p> 226</p>
259 227
260<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='AMD64'"> 228<pre caption="Selecting PPPoE necessary drivers">
261Device Drivers ---&gt; 229Device Drivers ---&gt;
262 Networking Support ---&gt; 230 Networking Support ---&gt;
263 &lt;*&gt; PPP (point-to-point protocol) support 231 &lt;*&gt; PPP (point-to-point protocol) support
264 &lt;*&gt; PPP support for async serial ports 232 &lt;*&gt; PPP support for async serial ports
265 &lt;*&gt; PPP support for sync tty ports 233 &lt;*&gt; PPP support for sync tty ports
266</pre> 234</pre>
267 235
268<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='x86'">
269Device Drivers ---&gt;
270 Networking support ---&gt;
271 &lt;*&gt; PPP (point-to-point protocol) support
272 &lt;*&gt; PPP support for async serial ports
273 &lt;*&gt; PPP support for sync tty ports
274</pre>
275
276<p> 236<p>
277The two compression options won't harm but are not definitely needed, neither 237The two compression options won't harm but are not definitely needed, neither
278does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c> 238does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
279when configured to do kernel mode PPPoE. 239when configured to do kernel mode PPPoE.
280</p> 240</p>
301 261
302<note> 262<note>
303In multi-core systems, each core counts as one processor. 263In multi-core systems, each core counts as one processor.
304</note> 264</note>
305 265
266<p test="func:keyval('arch')='x86'">
267If you have more than 4GB of RAM, you need to enable "High Memory Support
268(64G)".
269</p>
270
306<p> 271<p>
307If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable 272If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
308those as well: 273those as well:
309</p> 274</p>
310 275
311<pre caption="Activating USB Support for Input Devices"> 276<pre caption="Activating USB Support for Input Devices">
312Device Drivers ---&gt; 277Device Drivers ---&gt;
313 USB Support ---&gt; 278 [*] HID Devices ---&gt;
314 &lt;*&gt; USB Human Interface Device (full HID) support 279 &lt;*&gt; USB Human Interface Device (full HID) support
315</pre> 280</pre>
316 281
317</body> 282</body>
318<body test="func:keyval('arch')='x86'"> 283<body test="func:keyval('arch')='x86'">
403 368
404<pre caption="Emerging genkernel"> 369<pre caption="Emerging genkernel">
405# <i>emerge genkernel</i> 370# <i>emerge genkernel</i>
406</pre> 371</pre>
407 372
408</body>
409<body test="func:keyval('arch')='x86'">
410
411<p> 373<p>
412Next, copy over the kernel configuration used by the Installation CD to the 374Next, copy over the kernel configuration used by the Installation CD to the
413location where genkernel looks for the default kernel configuration: 375location where genkernel looks for the default kernel configuration:
414</p> 376</p>
415 377
416<pre caption="Copying over the Installation CD kernel config"> 378<pre test="func:keyval('arch')='x86'" caption="Copying over the Installation CD kernel config">
417# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i> 379# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/arch/x86/kernel-config</i>
418</pre> 380</pre>
419 381
420</body> 382<pre test="func:keyval('arch')='AMD64'" caption="Copying over the Installation CD kernel config">
421<body> 383# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/arch/x86_64/kernel-config</i>
384</pre>
422 385
423<p> 386<p>
424Now, compile your kernel sources by running <c>genkernel all</c>. Be aware 387Now, compile your kernel sources by running <c>genkernel all</c>. Be aware
425though, as <c>genkernel</c> compiles a kernel that supports almost all 388though, as <c>genkernel</c> compiles a kernel that supports almost all
426hardware, this compilation will take quite a while to finish! 389hardware, this compilation will take quite a while to finish!
429<p> 392<p>
430Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you 393Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
431might need to manually configure your kernel using <c>genkernel --menuconfig 394might need to manually configure your kernel using <c>genkernel --menuconfig
432all</c> and add support for your filesystem <e>in</e> the kernel (i.e. 395all</c> and add support for your filesystem <e>in</e> the kernel (i.e.
433<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add 396<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add
434<c>--evms2</c> or <c>--lvm2</c> as argument as well. 397<c>--evms2</c> or <c>--lvm2</c> as arguments as well.
435</p> 398</p>
436 399
437<pre caption="Running genkernel"> 400<pre caption="Running genkernel">
438# <i>genkernel all</i> 401# <i>genkernel all</i>
439</pre> 402</pre>
440 403
441<p> 404<p>
442Once <c>genkernel</c> completes, a kernel, full set of modules and 405Once <c>genkernel</c> completes, a kernel, full set of modules and
443<e>initial root disk</e> (initrd) will be created. We will use the kernel 406<e>initial ram disk</e> (initramfs) will be created. We will use the kernel
444and initrd when configuring a boot loader later in this document. Write 407and initrd when configuring a boot loader later in this document. Write
445down the names of the kernel and initrd as you will need it when writing 408down the names of the kernel and initrd as you will need it when writing
446the bootloader configuration file. The initrd will be started immediately after 409the bootloader configuration file. The initrd will be started immediately after
447booting to perform hardware autodetection (just like on the Installation CD) 410booting to perform hardware autodetection (just like on the Installation CD)
448before your "real" system starts up. 411before your "real" system starts up.
454 417
455</body> 418</body>
456</section> 419</section>
457<section id="kernel_modules"> 420<section id="kernel_modules">
458<title>Kernel Modules</title> 421<title>Kernel Modules</title>
422
459<subsection> 423<subsection>
460<title>Configuring the Modules</title> 424<include href="hb-install-kernelmodules.xml"/>
461<body>
462
463<p>
464You should list the modules you want automatically loaded in
465<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
466the modules too if you want.
467</p>
468
469<p>
470To view all available modules, run the following <c>find</c> command. Don't
471forget to substitute <c><keyval id="kernel-version"/></c> with the version of
472the kernel you just compiled:
473</p>
474
475<pre caption="Viewing all available modules">
476# <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
477</pre>
478
479<p>
480For instance, to automatically load the <c>3c59x.o</c> module, edit the
481<path>kernel-2.6</path> file and enter the module name in it.
482</p>
483
484<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
485# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
486</pre>
487
488<pre caption="/etc/modules.autoload.d/kernel-2.6">
4893c59x
490</pre>
491
492<p>
493Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
494your System</uri>.
495</p>
496
497</body>
498</subsection> 425</subsection>
426
499</section> 427</section>
500</sections> 428</sections>

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20