/[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.21 - (hide annotations) (download) (as text)
Mon Mar 28 11:30:52 2005 UTC (9 years, 4 months ago) by swift
Branch: MAIN
Changes since 1.20: +25 -31 lines
File MIME type: application/xml
Updating docos to 2005.0

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     <!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
6    
7 swift 1.21 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/2005.0/hb-install-alpha-kernel.xml,v 1.2 2005/03/28 08:20:02 swift Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.11
11 swift 1.21 <version>2.00</version>
12     <date>2005-03-28</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     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 swift 1.21 For alpha-based systems we have <c>vanilla-sources</c> (the default 2.6 kernel source).
48 swift 1.1 </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 swift 1.21 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.11.2
71 swift 1.1 </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 swift 1.3 # <i>rm /usr/src/linux</i>
80     # <i>cd /usr/src</i>
81 swift 1.21 # <i>ln -s linux-2.6.11.2 linux</i>
82 swift 1.1 </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 swift 1.21 by the Installation CD. We explain the "manual" configuration first though, as it is
88 swift 1.1 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 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
109 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
110 swift 1.1 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 swift 1.21 can also run <c>lsmod</c> to see what kernel modules the Installation CD uses (it might
118 swift 1.1 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>, <c>/proc
157 swift 1.21 file system</c>, (<c>/dev file system</c> + <c>Automatically mount at boot</c> only for 2.4 kernel):
158 swift 1.1 </p>
159    
160     <pre caption="Selecting necessary file systems">
161 neysx 1.4 <comment>(With a 2.4.x kernel)</comment>
162 swift 1.1 File systems ---&gt;
163     [*] Virtual memory file system support (former shm fs)
164     [*] /proc file system support
165     [*] /dev file system support (EXPERIMENTAL)
166     [*] Automatically mount at boot
167 neysx 1.4 [ ] /dev/pts file system for Unix98 PTYs
168 swift 1.1
169 neysx 1.4 <comment>(With a 2.6.x kernel)</comment>
170     File systems ---&gt;
171     Pseudo Filesystems ---&gt;
172     [*] /proc file system support
173 swift 1.21 [ ] /dev file system support (OBSOLETE)
174 neysx 1.4 [*] Virtual memory file system support (former shm fs)
175 swift 1.1
176     <comment>(Select one or more of the following options as needed by your system)</comment>
177     &lt;*&gt; Reiserfs support
178     &lt;*&gt; Ext3 journalling file system support
179     &lt;*&gt; JFS filesystem support
180     &lt;*&gt; Second extended fs support
181     &lt;*&gt; XFS filesystem support
182     </pre>
183    
184     <p>
185     If you are using PPPoE to connect to the Internet or you are using a dial-up
186     modem, you will need the following options in the kernel:
187     </p>
188    
189     <pre caption="Selecting PPPoE necessary drivers">
190 neysx 1.4 <comment>(With a 2.4.x kernel)</comment>
191 swift 1.1 Network device support ---&gt;
192     &lt;*&gt; PPP (point-to-point protocol) support
193     &lt;*&gt; PPP support for async serial ports
194     &lt;*&gt; PPP support for sync tty ports
195 neysx 1.4
196     <comment>(With a 2.6.x kernel)</comment>
197     Device Drivers ---&gt;
198     Networking support ---&gt;
199     &lt;*&gt; PPP (point-to-point protocol) support
200     &lt;*&gt; PPP support for async serial ports
201     &lt;*&gt; PPP support for sync tty ports
202 swift 1.1 </pre>
203    
204     <p>
205     The two compression options won't harm but are not definitely needed, neither
206     does the <c>PPP over Ethernet</c> option, that might only be used by
207     <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
208     </p>
209    
210     <p>
211     If you require it, don't forget to include support in the kernel for your
212     ethernet card.
213     </p>
214    
215     <p>
216 vapier 1.9 The following options are recommended as well:
217 swift 1.1 </p>
218    
219 vapier 1.9 <pre caption="Recommended Alpha options">
220 swift 1.1 General setup ---&gt;
221     &lt;*&gt; SRM environment through procfs
222     &lt;*&gt; Configure uac policy via sysctl
223    
224     Plug and Play configuration ---&gt;
225     &lt;*&gt; Plug and Play support
226     &lt;M&gt; ISA Plug and Play support
227    
228     SCSI support ---&gt;
229     SCSI low-level drivers ---&gt;
230     &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
231     &lt;*&gt; Qlogic ISP SCSI support
232    
233     Network device support ---&gt;
234     Ethernet (10 or 100 Mbit) ---&gt;
235     &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
236     &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
237     &lt;M&gt; EtherExpressPro/100 support (eepro100)
238     &lt;M&gt; EtherExpressPro/100 support (e100)
239     Ethernet (1000 Mbit) ---&gt;
240     &lt;M&gt; Alteon AceNIC
241     [*] Omit support for old Tigon I
242     &lt;M&gt; Broadcom Tigon3
243     [*] FDDI driver support
244     &lt;M&gt; Digital DEFEA and DEFPA
245     &lt;*&gt; PPP support
246     &lt;*&gt; PPP Deflate compression
247    
248     Character devices ---&gt;
249     [*] Support for console on serial port
250     [*] Direct Rendering Manager
251    
252     File systems ---&gt;
253     &lt;*&gt; Kernel automounter version 4 support
254     Network File Systems ---&gt;
255     &lt;*&gt; NFS
256     [*] NFSv3 client
257     &lt;*&gt; NFS server
258     [*] NFSv3 server
259     Partition Types ---&gt;
260     [*] Advanced partition selection
261     [*] Alpha OSF partition support
262     Native Language Support
263     &lt;*&gt; NLS ISO 8859-1
264    
265     Sound ---&gt;
266     &lt;M&gt; Sound card support
267     &lt;M&gt; OSS sound modules
268     [*] Verbose initialisation
269     [*] Persistent DMA buffers
270     &lt;M&gt; 100% Sound Blaster compatibles
271     </pre>
272    
273     <p>
274     When you've finished configuring the kernel, continue with <uri
275     link="#compiling">Compiling and Installing</uri>.
276     </p>
277    
278     </body>
279     </subsection>
280     <subsection id="compiling">
281     <title>Compiling and Installing</title>
282     <body>
283    
284     <p>
285     Now that your kernel is configured, it is time to compile and install it. Exit
286 swift 1.20 the configuration and start the compilation process:
287 swift 1.1 </p>
288    
289     <pre caption="Compiling the kernel">
290     <comment>(For 2.4 kernel)</comment>
291     # <i>make dep &amp;&amp; make vmlinux modules modules_install</i>
292    
293     <comment>(For 2.6 kernel)</comment>
294     # <i>make &amp;&amp; make modules_install</i>
295 vapier 1.6
296     <comment>(For all kernels)</comment>
297     # <i>make boot</i>
298 swift 1.1 </pre>
299    
300     <p>
301 neysx 1.7 When the kernel has finished compiling, copy the kernel image to
302 swift 1.1 <path>/boot</path>. In the next example we assume you have configured and
303 swift 1.21 compiled <c>vanilla-sources-2.6.11.2</c>; recent kernels might create
304 swift 1.10 <path>vmlinux</path> instead of <path>vmlinux.gz</path>.
305 swift 1.1 </p>
306    
307     <pre caption="Installing the kernel">
308 vapier 1.6 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
309 swift 1.21 # <i>cp System.map /boot/System.map-2.6.11.2</i>
310 swift 1.1 </pre>
311    
312     <p>
313     It is also wise to copy over your kernel configuration file to
314     <path>/boot</path>, just in case :)
315     </p>
316    
317     <pre caption="Backing up your kernel configuration">
318 swift 1.21 # <i>cp .config /boot/config-2.6.11.2</i>
319 swift 1.1 </pre>
320    
321     <p>
322     Now continue with <uri link="#kernel_modules">Installing Separate Kernel
323     Modules</uri>.
324     </p>
325    
326     </body>
327     </subsection>
328     </section>
329     <section id="genkernel">
330     <title>Alternative: Using genkernel</title>
331     <body>
332    
333     <p>
334     If you are reading this section, you have chosen to use our <c>genkernel</c>
335     script to configure your kernel for you.
336     </p>
337    
338     <p>
339     Now that your kernel source tree is installed, it's now time to compile your
340     kernel by using our <c>genkernel</c> script to automatically build a kernel for
341     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
342 swift 1.21 way our Installation CD kernel is configured. This means that when you use
343 swift 1.1 <c>genkernel</c> to build your kernel, your system will generally detect all
344 swift 1.21 your hardware at boot-time, just like our Installation CD does. Because genkernel
345 swift 1.1 doesn't require any manual kernel configuration, it is an ideal solution for
346     those users who may not be comfortable compiling their own kernels.
347     </p>
348    
349     <p>
350     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
351     </p>
352    
353     <pre caption="Emerging genkernel">
354     # <i>emerge genkernel</i>
355     </pre>
356    
357     <p>
358     Now, compile your kernel sources by running <c>genkernel all</c>.
359     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
360     hardware, this compilation will take quite a while to finish!
361     </p>
362    
363     <p>
364     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
365     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
366     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
367     module).
368     </p>
369    
370     <pre caption="Running genkernel">
371     # <i>genkernel all</i>
372     GenKernel v3.0.1_beta10
373     * ARCH: Alpha
374 swift 1.21 * KERNEL VER: 2.6.11.2
375 swift 1.1 * kernel: configuring source
376     * kernel: running mrproper
377     <comment>(Output removed to increase readability)</comment>
378     * Kernel compiled successfully!
379     * Required Kernel Params:
380     * : root=/dev/ram0 init=/linuxrc real_root=/dev/$ROOT
381     * where $ROOT is the devicenode for your root partition as
382     * you should have specified in /etc/fstab
383     *
384     * You MUST tell your bootloader to use the generated initrd
385     *
386     * Recommended Kernel Params:
387     * : vga=0x317 splash=verbose
388     *
389     * Do NOT report kernel bugs (configs included) as genkernel bugs.
390     * Make sure you have the latest genkernel before reporting bugs
391     *
392     * For more info see /usr/share/genkernel/README
393     </pre>
394    
395     <p>
396     Once <c>genkernel</c> completes, a kernel, full set of modules and
397     <e>initial root disk</e> (initrd) will be created. We will use the kernel
398     and initrd when configuring a boot loader later in this document. Write
399     down the names of the kernel and initrd as you will need it when writing
400     the bootloader configuration file. The initrd will be started immediately after
401 swift 1.21 booting to perform hardware autodetection (just like on the Installation CD) before
402 swift 1.1 your "real" system starts up.
403     </p>
404    
405     <pre caption="Checking the created kernel image name and initrd">
406     # <i>ls /boot/kernel* /boot/initrd*</i>
407     </pre>
408    
409     <p>
410 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
411 swift 1.14 is needed to boot your system, <c>coldplug</c> autodetects everything else.
412     To emerge and enable <c>coldplug</c>, type the following:
413 swift 1.1 </p>
414    
415 swift 1.14 <pre caption="Emerging and enabling coldplug">
416     # <i>emerge coldplug</i>
417 swift 1.17 # <i>rc-update add coldplug boot</i>
418     </pre>
419    
420     <p>
421     If you want your system to react to hotplugging events, you would need to
422     install and setup hotplug as well:
423     </p>
424    
425     <pre caption="Emerging and enabling hotplug">
426     # <i>emerge hotplug</i>
427     # <i>rc-update add hotplug default</i>
428 swift 1.1 </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 swift 1.21 <ti>x11-drm</ti>
454 swift 1.1 <ti>
455     Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
456 swift 1.21 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 swift 1.1 </ti>
460 swift 1.21 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
461 swift 1.1 </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 swift 1.21 --pretend</c>. For instance, for the <c>x11-drm</c> package:
468 swift 1.1 </p>
469    
470     <pre caption="View full installation package listing">
471 swift 1.21 # <i>emerge --pretend x11-drm</i>
472 swift 1.1 </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     Now run <c>modules-update</c> to commit your changes to the
513     <path>/etc/modules.conf</path> file:
514     </p>
515    
516     <pre caption="Running modules-update">
517     # <i>modules-update</i>
518     </pre>
519    
520     <p>
521     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
522     your System</uri>.
523     </p>
524    
525     </body>
526     </subsection>
527     </section>
528     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20