/[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.14 - (hide annotations) (download) (as text)
Sat Jan 12 22:51:31 2008 UTC (6 years, 8 months ago) by neysx
Branch: MAIN
Changes since 1.13: +5 -7 lines
File MIME type: application/xml
Name of first menu item changed in make menuconfig

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