/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml
Gentoo

Contents of /xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download) (as text)
Tue Mar 13 00:30:09 2007 UTC (7 years, 5 months ago) by nightmorph
Branch: MAIN
Changes since 1.3: +3 -21 lines
File MIME type: application/xml
Remove all references to coldplug, bug 170679

1 vapier 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/2.5 -->
6    
7 nightmorph 1.4 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-ia64-kernel.xml,v 1.3 2007/02/26 08:54:53 nightmorph Exp $ -->
8 vapier 1.1
9     <sections>
10    
11 nightmorph 1.4 <version>7.4</version>
12     <date>2007-03-12</date>
13 vapier 1.1
14     <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 copy
21     it to <path>/etc/localtime</path>. Please avoid the
22     <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     </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     # <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
30     </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 nightmorph 1.3 For IA64 systems, we will use <c>gentoo-sources</c> (contains additional patches
50     for performance and stability).
51 vapier 1.1 </p>
52    
53     <p>
54 nightmorph 1.3 Now install it using <c>emerge</c>.
55 vapier 1.1 </p>
56    
57     <pre caption="Installing a kernel source">
58 nightmorph 1.3 # <i>emerge gentoo-sources</i>
59 vapier 1.1 </pre>
60    
61     <p>
62     When you take a look in <path>/usr/src</path> you should see a symlink called
63     <path>linux</path> pointing to your kernel source. In this case, the installed
64     kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
65     Your version may be different, so keep this in mind.
66     </p>
67    
68     <pre caption="Viewing the kernel source symlink">
69     # <i>ls -l /usr/src/linux</i>
70     lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -&gt; linux-<keyval id="kernel-version"/>
71     </pre>
72    
73     <p>
74     Now it is time to configure and compile your kernel source. You can use
75     <c>genkernel</c> for this, which will build a generic kernel as used by the
76     Installation CD. We explain the "manual" configuration first though, as it is
77     the best way to optimize your environment.
78     </p>
79    
80     <p>
81     If you want to manually configure your kernel, continue now with <uri
82     link="#manual">Default: Manual Configuration</uri>. If you want to use
83     <c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
84     genkernel</uri> instead.
85     </p>
86    
87     </body>
88     </subsection>
89     </section>
90     <section id="manual">
91     <title>Default: Manual Configuration</title>
92     <subsection>
93     <title>Introduction</title>
94     <body>
95    
96     <p>
97     Manually configuring a kernel is often seen as the most difficult procedure a
98     Linux user ever has to perform. Nothing is less true -- after configuring a
99     couple of kernels you don't even remember that it was difficult ;)
100     </p>
101    
102     <p>
103     However, one thing <e>is</e> true: you must know your system when you start
104     configuring a kernel manually. Most information can be gathered by emerging
105     pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
106     be able to use <c>lspci</c> within the chrooted environment. You may safely
107     ignore any <e>pcilib</e> warnings (like pcilib: cannot open
108     /sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
109     <c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
110     You can also run <c>lsmod</c> to see what kernel modules the Installation CD
111     uses (it might provide you with a nice hint on what to enable).
112     </p>
113    
114     <p>
115     Now go to your kernel source directory and execute <c>make menuconfig</c>. This
116     will fire up an ncurses-based configuration menu.
117     </p>
118    
119     <pre caption="Invoking menuconfig">
120     # <i>cd /usr/src/linux</i>
121     # <i>make menuconfig</i>
122     </pre>
123    
124     <p>
125     You will be greeted with several configuration sections. We'll first list some
126     options you must activate (otherwise Gentoo will not function, or not function
127     properly without additional tweaks).
128     </p>
129    
130     </body>
131     </subsection>
132     <subsection>
133     <title>Activating Required Options</title>
134     <body>
135    
136     <p>
137     First of all, activate the use of development and experimental code/drivers.
138     You need this, otherwise some very important code/drivers won't show up:
139     </p>
140    
141     <pre caption="Selecting experimental code/drivers, General setup">
142     Code maturity level options ---&gt;
143     [*] Prompt for development and/or incomplete code/drivers
144     General setup ---&gt;
145     [*] Support for hot-pluggable devices
146     </pre>
147    
148     <p>
149     Make sure that every driver that is vital to the booting of your system (such as
150     SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module,
151     otherwise your system will not be able to boot completely.
152     </p>
153    
154     <p>
155     Now select the correct system type and processor type. If you don't know what
156     kind of IA64 system type you have, <c>DIG-compliant</c> is a good default
157     choice. If you are installing on an SGI system make sure you select the
158     SGI system type, your kernel may just lock up and refuse to boot otherwise.
159     </p>
160    
161     <pre caption="Selecting correct system type">
162     System type ---&gt;
163     <comment>(Change according to your system)</comment>
164     <i>DIG-compliant</i>
165     Processor type ---&gt;
166     <comment>(Change according to your system)</comment>
167     <i>Itanium 2</i>
168     </pre>
169    
170     <p>
171     Now go to <c>File Systems</c> and select support for the filesystems you use.
172     <e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
173     able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
174     file system</c>.
175     </p>
176    
177     <pre caption="Selecting necessary file systems">
178     File systems ---&gt;
179     Pseudo Filesystems ---&gt;
180     [*] /proc file system support
181     [*] Virtual memory file system support (former shm fs)
182    
183     <comment>(Select one or more of the following options as needed by your system)</comment>
184     &lt;*&gt; Reiserfs support
185     &lt;*&gt; Ext3 journalling file system support
186     &lt;*&gt; JFS filesystem support
187     &lt;*&gt; Second extended fs support
188     &lt;*&gt; XFS filesystem support
189    
190     <comment>(Be sure to enable VFAT support for the EFI partition)</comment>
191     DOS/FAT/NT Filesystems --->
192     &lt;*&gt; VFAT (Windows-95) fs support
193     </pre>
194    
195     <p>
196     Do not forget to enable DMA for your drives:
197     </p>
198    
199     <pre caption="Activating DMA">
200     Device Drivers ---&gt;
201     ATA/ATAPI/MFM/RLL support ---&gt;
202     [*] Generic PCI bus-master DMA support
203     [*] Use PCI DMA by default when available
204     </pre>
205    
206     <p>
207     If you are using PPPoE to connect to the Internet or you are using a dial-up
208     modem, you will need the following options in the kernel:
209     </p>
210    
211     <pre caption="Selecting PPPoE necessary drivers">
212     Device Drivers ---&gt;
213     Networking Support ---&gt;
214     &lt;*&gt; PPP (point-to-point protocol) support
215     &lt;*&gt; PPP support for async serial ports
216     &lt;*&gt; PPP support for sync tty ports
217     </pre>
218    
219     <p>
220     The two compression options won't harm but are not definitely needed, neither
221     does the <c>PPP over Ethernet</c> option, that might only be used by
222     <c>rp-pppoe</c> when configured to do kernel mode PPPoE.
223     </p>
224    
225     <p>
226     If you require it, don't forget to include support in the kernel for your
227     ethernet card.
228     </p>
229    
230     <p>
231     If you have an Intel CPU that supports HyperThreading (tm), or you have a
232     multi-CPU system, you should activate "Symmetric multi-processing support":
233     </p>
234    
235     <pre caption="Activating SMP support">
236     Processor type and features ---&gt;
237     [*] Symmetric multi-processing support
238     </pre>
239    
240     <p>
241     If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
242     those as well:
243     </p>
244    
245     <pre caption="Activating USB Support for Input Devices">
246     Device Drivers ---&gt;
247     USB Support ---&gt;
248     &lt;*&gt; USB Human Interface Device (full HID) support
249     </pre>
250    
251     <p>
252     When you've finished configuring the kernel, continue with <uri
253     link="#compiling">Compiling and Installing</uri>.
254     </p>
255    
256     </body>
257     </subsection>
258     <subsection id="compiling">
259     <title>Compiling and Installing</title>
260     <body>
261    
262     <p>
263     Now that your kernel is configured, it is time to compile and install it. Exit
264     the configuration and start the compilation process:
265     </p>
266    
267     <pre caption="Compiling the kernel">
268     # <i>make &amp;&amp; make modules_install</i>
269     </pre>
270    
271     <p>
272     When the kernel has finished compiling, copy the kernel image to
273     <path>/boot</path>. Use whatever name you feel is appropriate for your kernel
274     choice and remember it as you will need it later on when you configure your
275     bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
276     name and version of your kernel.
277     </p>
278    
279     <pre caption="Installing the kernel">
280     # <i>cp vmlinux.gz /boot/<keyval id="kernel-name"/></i>
281     </pre>
282    
283     <p>
284     Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
285     </p>
286    
287     </body>
288     </subsection>
289     </section>
290     <section id="genkernel">
291     <title>Alternative: Using genkernel</title>
292     <body>
293    
294     <p>
295     If you are reading this section, you have chosen to use our <c>genkernel</c>
296     script to configure your kernel for you.
297     </p>
298    
299     <p>
300     Now that your kernel source tree is installed, it's now time to compile your
301     kernel by using our <c>genkernel</c> script to automatically build a kernel for
302     you. <c>genkernel</c> works by configuring a kernel nearly identically to the
303     way our Installation CD kernel is configured. This means that when you use
304     <c>genkernel</c> to build your kernel, your system will generally detect all
305     your hardware at boot-time, just like our Installation CD does. Because
306     genkernel doesn't require any manual kernel configuration, it is an ideal
307     solution for those users who may not be comfortable compiling their own kernels.
308     </p>
309    
310     <p>
311     Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
312     </p>
313    
314     <pre caption="Emerging genkernel">
315     # <i>emerge genkernel</i>
316     </pre>
317    
318     <p>
319     Now, compile your kernel sources by running <c>genkernel --udev all</c>.
320     Be aware though, as <c>genkernel</c> compiles a kernel that supports almost all
321     hardware, this compilation will take quite a while to finish!
322     </p>
323    
324     <note>
325     Users of EVMS2 or LVM2 will probably want to add
326     <c>--evms2</c> or <c>--lvm2</c> to the genkernel command-line.
327     </note>
328    
329     <pre caption="Running genkernel">
330     # <i>genkernel --udev all</i>
331     </pre>
332    
333     <p>
334     Once <c>genkernel</c> completes, a kernel, full set of modules and
335     <e>initial root disk</e> (initrd) will be created. We will use the kernel
336     and initrd when configuring a boot loader later in this document. Write
337     down the names of the kernel and initrd as you will need it when writing
338     the bootloader configuration file. The initrd will be started immediately after
339     booting to perform hardware autodetection (just like on the Installation CD)
340     before your "real" system starts up.
341     </p>
342    
343     <pre caption="Checking the created kernel image name and initrd">
344     # <i>ls /boot/kernel* /boot/initramfs*</i>
345     </pre>
346    
347     </body>
348     </section>
349     <section id="kernel_modules">
350     <title>Kernel Modules</title>
351     <subsection>
352     <title>Configuring the Modules</title>
353     <body>
354    
355     <p>
356     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     </p>
360    
361     <p>
362     To view all available modules, run the following <c>find</c> command. Don't
363     forget to substitute <c><keyval id="kernel-version"/></c> with the version of
364     the kernel you just compiled:
365     </p>
366    
367     <pre caption="Viewing all available modules">
368     # <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
369     </pre>
370    
371     <p>
372     For instance, to automatically load the <c>3c59x.o</c> module, edit the
373     <path>kernel-2.6</path> file and enter the module name in it.
374     </p>
375    
376     <pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
377     # <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
378     </pre>
379    
380     <pre caption="/etc/modules.autoload.d/kernel-2.6">
381     3c59x
382     </pre>
383    
384     <p>
385     Continue the installation with <uri link="?part=1&amp;chap=8">Configuring
386     your System</uri>.
387     </p>
388    
389     </body>
390     </subsection>
391     </section>
392     </sections>

  ViewVC Help
Powered by ViewVC 1.1.20