/[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.31 - (hide annotations) (download) (as text)
Thu Oct 6 19:50:33 2005 UTC (8 years, 11 months ago) by jkt
Branch: MAIN
Changes since 1.30: +3 -4 lines
File MIME type: application/xml
#103232, `cp System.map /boot` is not needed

1 swift 1.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 neysx 1.30 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 swift 1.1
7 jkt 1.31 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.30 2005/08/21 17:47:46 neysx Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.11
11 jkt 1.31 <version>2.9</version>
12     <date>2005-10-06</date>
13 swift 1.11
14 swift 1.1 <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 neysx 1.30 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 swift 1.1 </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 swift 1.21 For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source).
50 swift 1.1 </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 swift 1.21 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.11.2
73 swift 1.1 </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 swift 1.3 # <i>rm /usr/src/linux</i>
82     # <i>cd /usr/src</i>
83 swift 1.21 # <i>ln -s linux-2.6.11.2 linux</i>
84 swift 1.1 </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 swift 1.21 by the Installation CD. We explain the "manual" configuration first though, as it is
90 swift 1.1 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 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
111 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
112 swift 1.1 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 swift 1.24 configuring a kernel manually. Most information can be gathered by emerging
118 swift 1.25 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
119 swift 1.24 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 swift 1.25 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
123 swift 1.24 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 swift 1.1 </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 fox2mike 1.26 <pre caption="Selecting experimental code/drivers, General setup">
155 swift 1.1 Code maturity level options ---&gt;
156     [*] Prompt for development and/or incomplete code/drivers
157 fox2mike 1.26 General setup ---&gt;
158     [*] Support for hot-pluggable devices
159 swift 1.1 </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 vapier 1.22 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 swift 1.1 </p>
169    
170     <pre caption="Selecting necessary file systems">
171 neysx 1.4 <comment>(With a 2.4.x kernel)</comment>
172 swift 1.1 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 neysx 1.4 [ ] /dev/pts file system for Unix98 PTYs
178 swift 1.1
179 neysx 1.4 <comment>(With a 2.6.x kernel)</comment>
180     File systems ---&gt;
181     Pseudo Filesystems ---&gt;
182     [*] /proc file system support
183 swift 1.21 [ ] /dev file system support (OBSOLETE)
184 neysx 1.4 [*] Virtual memory file system support (former shm fs)
185 swift 1.1
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 neysx 1.4 <comment>(With a 2.4.x kernel)</comment>
201 swift 1.1 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 neysx 1.4
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 swift 1.1 </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 vapier 1.9 The following options are recommended as well:
227 swift 1.1 </p>
228    
229 vapier 1.9 <pre caption="Recommended Alpha options">
230 swift 1.1 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 swift 1.20 the configuration and start the compilation process:
297 swift 1.1 </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 vapier 1.6
306     <comment>(For all kernels)</comment>
307     # <i>make boot</i>
308 swift 1.1 </pre>
309    
310     <p>
311 neysx 1.7 When the kernel has finished compiling, copy the kernel image to
312 swift 1.1 <path>/boot</path>. In the next example we assume you have configured and
313 swift 1.21 compiled <c>vanilla-sources-2.6.11.2</c>; recent kernels might create
314 swift 1.10 <path>vmlinux</path> instead of <path>vmlinux.gz</path>.
315 swift 1.1 </p>
316    
317     <pre caption="Installing the kernel">
318 vapier 1.6 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
319 swift 1.1 </pre>
320    
321     <p>
322     It is also wise to copy over your kernel configuration file to
323     <path>/boot</path>, just in case :)
324     </p>
325    
326     <pre caption="Backing up your kernel configuration">
327 swift 1.21 # <i>cp .config /boot/config-2.6.11.2</i>
328 swift 1.1 </pre>
329    
330     <p>
331     Now continue with <uri link="#kernel_modules">Installing Separate Kernel
332     Modules</uri>.
333     </p>
334    
335     </body>
336     </subsection>
337     </section>
338     <section id="genkernel">
339     <title>Alternative: Using genkernel</title>
340     <body>
341    
342     <p>
343     If you are reading this section, you have chosen to use our <c>genkernel</c>
344     script to configure your kernel for you.
345     </p>
346    
347     <p>
348     Now that your kernel source tree is installed, it's now time to compile your
349     kernel by using our <c>genkernel</c> script to automatically build a kernel for
350     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
351 swift 1.21 way our Installation CD kernel is configured. This means that when you use
352 swift 1.1 <c>genkernel</c> to build your kernel, your system will generally detect all
353 swift 1.21 your hardware at boot-time, just like our Installation CD does. Because genkernel
354 swift 1.1 doesn't require any manual kernel configuration, it is an ideal solution for
355     those users who may not be comfortable compiling their own kernels.
356     </p>
357    
358     <p>
359     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
360     </p>
361    
362     <pre caption="Emerging genkernel">
363     # <i>emerge genkernel</i>
364     </pre>
365    
366     <p>
367     Now, compile your kernel sources by running <c>genkernel all</c>.
368     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
369     hardware, this compilation will take quite a while to finish!
370     </p>
371    
372     <p>
373     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
374     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
375     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
376     module).
377     </p>
378    
379     <pre caption="Running genkernel">
380     # <i>genkernel all</i>
381     GenKernel v3.0.1_beta10
382     * ARCH: Alpha
383 swift 1.21 * KERNEL VER: 2.6.11.2
384 swift 1.1 * kernel: configuring source
385     * kernel: running mrproper
386     <comment>(Output removed to increase readability)</comment>
387     * Kernel compiled successfully!
388     * Required Kernel Params:
389     * : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
390     * where $ROOT is the devicenode for your root partition as
391     * you should have specified in /etc/fstab
392     *
393     * You MUST tell your bootloader to use the generated initrd
394     *
395     * Recommended Kernel Params:
396     * : vga=0x317 splash=verbose
397     *
398     * Do NOT report kernel bugs (configs included) as genkernel bugs.
399     * Make sure you have the latest genkernel before reporting bugs
400     *
401     * For more info see /usr/share/genkernel/README
402     </pre>
403    
404     <p>
405     Once <c>genkernel</c> completes, a kernel, full set of modules and
406     <e>initial root disk</e> (initrd) will be created. We will use the kernel
407     and initrd when configuring a boot loader later in this document. Write
408     down the names of the kernel and initrd as you will need it when writing
409     the bootloader configuration file. The initrd will be started immediately after
410 swift 1.21 booting to perform hardware autodetection (just like on the Installation CD) before
411 swift 1.1 your "real" system starts up.
412     </p>
413    
414     <pre caption="Checking the created kernel image name and initrd">
415 swift 1.29 # <i>ls /boot/kernel* /boot/initramfs-*</i>
416 swift 1.1 </pre>
417    
418     <p>
419 swift 1.21 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
420 swift 1.14 is needed to boot your system, <c>coldplug</c> autodetects everything else.
421     To emerge and enable <c>coldplug</c>, type the following:
422 swift 1.1 </p>
423    
424 swift 1.14 <pre caption="Emerging and enabling coldplug">
425     # <i>emerge coldplug</i>
426 swift 1.17 # <i>rc-update add coldplug boot</i>
427     </pre>
428    
429 swift 1.1 </body>
430     </section>
431     <section id="kernel_modules">
432     <title>Installing Separate Kernel Modules</title>
433     <subsection>
434     <title>Installing Extra Modules</title>
435     <body>
436    
437     <p>
438     If appropriate, you should emerge ebuilds for any additional hardware that is
439     on your system. Here is a list of kernel-related ebuilds that you could emerge:
440     </p>
441    
442     <table>
443     <tcolumn width="1in"/>
444     <tcolumn width="4in"/>
445     <tcolumn width="2in"/>
446     <tr>
447     <th>Ebuild</th>
448     <th>Purpose</th>
449     <th>Command</th>
450     </tr>
451     <tr>
452 swift 1.21 <ti>x11-drm</ti>
453 swift 1.1 <ti>
454     Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
455 swift 1.21 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
456     in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
457     need to fill in as <c>yourcard</c>.
458 swift 1.1 </ti>
459 swift 1.21 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
460 swift 1.1 </tr>
461     </table>
462    
463     <p>
464     Beware though, some of these ebuilds might deal with big dependencies. To verify
465     what packages will be installed by emerging an ebuild, use <c>emerge
466 swift 1.21 --pretend</c>. For instance, for the <c>x11-drm</c> package:
467 swift 1.1 </p>
468    
469     <pre caption="View full installation package listing">
470 swift 1.21 # <i>emerge --pretend x11-drm</i>
471 swift 1.1 </pre>
472    
473     </body>
474     </subsection>
475     <subsection>
476     <title>Configuring the Modules</title>
477     <body>
478    
479     <p>
480     You should list the modules you want automatically loaded in
481     <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
482     You can add extra options to the modules too if you want.
483     </p>
484    
485     <p>
486     To view all available modules, run the following <c>find</c> command. Don't
487     forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
488     just compiled:
489     </p>
490    
491     <pre caption="Viewing all available modules">
492     # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
493     </pre>
494    
495     <p>
496     For instance, to automatically load the <c>3c59x.o</c> module, edit the
497     <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
498     name in it.
499     </p>
500    
501     <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
502     <comment>(Example for 2.4 kernels)</comment>
503     # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
504     </pre>
505    
506     <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
507     3c59x
508     </pre>
509    
510     <p>
511     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
512     your System</uri>.
513     </p>
514    
515     </body>
516     </subsection>
517     </section>
518     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20