/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.23 - (show annotations) (download) (as text)
Sat Apr 16 21:47:06 2005 UTC (9 years, 2 months ago) by swift
Branch: MAIN
Changes since 1.22: +3 -12 lines
File MIME type: application/xml
modules-update is only needed for changes in /etc/modules.d/* which we do not do. Changes in /etc/modules.autoload.d are automatically taken into account by /etc/init.d/modules. Thanks for Terry Colligan for reporting

1 <?xml version='1.0' encoding='UTF-8'?>
2 <!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3
4 <!-- The content of this document is licensed under the CC-BY-SA license -->
5 <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6
7 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.22 2005/03/31 01:14:28 vapier Exp $ -->
8
9 <sections>
10
11 <version>2.2</version>
12 <date>2005-04-16</date>
13
14 <section>
15 <title>Timezone</title>
16 <body>
17
18 <p>
19 You first need to select your timezone so that your system knows where it is
20 located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then make a
21 symlink to <path>/etc/localtime</path> using <c>ln</c>:
22 </p>
23
24 <pre caption="Setting the timezone information">
25 # <i>ls /usr/share/zoneinfo</i>
26 <comment>(Suppose you want to use GMT)</comment>
27 # <i>ln -sf /usr/share/zoneinfo/GMT /etc/localtime</i>
28 </pre>
29
30 </body>
31 </section>
32 <section>
33 <title>Installing the Sources</title>
34 <subsection>
35 <title>Choosing a Kernel</title>
36 <body>
37
38 <p>
39 The core around which all distributions are built is the Linux kernel. It is the
40 layer between the user programs and your system hardware. Gentoo provides its
41 users several possible kernel sources. A full listing with description is
42 available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
43 Guide</uri>.
44 </p>
45
46 <p>
47 For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source).
48 </p>
49
50 <p>
51 Choose your kernel source and install it using <c>emerge</c>.
52 </p>
53
54 <p>
55 In the next example we install the <c>vanilla-sources</c>.
56 Of course substitute with your choice of sources, this is merely an example:
57 </p>
58
59 <pre caption="Installing a kernel source">
60 # <i>emerge vanilla-sources</i>
61 </pre>
62
63 <p>
64 When you take a look in <path>/usr/src</path> you should see a symlink called
65 <path>linux</path> pointing to your kernel source:
66 </p>
67
68 <pre caption="Viewing the kernel source symlink">
69 # <i>ls -l /usr/src/linux</i>
70 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.11.2
71 </pre>
72
73 <p>
74 If this isn't the case (i.e. the symlink points to a different kernel source)
75 change the symlink before you continue:
76 </p>
77
78 <pre caption="Changing the kernel source symlink">
79 # <i>rm /usr/src/linux</i>
80 # <i>cd /usr/src</i>
81 # <i>ln -s linux-2.6.11.2 linux</i>
82 </pre>
83
84 <p>
85 Now it is time to configure and compile your kernel source. You
86 can use <c>genkernel</c> for this, which will build a generic kernel as used
87 by the Installation CD. We explain the "manual" configuration first though, as it is
88 the best way to optimize your environment.
89 </p>
90
91 <p>
92 If you want to manually configure your kernel, continue now with <uri
93 link="#manual">Default: Manual Configuration</uri>. If you want to use
94 <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
95 genkernel</uri> instead.
96 </p>
97
98 </body>
99 </subsection>
100 </section>
101 <section id="manual">
102 <title>Default: Manual Configuration</title>
103 <subsection>
104 <title>Introduction</title>
105 <body>
106
107 <p>
108 Manually configuring a kernel is often seen as the most difficult procedure a
109 Linux user ever has to perform. Nothing is less true -- after configuring a
110 couple of kernels you don't even remember that it was difficult ;)
111 </p>
112
113 <p>
114 However, one thing <e>is</e> true: you must know your system when you start
115 configuring a kernel manually. Most information can be gathered by viewing the
116 contents of <path>/proc/pci</path> (or by using <c>lspci</c> if available). You
117 can also run <c>lsmod</c> to see what kernel modules the Installation CD uses (it might
118 provide you with a nice hint on what to enable).
119 </p>
120
121 <p>
122 Now go to your kernel source directory and execute <c>make menuconfig</c>. This
123 will fire up an ncurses-based configuration menu.
124 </p>
125
126 <pre caption="Invoking menuconfig">
127 # <i>cd /usr/src/linux</i>
128 # <i>make menuconfig</i>
129 </pre>
130
131 <p>
132 You will be greeted with several configuration sections. We'll first list some
133 options you must activate (otherwise Gentoo will not function, or not function
134 properly without additional tweaks).
135 </p>
136
137 </body>
138 </subsection>
139 <subsection>
140 <title>Activating Required Options</title>
141 <body>
142
143 <p>
144 First of all, activate the use of development and experimental code/drivers.
145 You need this, otherwise some very important code/drivers won't show up:
146 </p>
147
148 <pre caption="Selecting experimental code/drivers">
149 Code maturity level options ---&gt;
150 [*] Prompt for development and/or incomplete code/drivers
151 </pre>
152
153 <p>
154 Now go to <c>File Systems</c> and select support for the filesystems you use.
155 <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
156 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
157 file system</c>. If you are using a 2.4 kernel, you should also select the
158 <c>/dev file system</c> and <c>Automatically mount at boot</c> options, and
159 you should make sure to <c>emerge devfsd</c>.
160 </p>
161
162 <pre caption="Selecting necessary file systems">
163 <comment>(With a 2.4.x kernel)</comment>
164 File systems ---&gt;
165 [*] Virtual memory file system support (former shm fs)
166 [*] /proc file system support
167 [*] /dev file system support (EXPERIMENTAL)
168 [*] Automatically mount at boot
169 [ ] /dev/pts file system for Unix98 PTYs
170
171 <comment>(With a 2.6.x kernel)</comment>
172 File systems ---&gt;
173 Pseudo Filesystems ---&gt;
174 [*] /proc file system support
175 [ ] /dev file system support (OBSOLETE)
176 [*] Virtual memory file system support (former shm fs)
177
178 <comment>(Select one or more of the following options as needed by your system)</comment>
179 &lt;*&gt; Reiserfs support
180 &lt;*&gt; Ext3 journalling file system support
181 &lt;*&gt; JFS filesystem support
182 &lt;*&gt; Second extended fs support
183 &lt;*&gt; XFS filesystem support
184 </pre>
185
186 <p>
187 If you are using PPPoE to connect to the Internet or you are using a dial-up
188 modem, you will need the following options in the kernel:
189 </p>
190
191 <pre caption="Selecting PPPoE necessary drivers">
192 <comment>(With a 2.4.x kernel)</comment>
193 Network device support ---&gt;
194 &lt;*&gt; PPP (point-to-point protocol) support
195 &lt;*&gt; PPP support for async serial ports
196 &lt;*&gt; PPP support for sync tty ports
197
198 <comment>(With a 2.6.x kernel)</comment>
199 Device Drivers ---&gt;
200 Networking support ---&gt;
201 &lt;*&gt; PPP (point-to-point protocol) support
202 &lt;*&gt; PPP support for async serial ports
203 &lt;*&gt; PPP support for sync tty ports
204 </pre>
205
206 <p>
207 The two compression options won't harm but are not definitely needed, neither
208 does the <c>PPP over Ethernet</c> option, that might only be used by
209 <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
210 </p>
211
212 <p>
213 If you require it, don't forget to include support in the kernel for your
214 ethernet card.
215 </p>
216
217 <p>
218 The following options are recommended as well:
219 </p>
220
221 <pre caption="Recommended Alpha options">
222 General setup ---&gt;
223 &lt;*&gt; SRM environment through procfs
224 &lt;*&gt; Configure uac policy via sysctl
225
226 Plug and Play configuration ---&gt;
227 &lt;*&gt; Plug and Play support
228 &lt;M&gt; ISA Plug and Play support
229
230 SCSI support ---&gt;
231 SCSI low-level drivers ---&gt;
232 &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
233 &lt;*&gt; Qlogic ISP SCSI support
234
235 Network device support ---&gt;
236 Ethernet (10 or 100 Mbit) ---&gt;
237 &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
238 &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
239 &lt;M&gt; EtherExpressPro/100 support (eepro100)
240 &lt;M&gt; EtherExpressPro/100 support (e100)
241 Ethernet (1000 Mbit) ---&gt;
242 &lt;M&gt; Alteon AceNIC
243 [*] Omit support for old Tigon I
244 &lt;M&gt; Broadcom Tigon3
245 [*] FDDI driver support
246 &lt;M&gt; Digital DEFEA and DEFPA
247 &lt;*&gt; PPP support
248 &lt;*&gt; PPP Deflate compression
249
250 Character devices ---&gt;
251 [*] Support for console on serial port
252 [*] Direct Rendering Manager
253
254 File systems ---&gt;
255 &lt;*&gt; Kernel automounter version 4 support
256 Network File Systems ---&gt;
257 &lt;*&gt; NFS
258 [*] NFSv3 client
259 &lt;*&gt; NFS server
260 [*] NFSv3 server
261 Partition Types ---&gt;
262 [*] Advanced partition selection
263 [*] Alpha OSF partition support
264 Native Language Support
265 &lt;*&gt; NLS ISO 8859-1
266
267 Sound ---&gt;
268 &lt;M&gt; Sound card support
269 &lt;M&gt; OSS sound modules
270 [*] Verbose initialisation
271 [*] Persistent DMA buffers
272 &lt;M&gt; 100% Sound Blaster compatibles
273 </pre>
274
275 <p>
276 When you've finished configuring the kernel, continue with <uri
277 link="#compiling">Compiling and Installing</uri>.
278 </p>
279
280 </body>
281 </subsection>
282 <subsection id="compiling">
283 <title>Compiling and Installing</title>
284 <body>
285
286 <p>
287 Now that your kernel is configured, it is time to compile and install it. Exit
288 the configuration and start the compilation process:
289 </p>
290
291 <pre caption="Compiling the kernel">
292 <comment>(For 2.4 kernel)</comment>
293 # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
294
295 <comment>(For 2.6 kernel)</comment>
296 # <i>make &amp;&amp; make modules_install</i>
297
298 <comment>(For all kernels)</comment>
299 # <i>make boot</i>
300 </pre>
301
302 <p>
303 When the kernel has finished compiling, copy the kernel image to
304 <path>/boot</path>. In the next example we assume you have configured and
305 compiled <c>vanilla-sources-2.6.11.2</c>; recent kernels might create
306 <path>vmlinux</path> instead of <path>vmlinux.gz</path>.
307 </p>
308
309 <pre caption="Installing the kernel">
310 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
311 # <i>cp System.map /boot/System.map-2.6.11.2</i>
312 </pre>
313
314 <p>
315 It is also wise to copy over your kernel configuration file to
316 <path>/boot</path>, just in case :)
317 </p>
318
319 <pre caption="Backing up your kernel configuration">
320 # <i>cp .config /boot/config-2.6.11.2</i>
321 </pre>
322
323 <p>
324 Now continue with <uri link="#kernel_modules">Installing Separate Kernel
325 Modules</uri>.
326 </p>
327
328 </body>
329 </subsection>
330 </section>
331 <section id="genkernel">
332 <title>Alternative: Using genkernel</title>
333 <body>
334
335 <p>
336 If you are reading this section, you have chosen to use our <c>genkernel</c>
337 script to configure your kernel for you.
338 </p>
339
340 <p>
341 Now that your kernel source tree is installed, it's now time to compile your
342 kernel by using our <c>genkernel</c> script to automatically build a kernel for
343 you. <c>genkernel</c> works by configuring a kernel nearly identically to the
344 way our Installation CD kernel is configured. This means that when you use
345 <c>genkernel</c> to build your kernel, your system will generally detect all
346 your hardware at boot-time, just like our Installation CD does. Because genkernel
347 doesn't require any manual kernel configuration, it is an ideal solution for
348 those users who may not be comfortable compiling their own kernels.
349 </p>
350
351 <p>
352 Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
353 </p>
354
355 <pre caption="Emerging genkernel">
356 # <i>emerge genkernel</i>
357 </pre>
358
359 <p>
360 Now, compile your kernel sources by running <c>genkernel all</c>.
361 Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
362 hardware, this compilation will take quite a while to finish!
363 </p>
364
365 <p>
366 Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
367 need to manually configure your kernel using <c>genkernel --menuconfig all</c>
368 and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
369 module).
370 </p>
371
372 <pre caption="Running genkernel">
373 # <i>genkernel all</i>
374 GenKernel v3.0.1_beta10
375 * ARCH: Alpha
376 * KERNEL VER: 2.6.11.2
377 * kernel: configuring source
378 * kernel: running mrproper
379 <comment>(Output removed to increase readability)</comment>
380 * Kernel compiled successfully!
381 * Required Kernel Params:
382 * : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
383 * where $ROOT is the devicenode for your root partition as
384 * you should have specified in /etc/fstab
385 *
386 * You MUST tell your bootloader to use the generated initrd
387 *
388 * Recommended Kernel Params:
389 * : vga=0x317 splash=verbose
390 *
391 * Do NOT report kernel bugs (configs included) as genkernel bugs.
392 * Make sure you have the latest genkernel before reporting bugs
393 *
394 * For more info see /usr/share/genkernel/README
395 </pre>
396
397 <p>
398 Once <c>genkernel</c> completes, a kernel, full set of modules and
399 <e>initial root disk</e> (initrd) will be created. We will use the kernel
400 and initrd when configuring a boot loader later in this document. Write
401 down the names of the kernel and initrd as you will need it when writing
402 the bootloader configuration file. The initrd will be started immediately after
403 booting to perform hardware autodetection (just like on the Installation CD) before
404 your "real" system starts up.
405 </p>
406
407 <pre caption="Checking the created kernel image name and initrd">
408 # <i>ls /boot/kernel* /boot/initrd*</i>
409 </pre>
410
411 <p>
412 Now, let's perform one more step to get our system to be more like the Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects hardware that
413 is needed to boot your system, <c>coldplug</c> autodetects everything else.
414 To emerge and enable <c>coldplug</c>, type the following:
415 </p>
416
417 <pre caption="Emerging and enabling coldplug">
418 # <i>emerge coldplug</i>
419 # <i>rc-update add coldplug boot</i>
420 </pre>
421
422 <p>
423 If you want your system to react to hotplugging events, you would need to
424 install and setup hotplug as well:
425 </p>
426
427 <pre caption="Emerging and enabling hotplug">
428 # <i>emerge hotplug</i>
429 # <i>rc-update add hotplug default</i>
430 </pre>
431
432 </body>
433 </section>
434 <section id="kernel_modules">
435 <title>Installing Separate Kernel Modules</title>
436 <subsection>
437 <title>Installing Extra Modules</title>
438 <body>
439
440 <p>
441 If appropriate, you should emerge ebuilds for any additional hardware that is
442 on your system. Here is a list of kernel-related ebuilds that you could emerge:
443 </p>
444
445 <table>
446 <tcolumn width="1in"/>
447 <tcolumn width="4in"/>
448 <tcolumn width="2in"/>
449 <tr>
450 <th>Ebuild</th>
451 <th>Purpose</th>
452 <th>Command</th>
453 </tr>
454 <tr>
455 <ti>x11-drm</ti>
456 <ti>
457 Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
458 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
459 in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
460 need to fill in as <c>yourcard</c>.
461 </ti>
462 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
463 </tr>
464 </table>
465
466 <p>
467 Beware though, some of these ebuilds might deal with big dependencies. To verify
468 what packages will be installed by emerging an ebuild, use <c>emerge
469 --pretend</c>. For instance, for the <c>x11-drm</c> package:
470 </p>
471
472 <pre caption="View full installation package listing">
473 # <i>emerge --pretend x11-drm</i>
474 </pre>
475
476 </body>
477 </subsection>
478 <subsection>
479 <title>Configuring the Modules</title>
480 <body>
481
482 <p>
483 You should list the modules you want automatically loaded in
484 <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
485 You can add extra options to the modules too if you want.
486 </p>
487
488 <p>
489 To view all available modules, run the following <c>find</c> command. Don't
490 forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
491 just compiled:
492 </p>
493
494 <pre caption="Viewing all available modules">
495 # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
496 </pre>
497
498 <p>
499 For instance, to automatically load the <c>3c59x.o</c> module, edit the
500 <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
501 name in it.
502 </p>
503
504 <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
505 <comment>(Example for 2.4 kernels)</comment>
506 # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
507 </pre>
508
509 <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
510 3c59x
511 </pre>
512
513 <p>
514 Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
515 your System</uri>.
516 </p>
517
518 </body>
519 </subsection>
520 </section>
521 </sections>

  ViewVC Help
Powered by ViewVC 1.1.20