/[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.40 - (hide annotations) (download) (as text)
Sun May 20 04:16:25 2007 UTC (8 years, 8 months ago) by nightmorph
Branch: MAIN
Changes since 1.39: +14 -3 lines
File MIME type: application/xml
for safety's sake, needed to move the conf.d/clock TIMEZONE edit to immediately before compiling a kernel. users still run into the warning message if it's left at the end, before rebooting. fixes http://forums.gentoo.org/viewtopic-t-560322.html and other reports.

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

  ViewVC Help
Powered by ViewVC 1.1.20