/[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.1 Revision 1.2
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.1 2006/08/02 21:15:02 neysx Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-x86+amd64-kernel.xml,v 1.2 2006/08/02 21:15:52 neysx Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>3.13</version> 11<version>3.14</version>
12<date>2006-07-20</date> 12<date>2006-07-26</date>
13 13
14<section> 14<section>
15<title>Timezone</title> 15<title>Timezone</title>
16<body> 16<body>
17 17
43users several possible kernel sources. A full listing with description is 43users several possible kernel sources. A full listing with description is
44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel 44available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
45Guide</uri>. 45Guide</uri>.
46</p> 46</p>
47 47
48<p> 48<p test="func:keyval('arch')='x86'">
49For x86-based systems we have, amongst other kernels, <c>vanilla-sources</c> 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), 50(the default kernel source as developed by the linux-kernel developers),
51<c>gentoo-sources</c> (kernel source patched with performance-enhancing 51<c>gentoo-sources</c> (kernel source patched with performance-enhancing
52features), ... 52features), ...
53</p>
54
55<p test="func:keyval('arch')='AMD64'">
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).
53</p> 59</p>
54 60
55<p> 61<p>
56Choose your kernel source and install it using <c>emerge</c>. The 62Choose your kernel source and install it using <c>emerge</c>. The
57<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other 63<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
65</pre> 71</pre>
66 72
67<p> 73<p>
68When you take a look in <path>/usr/src</path> you should see a symlink called 74When you take a look in <path>/usr/src</path> you should see a symlink called
69<path>linux</path> pointing to your kernel source. In this case, the installed 75<path>linux</path> pointing to your kernel source. In this case, the installed
70kernel source points to <c>gentoo-sources-2.6.12-r10</c>. Your version may be 76kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
71different, so keep this in mind. 77Your version may be different, so keep this in mind.
72</p> 78</p>
73 79
74<pre caption="Viewing the kernel source symlink"> 80<pre caption="Viewing the kernel source symlink">
75# <i>ls -l /usr/src/linux</i> 81# <i>ls -l /usr/src/linux</i>
76lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.12-gentoo-r10 82lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
77</pre> 83</pre>
78 84
79<p> 85<p>
80Now it is time to configure and compile your kernel source. You 86Now it is time to configure and compile your kernel source. You can use
81can use <c>genkernel</c> for this, which will build a generic kernel as used 87<c>genkernel</c> for this, which will build a generic kernel as used by the
82by the Installation CD. We explain the "manual" configuration first though, as 88Installation CD. We explain the "manual" configuration first though, as it is
83it is the best way to optimize your environment. 89the best way to optimize your environment.
84</p> 90</p>
85 91
86<p> 92<p>
87If you want to manually configure your kernel, continue now with <uri 93If you want to manually configure your kernel, continue now with <uri
88link="#manual">Default: Manual Configuration</uri>. If you want to use 94link="#manual">Default: Manual Configuration</uri>. If you want to use
142<p> 148<p>
143First of all, activate the use of development and experimental code/drivers. 149First of all, activate the use of development and experimental code/drivers.
144You need this, otherwise some very important code/drivers won't show up: 150You need this, otherwise some very important code/drivers won't show up:
145</p> 151</p>
146 152
147<pre caption="Selecting experimental code/drivers, General setup"> 153<pre caption="Selecting experimental code/drivers">
148Code maturity level options ---&gt; 154Code maturity level options ---&gt;
149 [*] Prompt for development and/or incomplete code/drivers 155 [*] Prompt for development and/or incomplete code/drivers
150</pre> 156</pre>
151 157
152<p> 158<p>
153Make sure that every driver that is vital to the booting of your system (such as 159Make sure that every driver that is vital to the booting of your system (such as
154SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module, 160SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module,
155otherwise your system will not be able to boot completely. 161otherwise your system will not be able to boot completely.
156</p> 162</p>
163
164</body>
165<body test="func:keyval('arch')='AMD64'">
166
167<p>
168We 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
170notified 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
172requires the <c>app-admin/mcelog</c> package.
173</p>
174
175<pre caption="Selecting processor type and features">
176Processor type and features --->
177 [ ] Intel MCE Features
178 [ ] AMD MCE Features
179 Processor family (AMD-Opteron/Athlon64) --->
180 ( ) AMD-Opteron/Athlon64
181 ( ) Intel EM64T
182 ( ) Generic-x86-64
183</pre>
184
185</body>
186<body test="func:keyval('arch')='x86'">
157 187
158<p> 188<p>
159Now select the correct processor family: 189Now select the correct processor family:
160</p> 190</p>
161 191
163Processor type and features ---&gt; 193Processor type and features ---&gt;
164 <comment>(Change according to your system)</comment> 194 <comment>(Change according to your system)</comment>
165 (<i>Athlon/Duron/K7</i>) Processor family 195 (<i>Athlon/Duron/K7</i>) Processor family
166</pre> 196</pre>
167 197
198</body>
199<body>
200
168<p> 201<p>
169Now go to <c>File Systems</c> and select support for the filesystems you use. 202Now go to <c>File Systems</c> and select support for the filesystems you use.
170<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be 203<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
171able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc 204able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
205file system</c>.
206</p>
207
208</body>
209<body test="func:keyval('arch')='x86'">
210
211<p>
172file system</c>. If you are using a 2.4 kernel, you need to select <c>/dev file 212If you are using a 2.4 kernel, you need to select <c>/dev file
173system</c> as 2.4 kernels do not support <c>udev</c>. 213system</c> as 2.4 kernels do not support <c>udev</c>.
174</p> 214</p>
175 215
176<pre caption="Selecting necessary file systems"> 216<pre caption="Selecting necessary file systems">
177<comment>(With a 2.4.x kernel)</comment> 217<comment>(With a 2.4.x kernel)</comment>
195 &lt;*&gt; Second extended fs support 235 &lt;*&gt; Second extended fs support
196 &lt;*&gt; XFS filesystem support 236 &lt;*&gt; XFS filesystem support
197</pre> 237</pre>
198 238
199<p> 239<p>
200If your BIOS can't handle large harddrives and you jumpered the harddrive to 240If your BIOS can't handle large hard drives and you jumpered the hard drive to
201report a limited size you have to enable the following option to gain access 241report a limited size you have to enable the following option to gain access to
202to your whole harddrive: 242your whole hard drive:
203</p> 243</p>
204 244
205<pre caption="Selecting autogeometry resizing support"> 245<pre caption="Selecting autogeometry resizing support">
206<comment>(2.4.x kernel only)</comment> 246<comment>(2.4.x kernel only)</comment>
207ATA/IDE/MFM/RLL support ---&gt; 247ATA/IDE/MFM/RLL support ---&gt;
209 &lt;*&gt; Include IDE/ATA-2 DISK support 249 &lt;*&gt; Include IDE/ATA-2 DISK support
210 [ ] Use multi-mode by default 250 [ ] Use multi-mode by default
211 [*] Auto-Geometry Resizing support 251 [*] Auto-Geometry Resizing support
212</pre> 252</pre>
213 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
214<p> 274<p>
215Do not forget to enable DMA for your drives: 275Do not forget to enable DMA for your drives:
216</p> 276</p>
217 277
218<pre caption="Activating DMA"> 278<pre caption="Activating DMA">
225<p> 285<p>
226If you are using PPPoE to connect to the Internet or you are using a dial-up 286If you are using PPPoE to connect to the Internet or you are using a dial-up
227modem, you will need the following options in the kernel: 287modem, you will need the following options in the kernel:
228</p> 288</p>
229 289
230<pre caption="Selecting PPPoE necessary drivers"> 290<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='AMD64'">
291Device Drivers ---&gt;
292 Networking Support ---&gt;
293 &lt;*&gt; PPP (point-to-point protocol) support
294 &lt;*&gt; PPP support for async serial ports
295 &lt;*&gt; PPP support for sync tty ports
296</pre>
297
298<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='x86'">
231<comment>(With a 2.4.x kernel)</comment> 299<comment>(With a 2.4.x kernel)</comment>
232Network device support ---&gt; 300Network device support ---&gt;
233 &lt;*&gt; PPP (point-to-point protocol) support 301 &lt;*&gt; PPP (point-to-point protocol) support
234 &lt;*&gt; PPP support for async serial ports 302 &lt;*&gt; PPP support for async serial ports
235 &lt;*&gt; PPP support for sync tty ports 303 &lt;*&gt; PPP support for sync tty ports
251<p> 319<p>
252If you require it, don't forget to include support in the kernel for your 320If you require it, don't forget to include support in the kernel for your
253ethernet card. 321ethernet card.
254</p> 322</p>
255 323
256<p> 324<p test="func:keyval('arch')='x86'">
257If you have an Intel CPU that supports HyperThreading (tm), or you have a 325If you have an Intel CPU that supports HyperThreading (tm), or you have a
258multi-CPU system, you should activate "Symmetric multi-processing support": 326multi-CPU system, you should activate "Symmetric multi-processing support":
327</p>
328
329<p test="func:keyval('arch')='AMD64'">
330If you have a multi-CPU Opteron or a multi-core (e.g. AMD64 X2) system, you
331should activate "Symmetric multi-processing support":
259</p> 332</p>
260 333
261<pre caption="Activating SMP support"> 334<pre caption="Activating SMP support">
262Processor type and features ---&gt; 335Processor type and features ---&gt;
263 [*] Symmetric multi-processing support 336 [*] Symmetric multi-processing support
271If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable 344If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
272those as well: 345those as well:
273</p> 346</p>
274 347
275<pre caption="Activating USB Support for Input Devices"> 348<pre caption="Activating USB Support for Input Devices">
349Device Drivers ---&gt;
276USB Support ---&gt; 350 USB Support ---&gt;
277 &lt;*&gt; USB Human Interface Device (full HID) support 351 &lt;*&gt; USB Human Interface Device (full HID) support
278</pre> 352</pre>
353
354</body>
355<body test="func:keyval('arch')='x86'">
279 356
280<p> 357<p>
281Laptop-users who want PCMCIA support should <e>not</e> use the PCMCIA drivers if 358Laptop-users who want PCMCIA support should <e>not</e> use the PCMCIA drivers if
282they choose to use a 2.4 kernel. More recent drivers are available through the 359they choose to use a 2.4 kernel. More recent drivers are available through the
283<c>pcmcia-cs</c> package which will be installed later on. 2.6-kernel users 360<c>pcmcia-cs</c> package which will be installed later on. 2.6-kernel users
319<p> 396<p>
320Now that your kernel is configured, it is time to compile and install it. Exit 397Now that your kernel is configured, it is time to compile and install it. Exit
321the configuration and start the compilation process: 398the configuration and start the compilation process:
322</p> 399</p>
323 400
324<pre caption="Compiling the kernel"> 401<pre caption="Compiling the kernel" test="func:keyval('arch')='x86'">
325<comment>(For 2.4 kernel)</comment> 402<comment>(For 2.4 kernel)</comment>
326# <i>make dep &amp;&amp; make bzImage modules modules_install</i> 403# <i>make dep &amp;&amp; make bzImage modules modules_install</i>
327 404
328<comment>(For 2.6 kernel)</comment> 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'">
329# <i>make &amp;&amp; make modules_install</i> 410# <i>make &amp;&amp; make modules_install</i>
330</pre> 411</pre>
331 412
332<p> 413<p>
333When the kernel has finished compiling, copy the kernel image to 414When the kernel has finished compiling, copy the kernel image to
334<path>/boot</path>. Use whatever name you feel is appropriate for your kernel 415<path>/boot</path>. Use whatever name you feel is appropriate for your kernel
335choice and remember it as you will need it later on when you configure your 416choice and remember it as you will need it later on when you configure your
336bootloader. Remember to replace <path>&lt;kernel-version&gt;</path> with the name and 417bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
337version of your kernel. 418name and version of your kernel.
338</p> 419</p>
339 420
340<pre caption="Installing the kernel"> 421<pre caption="Installing the kernel">
341# <i>cp arch/i386/boot/bzImage /boot/&lt;kernel-version&gt;</i> 422# <i>cp arch/<keyval id="arch-sub"/>/boot/bzImage /boot/<keyval id="kernel-name"/></i>
342</pre> 423</pre>
343 424
344<p> 425<p>
345Now continue with <uri link="#kernel_modules">Kernel Modules</uri>. 426Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
346</p> 427</p>
374 455
375<pre caption="Emerging genkernel"> 456<pre caption="Emerging genkernel">
376# <i>emerge genkernel</i> 457# <i>emerge genkernel</i>
377</pre> 458</pre>
378 459
460</body>
461<body test="func:keyval('arch')='x86'">
462
379<p> 463<p>
380Next, if you are going to configure a 2.6 kernel, copy over the kernel 464Next, if you are going to configure a 2.6 kernel, copy over the kernel
381configuration used by the Installation CD to the location where genkernel 465configuration used by the Installation CD to the location where genkernel
382looks for the default kernel configuration: 466looks for the default kernel configuration:
383</p> 467</p>
384 468
385<pre caption="Copying over the Installation CD kernel config"> 469<pre caption="Copying over the Installation CD kernel config">
386<comment>(Only do this if you are going to configure a 2.6 kernel)</comment> 470<comment>(Only do this if you are going to configure a 2.6 kernel)</comment>
387# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i> 471# <i>zcat /proc/config.gz &gt; /usr/share/genkernel/x86/kernel-config-2.6</i>
388</pre> 472</pre>
473
474</body>
475<body>
389 476
390<p> 477<p>
391Now, compile your kernel sources by running <c>genkernel all</c>. Be aware 478Now, compile your kernel sources by running <c>genkernel all</c>. Be aware
392though, as <c>genkernel</c> compiles a kernel that supports almost all 479though, as <c>genkernel</c> compiles a kernel that supports almost all
393hardware, this compilation will take quite a while to finish! 480hardware, this compilation will take quite a while to finish!
437<title>Kernel Modules</title> 524<title>Kernel Modules</title>
438<subsection> 525<subsection>
439<title>Configuring the Modules</title> 526<title>Configuring the Modules</title>
440<body> 527<body>
441 528
529<note test="func:keyval('arch')='x86'">
530If you chose a kernel 2.4, replace occurrences of <c>2.6</c> with <c>2.4</c> in
531this section.
532</note>
533
442<p> 534<p>
443You should list the modules you want automatically loaded in 535You should list the modules you want automatically loaded in
444<path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>). 536<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
445You can add extra options to the modules too if you want. 537the modules too if you want.
446</p> 538</p>
447 539
448<p> 540<p>
449To view all available modules, run the following <c>find</c> command. Don't 541To view all available modules, run the following <c>find</c> command. Don't
450forget to substitute "&lt;kernel version&gt;" with the version of the kernel you 542forget to substitute <c><keyval id="kernel-version"/></c> with the version of
451just compiled: 543the kernel you just compiled:
452</p> 544</p>
453 545
454<pre caption="Viewing all available modules"> 546<pre caption="Viewing all available modules">
455# <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i> 547# <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
456</pre> 548</pre>
457 549
458<p> 550<p>
459For instance, to automatically load the <c>3c59x.o</c> module, edit the 551For instance, to automatically load the <c>3c59x.o</c> module, edit the
460<path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module 552<path>kernel-2.6</path> file and enter the module name in it.
461name in it.
462</p> 553</p>
463 554
464<pre caption="Editing /etc/modules.autoload.d/kernel-2.4"> 555<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
465<comment>(Example for 2.4 kernels)</comment>
466# <i>nano -w /etc/modules.autoload.d/kernel-2.4</i> 556# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
467</pre> 557</pre>
468 558
469<pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6"> 559<pre caption="/etc/modules.autoload.d/kernel-2.6">
4703c59x 5603c59x
471</pre> 561</pre>
472 562
473<p> 563<p>
474Continue the installation with <uri link="?part=1&amp;chap=8">Configuring 564Continue the installation with <uri link="?part=1&amp;chap=8">Configuring

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.20