/[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.4 - (hide annotations) (download) (as text)
Fri Jul 9 10:27:36 2004 UTC (10 years, 5 months ago) by neysx
Branch: MAIN
Changes since 1.3: +19 -18 lines
File MIME type: application/xml
#56065: make kernel options easier to find in 2.4 & 2.6 kernels

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

  ViewVC Help
Powered by ViewVC 1.1.20