/[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.3 Revision 1.25
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.3 2006/08/03 12:49:33 rane Exp $ --> 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 $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract>
12The Linux kernel is the core of every distribution. This chapter
13explains how to configure your kernel.
14</abstract>
15
11<version>3.15</version> 16<version>6.3</version>
12<date>2006-08-02</date> 17<date>2008-05-19</date>
13 18
14<section> 19<section>
15<title>Timezone</title> 20<title>Timezone</title>
16<body> 21<body>
17 22
18<p> 23<p>
19You first need to select your timezone so that your system knows where it is 24You first need to select your timezone so that your system knows where it is
20located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy 25located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
21it to <path>/etc/localtime</path>. Please avoid the 26it to <path>/etc/localtime</path>. Please avoid the
22<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not 27<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
23indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8. 28indicate the expected zones. For instance, <path>GMT-8</path> is in fact
29GMT+8.
24</p> 30</p>
25 31
26<pre caption="Setting the timezone information"> 32<pre caption="Setting the timezone information">
27# <i>ls /usr/share/zoneinfo</i> 33# <i>ls /usr/share/zoneinfo</i>
28<comment>(Suppose you want to use GMT)</comment> 34<comment>(Suppose you want to use GMT)</comment>
43users several possible kernel sources. A full listing with description is 49users several possible kernel sources. A full listing with description is
44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 50available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
45Guide</uri>. 51Guide</uri>.
46</p> 52</p>
47 53
48<p test="func:keyval('arch')='x86'">
49For x86-based systems we have, amongst other kernels, <c>vanilla-sources</c>
50(the default kernel source as developed by the linux-kernel developers),
51<c>gentoo-sources</c> (kernel source patched with performance-enhancing
52features), ...
53</p> 54<p>
54 55For <keyval id="arch"/>-based systems we have <c>gentoo-sources</c>
55<p test="func:keyval('arch')='AMD64'"> 56(kernel source patched for extra features).
56For AMD64-based systems we have <c>gentoo-sources</c> (kernel v2.6 source
57patched with amd64 specific fixes for stability, performance and hardware
58support).
59</p>
60
61<p> 57</p>
58
59<p>
62Choose your kernel source and install it using <c>emerge</c>. The 60Choose your kernel source and install it using <c>emerge</c>.
63<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
64dependencies at this point. <c>USE="symlink"</c> is not necessary for a new
65install, but ensures proper creation of the <path>/usr/src/linux</path>
66symlink.
67</p> 61</p>
68 62
69<pre caption="Installing a kernel source"> 63<pre caption="Installing a kernel source">
70# <i>USE="-doc symlink" emerge gentoo-sources</i> 64# <i>emerge gentoo-sources</i>
71</pre> 65</pre>
72 66
73<p> 67<p>
74When you take a look in <path>/usr/src</path> you should see a symlink called 68When you take a look in <path>/usr/src</path> you should see a symlink called
75<path>linux</path> pointing to your kernel source. In this case, the installed 69<path>linux</path> pointing to your kernel source. In this case, the installed
144<subsection> 138<subsection>
145<title>Activating Required Options</title> 139<title>Activating Required Options</title>
146<body> 140<body>
147 141
148<p> 142<p>
149First of all, activate the use of development and experimental code/drivers.
150You need this, otherwise some very important code/drivers won't show up:
151</p>
152
153<pre caption="Selecting experimental code/drivers">
154Code maturity level options ---&gt;
155 [*] Prompt for development and/or incomplete code/drivers
156</pre>
157
158<p>
159Make 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
160SCSI 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,
161otherwise your system will not be able to boot completely. 145otherwise your system will not be able to boot completely.
162</p> 146</p>
163 147
167<p> 151<p>
168We 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
169strongly 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
170notified 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
171<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
172requires 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 you probably
159want this option.
173</p> 160</p>
174 161
175<pre caption="Selecting processor type and features"> 162<pre caption="Selecting processor type and features">
176Processor type and features ---> 163Processor type and features --->
177 [ ] Intel MCE Features 164 [ ] Intel MCE Features
178 [ ] AMD MCE Features 165 [ ] AMD MCE Features
179 Processor family (AMD-Opteron/Athlon64) ---> 166 Processor family (AMD-Opteron/Athlon64) --->
180 ( ) AMD-Opteron/Athlon64 167 ( ) AMD-Opteron/Athlon64
181 ( ) Intel EM64T 168 ( ) Intel EM64T
182 ( ) Generic-x86-64 169 ( ) Generic-x86-64
170Executable file formats / Emulations --->
171 [*] IA32 Emulation
183</pre> 172</pre>
184 173
185</body> 174</body>
186<body test="func:keyval('arch')='x86'"> 175<body test="func:keyval('arch')='x86'">
187 176
203<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 192<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
204able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc 193able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
205file system</c>. 194file system</c>.
206</p> 195</p>
207 196
208</body>
209<body test="func:keyval('arch')='x86'">
210
211<p>
212If you are using a 2.4 kernel, you need to select <c>/dev file
213system</c> as 2.4 kernels do not support <c>udev</c>.
214</p>
215
216<pre caption="Selecting necessary file systems"> 197<pre caption="Selecting necessary file systems">
217<comment>(With a 2.4.x kernel)</comment>
218File systems ---&gt;
219 [*] Virtual memory file system support (former shm fs)
220 [*] /proc file system support
221 [*] /dev file system support (EXPERIMENTAL)
222 [*] automatically mount /dev at boot
223 [ ] /dev/pts file system for Unix98 PTYs
224
225<comment>(With a 2.6.x kernel)</comment>
226File systems ---&gt; 198File systems ---&gt;
227 Pseudo Filesystems ---&gt; 199 Pseudo Filesystems ---&gt;
228 [*] /proc file system support 200 [*] /proc file system support
229 [*] Virtual memory file system support (former shm fs) 201 [*] Virtual memory file system support (former shm fs)
230 202
235 &lt;*&gt; Second extended fs support 207 &lt;*&gt; Second extended fs support
236 &lt;*&gt; XFS filesystem support 208 &lt;*&gt; XFS filesystem support
237</pre> 209</pre>
238 210
239<p> 211<p>
240If your BIOS can't handle large hard drives and you jumpered the hard drive to
241report a limited size you have to enable the following option to gain access to
242your whole hard drive:
243</p>
244
245<pre caption="Selecting autogeometry resizing support">
246<comment>(2.4.x kernel only)</comment>
247ATA/IDE/MFM/RLL support ---&gt;
248 IDE, ATA and ATAPI Block devices ---&gt;
249 &lt;*&gt; Include IDE/ATA-2 DISK support
250 [ ] Use multi-mode by default
251 [*] Auto-Geometry Resizing support
252</pre>
253
254</body>
255<body test="func:keyval('arch')='AMD64'">
256
257<pre caption="Selecting necessary file systems">
258File systems ---&gt;
259 Pseudo Filesystems ---&gt;
260 [*] /proc file system support
261 [*] Virtual memory file system support (former shm fs)
262
263<comment>(Select one or more of the following options as needed by your system)</comment>
264 &lt;*&gt; Reiserfs support
265 &lt;*&gt; Ext3 journalling file system support
266 &lt;*&gt; JFS filesystem support
267 &lt;*&gt; Second extended fs support
268 &lt;*&gt; XFS filesystem support
269</pre>
270
271</body>
272<body>
273
274<p>
275Do not forget to enable DMA for your drives:
276</p>
277
278<pre caption="Activating DMA">
279Device Drivers ---&gt;
280 ATA/ATAPI/MFM/RLL support ---&gt;
281 [*] Generic PCI bus-master DMA support
282 [*] Use PCI DMA by default when available
283</pre>
284
285<p>
286If you are using PPPoE to connect to the Internet or you are using a dial-up 212If you are using PPPoE to connect to the Internet or you are using a dial-up
287modem, you will need the following options in the kernel: 213modem, you will need the following options in the kernel:
288</p> 214</p>
289 215
290<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='AMD64'"> 216<pre caption="Selecting PPPoE necessary drivers">
291Device Drivers ---&gt; 217Device Drivers ---&gt;
292 Networking Support ---&gt; 218 Networking Support ---&gt;
293 &lt;*&gt; PPP (point-to-point protocol) support 219 &lt;*&gt; PPP (point-to-point protocol) support
294 &lt;*&gt; PPP support for async serial ports 220 &lt;*&gt; PPP support for async serial ports
295 &lt;*&gt; PPP support for sync tty ports 221 &lt;*&gt; PPP support for sync tty ports
296</pre> 222</pre>
297 223
298<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='x86'">
299<comment>(With a 2.4.x kernel)</comment>
300Network device support ---&gt;
301 &lt;*&gt; PPP (point-to-point protocol) support
302 &lt;*&gt; PPP support for async serial ports
303 &lt;*&gt; PPP support for sync tty ports
304
305<comment>(With a 2.6.x kernel)</comment>
306Device Drivers ---&gt;
307 Networking support ---&gt;
308 &lt;*&gt; PPP (point-to-point protocol) support
309 &lt;*&gt; PPP support for async serial ports
310 &lt;*&gt; PPP support for sync tty ports
311</pre>
312
313<p> 224<p>
314The two compression options won't harm but are not definitely needed, neither 225The two compression options won't harm but are not definitely needed, neither
315does the <c>PPP over Ethernet</c> option, that might only be used by 226does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
316<c>rp-pppoe</c> when configured to do kernel mode PPPoE. 227when configured to do kernel mode PPPoE.
317</p> 228</p>
318 229
319<p> 230<p>
320If you require it, don't forget to include support in the kernel for your 231If you require it, don't forget to include support in the kernel for your
321ethernet card. 232ethernet card.
337</pre> 248</pre>
338 249
339<note> 250<note>
340In multi-core systems, each core counts as one processor. 251In multi-core systems, each core counts as one processor.
341</note> 252</note>
253
254<p test="func:keyval('arch')='x86'">
255If you have more than 4GB of RAM, you need to enable "High Memory Support
256(64G)".
257</p>
342 258
343<p> 259<p>
344If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable 260If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
345those as well: 261those as well:
346</p> 262</p>
353 269
354</body> 270</body>
355<body test="func:keyval('arch')='x86'"> 271<body test="func:keyval('arch')='x86'">
356 272
357<p> 273<p>
358Laptop-users who want PCMCIA support should <e>not</e> use the PCMCIA drivers if 274If you want PCMCIA support for your laptop, don't forget to enable
359they choose to use a 2.4 kernel. More recent drivers are available through the
360<c>pcmcia-cs</c> package which will be installed later on. 2.6-kernel users
361however should use the PCMCIA drivers from the kernel.
362</p>
363
364<p>
365Besides compiling in PCMCIA support in the 2.6 kernel, don't forget to enable
366support for the PCMCIA card bridge present in your system: 275support for the PCMCIA card bridge present in your system:
367</p> 276</p>
368 277
369<pre caption="Enabling PCMCIA support for 2.6 kernels"> 278<pre caption="Enabling PCMCIA support">
370Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---&gt; 279Bus options (PCI, PCMCIA, EISA, MCA, ISA) ---&gt;
371 PCCARD (PCMCIA/CardBus) support ---&gt; 280 PCCARD (PCMCIA/CardBus) support ---&gt;
372 &lt;*&gt; PCCard (PCMCIA/CardBus) support 281 &lt;*&gt; PCCard (PCMCIA/CardBus) support
373<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment> 282<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment>
374 &lt;*&gt; 16-bit PCMCIA support 283 &lt;*&gt; 16-bit PCMCIA support
396<p> 305<p>
397Now that your kernel is configured, it is time to compile and install it. Exit 306Now that your kernel is configured, it is time to compile and install it. Exit
398the configuration and start the compilation process: 307the configuration and start the compilation process:
399</p> 308</p>
400 309
401<pre caption="Compiling the kernel" test="func:keyval('arch')='x86'"> 310<pre caption="Compiling the kernel">
402<comment>(For 2.4 kernel)</comment>
403# <i>make dep &amp;&amp; make bzImage modules modules_install</i>
404
405<comment>(For 2.6 kernel)</comment>
406# <i>make &amp;&amp; make modules_install</i>
407</pre>
408
409<pre caption="Compiling the kernel" test="func:keyval('arch')='AMD64'">
410# <i>make &amp;&amp; make modules_install</i> 311# <i>make &amp;&amp; make modules_install</i>
411</pre> 312</pre>
412 313
413<p> 314<p>
414When the kernel has finished compiling, copy the kernel image to 315When the kernel has finished compiling, copy the kernel image to
419</p> 320</p>
420 321
421<pre caption="Installing the kernel"> 322<pre caption="Installing the kernel">
422# <i>cp arch/<keyval id="arch-sub"/>/boot/bzImage /boot/<keyval id="kernel-name"/></i> 323# <i>cp arch/<keyval id="arch-sub"/>/boot/bzImage /boot/<keyval id="kernel-name"/></i>
423</pre> 324</pre>
325
326<p>
327Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
328</p>
424 329
425</body> 330</body>
426</subsection> 331</subsection>
427</section> 332</section>
428<section id="genkernel"> 333<section id="genkernel">
455 360
456</body> 361</body>
457<body test="func:keyval('arch')='x86'"> 362<body test="func:keyval('arch')='x86'">
458 363
459<p> 364<p>
460Next, if you are going to configure a 2.6 kernel, copy over the kernel 365Next, copy over the kernel configuration used by the Installation CD to the
461configuration used by the Installation CD to the location where genkernel
462looks for the default kernel configuration: 366location where genkernel looks for the default kernel configuration:
463</p> 367</p>
464 368
465<pre caption="Copying over the Installation CD kernel config"> 369<pre caption="Copying over the Installation CD kernel config">
466<comment>(Only do this if you are going to configure a 2.6 kernel)</comment>
467# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i> 370# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i>
468</pre> 371</pre>
469 372
470</body> 373</body>
471<body> 374<body>
500 403
501<pre caption="Checking the created kernel image name and initrd"> 404<pre caption="Checking the created kernel image name and initrd">
502# <i>ls /boot/kernel* /boot/initramfs*</i> 405# <i>ls /boot/kernel* /boot/initramfs*</i>
503</pre> 406</pre>
504 407
505<p>
506Now, let's perform one more step to get our system to be more like the
507Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects
508hardware that is needed to boot your system, <c>coldplug</c> autodetects
509everything else. To emerge and enable <c>coldplug</c>, type the following:
510</p>
511
512<pre caption="Emerging and enabling coldplug">
513# <i>emerge coldplug</i>
514# <i>rc-update add coldplug boot</i>
515</pre>
516
517</body> 408</body>
518</section> 409</section>
519<section id="kernel_modules"> 410<section id="kernel_modules">
520<title>Kernel Modules</title> 411<title>Kernel Modules</title>
412
521<subsection> 413<subsection>
522<title>Configuring the Modules</title> 414<include href="hb-install-kernelmodules.xml"/>
523<body>
524
525<note test="func:keyval('arch')='x86'">
526If you chose a kernel 2.4, replace occurrences of <c>2.6</c> with <c>2.4</c> in
527this section.
528</note>
529
530<p>
531You should list the modules you want automatically loaded in
532<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
533the modules too if you want.
534</p>
535
536<p>
537To view all available modules, run the following <c>find</c> command. Don't
538forget to substitute <c><keyval id="kernel-version"/></c> with the version of
539the kernel you just compiled:
540</p>
541
542<pre caption="Viewing all available modules">
543# <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
544</pre>
545
546<p>
547For instance, to automatically load the <c>3c59x.o</c> module, edit the
548<path>kernel-2.6</path> file and enter the module name in it.
549</p>
550
551<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
552# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
553</pre>
554
555<pre caption="/etc/modules.autoload.d/kernel-2.6">
5563c59x
557</pre>
558
559<p>
560Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
561your System</uri>.
562</p>
563
564</body>
565</subsection> 415</subsection>
416
566</section> 417</section>
567</sections> 418</sections>

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

  ViewVC Help
Powered by ViewVC 1.1.20