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