/[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.42 - (hide annotations) (download) (as text)
Sun Jul 29 22:48:00 2007 UTC (7 years, 3 months ago) by nightmorph
Branch: MAIN
Changes since 1.41: +5 -7 lines
File MIME type: application/xml
use a simple modprobe -l command, bug 187000

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.42 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-alpha-kernel.xml,v 1.41 2007/05/20 20:32:23 nightmorph Exp $ -->
8 swift 1.1
9     <sections>
10 swift 1.11
11 nightmorph 1.42 <version>8.2</version>
12     <date>2007-07-29</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.39 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 neysx 1.39 indicate the expected zones. For instance, <path>GMT-8</path> is in fact
24     GMT+8.
25 swift 1.1 </p>
26    
27     <pre caption="Setting the timezone information">
28     # <i>ls /usr/share/zoneinfo</i>
29     <comment>(Suppose you want to use GMT)</comment>
30 neysx 1.39 # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
31 swift 1.1 </pre>
32    
33     </body>
34     </section>
35     <section>
36     <title>Installing the Sources</title>
37     <subsection>
38     <title>Choosing a Kernel</title>
39     <body>
40    
41     <p>
42     The core around which all distributions are built is the Linux kernel. It is the
43     layer between the user programs and your system hardware. Gentoo provides its
44     users several possible kernel sources. A full listing with description is
45     available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
46     Guide</uri>.
47     </p>
48    
49     <p>
50 nightmorph 1.38 For alpha-based systems we have <c>gentoo-sources</c> (the default 2.6 kernel
51     source).
52 swift 1.1 </p>
53    
54     <pre caption="Installing a kernel source">
55 nightmorph 1.38 # <i>emerge gentoo-sources</i>
56 swift 1.1 </pre>
57    
58     <p>
59     When you take a look in <path>/usr/src</path> you should see a symlink called
60 neysx 1.33 <path>linux</path> pointing to your kernel source. In this case, the installed
61 nightmorph 1.38 kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
62     Your version may be different, so keep this in mind.
63 swift 1.1 </p>
64    
65     <pre caption="Viewing the kernel source symlink">
66     # <i>ls -l /usr/src/linux</i>
67 nightmorph 1.38 lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
68 swift 1.1 </pre>
69    
70     <p>
71 nightmorph 1.38 Now it is time to configure and compile your kernel source. You can use
72     <c>genkernel</c> for this, which will build a generic kernel as used by the
73     Installation CD. We explain the "manual" configuration first though, as it is
74 swift 1.1 the best way to optimize your environment.
75     </p>
76    
77     <p>
78     If you want to manually configure your kernel, continue now with <uri
79 nightmorph 1.38 link="#manual">Default: Manual Configuration</uri>. If you want to use
80     <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
81 swift 1.1 genkernel</uri> instead.
82     </p>
83    
84     </body>
85     </subsection>
86     </section>
87     <section id="manual">
88     <title>Default: Manual Configuration</title>
89     <subsection>
90     <title>Introduction</title>
91     <body>
92    
93     <p>
94 neysx 1.7 Manually configuring a kernel is often seen as the most difficult procedure a
95 neysx 1.8 Linux user ever has to perform. Nothing is less true -- after configuring a
96 swift 1.1 couple of kernels you don't even remember that it was difficult ;)
97     </p>
98    
99     <p>
100     However, one thing <e>is</e> true: you must know your system when you start
101 swift 1.24 configuring a kernel manually. Most information can be gathered by emerging
102 swift 1.25 pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
103 swift 1.24 be able to use <c>lspci</c> within the chrooted environment. You may safely
104     ignore any <e>pcilib</e> warnings (like pcilib: cannot open
105     /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
106 swift 1.25 <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
107 swift 1.24 You can also run <c>lsmod</c> to see what kernel modules the Installation CD
108     uses (it might provide you with a nice hint on what to enable).
109 swift 1.1 </p>
110    
111     <p>
112     Now go to your kernel source directory and execute <c>make menuconfig</c>. This
113     will fire up an ncurses-based configuration menu.
114     </p>
115    
116     <pre caption="Invoking menuconfig">
117     # <i>cd /usr/src/linux</i>
118     # <i>make menuconfig</i>
119     </pre>
120    
121     <p>
122     You will be greeted with several configuration sections. We'll first list some
123     options you must activate (otherwise Gentoo will not function, or not function
124     properly without additional tweaks).
125     </p>
126    
127     </body>
128     </subsection>
129     <subsection>
130     <title>Activating Required Options</title>
131     <body>
132    
133     <p>
134     First of all, activate the use of development and experimental code/drivers.
135     You need this, otherwise some very important code/drivers won't show up:
136     </p>
137    
138 fox2mike 1.26 <pre caption="Selecting experimental code/drivers, General setup">
139 swift 1.1 Code maturity level options ---&gt;
140     [*] Prompt for development and/or incomplete code/drivers
141 fox2mike 1.26 General setup ---&gt;
142     [*] Support for hot-pluggable devices
143 swift 1.1 </pre>
144    
145     <p>
146     Now go to <c>File Systems</c> and select support for the filesystems you use.
147     <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
148 vapier 1.22 able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
149 nightmorph 1.38 file system</c>.
150 swift 1.1 </p>
151    
152     <pre caption="Selecting necessary file systems">
153 neysx 1.4 File systems ---&gt;
154     Pseudo Filesystems ---&gt;
155     [*] /proc file system support
156     [*] Virtual memory file system support (former shm fs)
157 swift 1.1
158     <comment>(Select one or more of the following options as needed by your system)</comment>
159     &lt;*&gt; Reiserfs support
160     &lt;*&gt; Ext3 journalling file system support
161     &lt;*&gt; JFS filesystem support
162     &lt;*&gt; Second extended fs support
163     &lt;*&gt; XFS filesystem support
164     </pre>
165    
166     <p>
167     If you are using PPPoE to connect to the Internet or you are using a dial-up
168     modem, you will need the following options in the kernel:
169     </p>
170    
171     <pre caption="Selecting PPPoE necessary drivers">
172 neysx 1.4 Device Drivers ---&gt;
173     Networking support ---&gt;
174     &lt;*&gt; PPP (point-to-point protocol) support
175     &lt;*&gt; PPP support for async serial ports
176     &lt;*&gt; PPP support for sync tty ports
177 swift 1.1 </pre>
178    
179     <p>
180     The two compression options won't harm but are not definitely needed, neither
181 nightmorph 1.38 does the <c>PPP over Ethernet</c> option, that might only be used by <c>ppp</c>
182     when configured to do kernel mode PPPoE.
183 swift 1.1 </p>
184    
185     <p>
186     If you require it, don't forget to include support in the kernel for your
187     ethernet card.
188     </p>
189    
190     <p>
191 vapier 1.9 The following options are recommended as well:
192 swift 1.1 </p>
193    
194 vapier 1.9 <pre caption="Recommended Alpha options">
195 swift 1.1 General setup ---&gt;
196     &lt;*&gt; SRM environment through procfs
197     &lt;*&gt; Configure uac policy via sysctl
198    
199     Plug and Play configuration ---&gt;
200     &lt;*&gt; Plug and Play support
201     &lt;M&gt; ISA Plug and Play support
202    
203     SCSI support ---&gt;
204     SCSI low-level drivers ---&gt;
205     &lt;*&gt; SYM53C8XX Version 2 SCSI support (NEW)
206     &lt;*&gt; Qlogic ISP SCSI support
207    
208     Network device support ---&gt;
209     Ethernet (10 or 100 Mbit) ---&gt;
210     &lt;M&gt; DECchip Tulip (dc21x4x) PCI support
211     &lt;M&gt; Generic DECchip &amp; DIGITAL EtherWORKS PCI/EISA
212     &lt;M&gt; EtherExpressPro/100 support (eepro100)
213     &lt;M&gt; EtherExpressPro/100 support (e100)
214     Ethernet (1000 Mbit) ---&gt;
215     &lt;M&gt; Alteon AceNIC
216     [*] Omit support for old Tigon I
217     &lt;M&gt; Broadcom Tigon3
218     [*] FDDI driver support
219     &lt;M&gt; Digital DEFEA and DEFPA
220     &lt;*&gt; PPP support
221     &lt;*&gt; PPP Deflate compression
222    
223     Character devices ---&gt;
224     [*] Support for console on serial port
225     [*] Direct Rendering Manager
226    
227     File systems ---&gt;
228     &lt;*&gt; Kernel automounter version 4 support
229     Network File Systems ---&gt;
230     &lt;*&gt; NFS
231     [*] NFSv3 client
232     &lt;*&gt; NFS server
233     [*] NFSv3 server
234     Partition Types ---&gt;
235     [*] Advanced partition selection
236     [*] Alpha OSF partition support
237     Native Language Support
238     &lt;*&gt; NLS ISO 8859-1
239    
240     Sound ---&gt;
241     &lt;M&gt; Sound card support
242     &lt;M&gt; OSS sound modules
243     [*] Verbose initialisation
244     [*] Persistent DMA buffers
245     &lt;M&gt; 100% Sound Blaster compatibles
246     </pre>
247    
248     <p>
249     When you've finished configuring the kernel, continue with <uri
250     link="#compiling">Compiling and Installing</uri>.
251     </p>
252    
253     </body>
254     </subsection>
255     <subsection id="compiling">
256     <title>Compiling and Installing</title>
257     <body>
258    
259     <p>
260     Now that your kernel is configured, it is time to compile and install it. Exit
261 swift 1.20 the configuration and start the compilation process:
262 swift 1.1 </p>
263    
264     <pre caption="Compiling the kernel">
265     # <i>make &amp;&amp; make modules_install</i>
266 vapier 1.6 # <i>make boot</i>
267 swift 1.1 </pre>
268    
269     <p>
270 neysx 1.7 When the kernel has finished compiling, copy the kernel image to
271 neysx 1.33 <path>/boot</path>. Recent kernels might create <path>vmlinux</path> instead of
272     <path>vmlinux.gz</path>. Keep this in mind when you copy your kernel image.
273 swift 1.1 </p>
274    
275     <pre caption="Installing the kernel">
276 vapier 1.6 # <i>cp arch/alpha/boot/vmlinux.gz /boot/</i>
277 swift 1.1 </pre>
278    
279     <p>
280     Now continue with <uri link="#kernel_modules">Installing Separate Kernel
281     Modules</uri>.
282     </p>
283    
284     </body>
285     </subsection>
286     </section>
287     <section id="genkernel">
288     <title>Alternative: Using genkernel</title>
289     <body>
290    
291     <p>
292     If you are reading this section, you have chosen to use our <c>genkernel</c>
293     script to configure your kernel for you.
294     </p>
295    
296     <p>
297 nightmorph 1.38 Now that your kernel source tree is installed, it's now time to compile your
298     kernel by using our <c>genkernel</c> script to automatically build a kernel for
299     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
300     way our Installation CD kernel is configured. This means that when you use
301     <c>genkernel</c> to build your kernel, your system will generally detect all
302     your hardware at boot-time, just like our Installation CD does. Because
303     genkernel doesn't require any manual kernel configuration, it is an ideal
304     solution for those users who may not be comfortable compiling their own
305     kernels.
306 swift 1.1 </p>
307    
308     <p>
309     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
310     </p>
311    
312     <pre caption="Emerging genkernel">
313     # <i>emerge genkernel</i>
314     </pre>
315    
316     <p>
317     Now, compile your kernel sources by running <c>genkernel all</c>.
318     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
319     hardware, this compilation will take quite a while to finish!
320     </p>
321    
322     <p>
323     Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
324     need to manually configure your kernel using <c>genkernel --menuconfig all</c>
325     and add support for your filesystem <e>in</e> the kernel (i.e. <e>not</e> as a
326     module).
327     </p>
328    
329     <pre caption="Running genkernel">
330     # <i>genkernel all</i>
331     </pre>
332    
333     <p>
334 nightmorph 1.38 Once <c>genkernel</c> completes, a kernel, full set of modules and <e>initial
335     root disk</e> (initrd) will be created. We will use the kernel and initrd when
336     configuring a boot loader later in this document. Write down the names of the
337     kernel and initrd as you will need it when writing the bootloader configuration
338     file. The initrd will be started immediately after booting to perform hardware
339     autodetection (just like on the Installation CD) before your "real" system
340     starts up.
341 swift 1.1 </p>
342    
343     <pre caption="Checking the created kernel image name and initrd">
344 swift 1.29 # <i>ls /boot/kernel* /boot/initramfs-*</i>
345 swift 1.1 </pre>
346    
347     </body>
348     </section>
349     <section id="kernel_modules">
350     <title>Installing Separate Kernel Modules</title>
351     <subsection>
352     <title>Configuring the Modules</title>
353     <body>
354    
355     <p>
356 nightmorph 1.38 You should list the modules you want automatically loaded in
357     <path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
358     the modules too if you want.
359 swift 1.1 </p>
360    
361     <p>
362 nightmorph 1.42 To view all available modules, run the following command:
363 swift 1.1 </p>
364    
365     <pre caption="Viewing all available modules">
366 nightmorph 1.42 # <i>modprobe -l</i>
367 swift 1.1 </pre>
368    
369     <p>
370     For instance, to automatically load the <c>3c59x.o</c> module, edit the
371 nightmorph 1.38 <path>kernel-2.6</path> file and enter the module name in it.
372 swift 1.1 </p>
373    
374 nightmorph 1.38 <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
375     # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
376 swift 1.1 </pre>
377    
378 nightmorph 1.38 <pre caption="/etc/modules.autoload.d/kernel-2.6">
379 swift 1.1 3c59x
380     </pre>
381    
382     <p>
383     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
384     your System</uri>.
385     </p>
386    
387     </body>
388     </subsection>
389     </section>
390     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20