/[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.37 - (hide annotations) (download) (as text)
Tue Mar 13 00:30:09 2007 UTC (7 years, 4 months ago) by nightmorph
Branch: MAIN
Changes since 1.36: +3 -21 lines
File MIME type: application/xml
Remove all references to coldplug, bug 170679

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 nightmorph 1.37 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.36 2007/02/26 08:54:53 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.11
11 nightmorph 1.37 <version>7.3</version>
12     <date>2007-03-12</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 nightmorph 1.36 In the next example we install <c>vanilla-sources</c>. Of course substitute with
58     your choice of sources, this is merely an example.
59 swift 1.1 </p>
60    
61     <pre caption="Installing a kernel source">
62 nightmorph 1.36 # <i>emerge vanilla-sources</i>
63 swift 1.1 </pre>
64    
65     <p>
66     When you take a look in <path>/usr/src</path> you should see a symlink called
67 neysx 1.33 <path>linux</path> pointing to your kernel source. In this case, the installed
68 nightmorph 1.34 kernel source points to <c>vanilla-sources-2.6.16.19</c>. Your version may be
69 neysx 1.33 different, so keep this in mind.
70 swift 1.1 </p>
71    
72     <pre caption="Viewing the kernel source symlink">
73     # <i>ls -l /usr/src/linux</i>
74 nightmorph 1.34 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-2.6.16.19
75 swift 1.1 </pre>
76    
77     <p>
78     Now it is time to configure and compile your kernel source. You
79     can use <c>genkernel</c> for this, which will build a generic kernel as used
80 swift 1.21 by the Installation CD. We explain the "manual" configuration first though, as it is
81 swift 1.1 the best way to optimize your environment.
82     </p>
83    
84     <p>
85     If you want to manually configure your kernel, continue now with <uri
86     link="#manual">Default: Manual Configuration</uri>. If you want to use
87     <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
88     genkernel</uri> instead.
89     </p>
90    
91     </body>
92     </subsection>
93     </section>
94     <section id="manual">
95     <title>Default: Manual Configuration</title>
96     <subsection>
97     <title>Introduction</title>
98     <body>
99    
100     <p>
101 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
102 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
103 swift 1.1 couple of kernels you don't even remember that it was difficult ;)
104     </p>
105    
106     <p>
107     However, one thing <e>is</e> true: you must know your system when you start
108 swift 1.24 configuring a kernel manually. Most information can be gathered by emerging
109 swift 1.25 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
110 swift 1.24 be able to use <c>lspci</c> within the chrooted environment. You may safely
111     ignore any <e>pcilib</e> warnings (like pcilib: cannot open
112     /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
113 swift 1.25 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
114 swift 1.24 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
115     uses (it might provide you with a nice hint on what to enable).
116 swift 1.1 </p>
117    
118     <p>
119     Now go to your kernel source directory and execute <c>make menuconfig</c>. This
120     will fire up an ncurses-based configuration menu.
121     </p>
122    
123     <pre caption="Invoking menuconfig">
124     # <i>cd /usr/src/linux</i>
125     # <i>make menuconfig</i>
126     </pre>
127    
128     <p>
129     You will be greeted with several configuration sections. We'll first list some
130     options you must activate (otherwise Gentoo will not function, or not function
131     properly without additional tweaks).
132     </p>
133    
134     </body>
135     </subsection>
136     <subsection>
137     <title>Activating Required Options</title>
138     <body>
139    
140     <p>
141     First of all, activate the use of development and experimental code/drivers.
142     You need this, otherwise some very important code/drivers won't show up:
143     </p>
144    
145 fox2mike 1.26 <pre caption="Selecting experimental code/drivers, General setup">
146 swift 1.1 Code maturity level options ---&gt;
147     [*] Prompt for development and/or incomplete code/drivers
148 fox2mike 1.26 General setup ---&gt;
149     [*] Support for hot-pluggable devices
150 swift 1.1 </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 vapier 1.22 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
156     file system</c>. If you are using a 2.4 kernel, you should also select the
157     <c>/dev file system</c> and <c>Automatically mount at boot</c> options, and
158     you should make sure to <c>emerge devfsd</c>.
159 swift 1.1 </p>
160    
161     <pre caption="Selecting necessary file systems">
162 neysx 1.4 <comment>(With a 2.4.x kernel)</comment>
163 swift 1.1 File systems ---&gt;
164     [*] Virtual memory file system support (former shm fs)
165     [*] /proc file system support
166     [*] /dev file system support (EXPERIMENTAL)
167     [*] Automatically mount at boot
168 neysx 1.4 [ ] /dev/pts file system for Unix98 PTYs
169 swift 1.1
170 neysx 1.4 <comment>(With a 2.6.x kernel)</comment>
171     File systems ---&gt;
172     Pseudo Filesystems ---&gt;
173     [*] /proc file system support
174     [*] 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 neysx 1.33 <path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
303     <path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
304 swift 1.1 </p>
305    
306     <pre caption="Installing the kernel">
307 vapier 1.6 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
308 swift 1.1 </pre>
309    
310     <p>
311     Now continue with <uri link="#kernel_modules">Installing Separate Kernel
312     Modules</uri>.
313     </p>
314    
315     </body>
316     </subsection>
317     </section>
318     <section id="genkernel">
319     <title>Alternative: Using genkernel</title>
320     <body>
321    
322     <p>
323     If you are reading this section, you have chosen to use our <c>genkernel</c>
324     script to configure your kernel for you.
325     </p>
326    
327     <p>
328     Now that your kernel source tree is installed, it's now time to compile your
329     kernel by using our <c>genkernel</c> script to automatically build a kernel for
330     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
331 swift 1.21 way our Installation CD kernel is configured. This means that when you use
332 swift 1.1 <c>genkernel</c> to build your kernel, your system will generally detect all
333 swift 1.21 your hardware at boot-time, just like our Installation CD does. Because genkernel
334 swift 1.1 doesn't require any manual kernel configuration, it is an ideal solution for
335     those users who may not be comfortable compiling their own kernels.
336     </p>
337    
338     <p>
339     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
340     </p>
341    
342     <pre caption="Emerging genkernel">
343     # <i>emerge genkernel</i>
344     </pre>
345    
346     <p>
347     Now, compile your kernel sources by running <c>genkernel all</c>.
348     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
349     hardware, this compilation will take quite a while to finish!
350     </p>
351    
352     <p>
353     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
354     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
355     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
356     module).
357     </p>
358    
359     <pre caption="Running genkernel">
360     # <i>genkernel all</i>
361 nightmorph 1.34 * Gentoo Linux Genkernel; Version 3.4.0
362     * Running with options: all
363    
364     * Linux Kernel 2.6.16.19 for alpha...
365     * kernel: >> Running mrproper...
366 swift 1.1 <comment>(Output removed to increase readability)</comment>
367     * Kernel compiled successfully!
368 nightmorph 1.34 *
369     * Required Kernel Parameters:
370     * real_root=/dev/$ROOT
371     *
372     * Where $ROOT is the device node for your root partition as the
373     * one specified in /etc/fstab
374     *
375     * If you require Genkernel's hardware detection features; you MUST
376     * tell your bootloader to use the provided INITRAMFS file. Otherwise;
377     * substitute the root argument for the real_root argument if you are
378     * not planning to use the initrd...
379    
380     * WARNING... WARNING... WARNING...
381     * Additional kernel cmdline arguments that *may* be required to boot properly...
382     * Do NOT report kernel bugs as genkernel bugs unless your bug
383     * is about the default genkernel configuration...
384     *
385     * Make sure you have the latest genkernel before reporting bugs.
386 swift 1.1 </pre>
387    
388     <p>
389     Once <c>genkernel</c> completes, a kernel, full set of modules and
390     <e>initial root disk</e> (initrd) will be created. We will use the kernel
391     and initrd when configuring a boot loader later in this document. Write
392     down the names of the kernel and initrd as you will need it when writing
393     the bootloader configuration file. The initrd will be started immediately after
394 swift 1.21 booting to perform hardware autodetection (just like on the Installation CD) before
395 swift 1.1 your "real" system starts up.
396     </p>
397    
398     <pre caption="Checking the created kernel image name and initrd">
399 swift 1.29 # <i>ls /boot/kernel* /boot/initramfs-*</i>
400 swift 1.1 </pre>
401    
402     </body>
403     </section>
404     <section id="kernel_modules">
405     <title>Installing Separate Kernel Modules</title>
406     <subsection>
407     <title>Installing Extra Modules</title>
408     <body>
409    
410     <p>
411     If appropriate, you should emerge ebuilds for any additional hardware that is
412     on your system. Here is a list of kernel-related ebuilds that you could emerge:
413     </p>
414    
415     <table>
416     <tcolumn width="1in"/>
417     <tcolumn width="4in"/>
418     <tcolumn width="2in"/>
419     <tr>
420     <th>Ebuild</th>
421     <th>Purpose</th>
422     <th>Command</th>
423     </tr>
424     <tr>
425 swift 1.21 <ti>x11-drm</ti>
426 swift 1.1 <ti>
427     Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and
428 swift 1.21 other cards for xorg-x11. Please check the <c>IUSE_VIDEO_CARDS</c> variable
429     in the <path>/usr/portage/x11-base/x11-drm</path> ebuilds to see what you
430     need to fill in as <c>yourcard</c>.
431 swift 1.1 </ti>
432 swift 1.21 <ti><c>VIDEO_CARDS="yourcard" emerge x11-drm</c></ti>
433 swift 1.1 </tr>
434     </table>
435    
436     <p>
437     Beware though, some of these ebuilds might deal with big dependencies. To verify
438     what packages will be installed by emerging an ebuild, use <c>emerge
439 swift 1.21 --pretend</c>. For instance, for the <c>x11-drm</c> package:
440 swift 1.1 </p>
441    
442     <pre caption="View full installation package listing">
443 swift 1.21 # <i>emerge --pretend x11-drm</i>
444 swift 1.1 </pre>
445    
446     </body>
447     </subsection>
448     <subsection>
449     <title>Configuring the Modules</title>
450     <body>
451    
452     <p>
453     You should list the modules you want automatically loaded in
454     <path>/etc/modules.autoload.d/kernel-2.4</path> (or <path>kernel-2.6</path>).
455     You can add extra options to the modules too if you want.
456     </p>
457    
458     <p>
459     To view all available modules, run the following <c>find</c> command. Don't
460     forget to substitute "&lt;kernel version&gt;" with the version of the kernel you
461     just compiled:
462     </p>
463    
464     <pre caption="Viewing all available modules">
465     # <i>find /lib/modules/&lt;kernel version&gt;/ -type f -iname '*.o' -or -iname '*.ko'</i>
466     </pre>
467    
468     <p>
469     For instance, to automatically load the <c>3c59x.o</c> module, edit the
470     <path>kernel-2.4</path> or <path>kernel-2.6</path> file and enter the module
471     name in it.
472     </p>
473    
474     <pre caption="Editing /etc/modules.autoload.d/kernel-2.4">
475     <comment>(Example for 2.4 kernels)</comment>
476     # <i>nano -w /etc/modules.autoload.d/kernel-2.4</i>
477     </pre>
478    
479     <pre caption="/etc/modules.autoload.d/kernel-2.4 or kernel-2.6">
480     3c59x
481     </pre>
482    
483     <p>
484     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
485     your System</uri>.
486     </p>
487    
488     </body>
489     </subsection>
490     </section>
491     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20