/[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.32 - (hide annotations) (download) (as text)
Mon Nov 21 15:37:12 2005 UTC (8 years, 7 months ago) by neysx
Branch: MAIN
Changes since 1.31: +10 -8 lines
File MIME type: application/xml
#112802 USE="-doc" when emerging kernel sources to avoid dependencies (until the USE flags are described later in the handbook)
#110596 (PPC only) Add make defconfig before make menuconfig
#110038 cp time zone file instead of symlinking to it

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

  ViewVC Help
Powered by ViewVC 1.1.20