/[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.30 - (show annotations) (download) (as text)
Sun Aug 21 17:47:46 2005 UTC (9 years, 4 months ago) by neysx
Branch: MAIN
Changes since 1.29: +8 -6 lines
File MIME type: application/xml
#103041 Warn users against Etc/GMT* timezones

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

  ViewVC Help
Powered by ViewVC 1.1.20