/[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.28 - (hide annotations) (download) (as text)
Tue Nov 13 06:06:43 2012 UTC (17 months ago) by nightmorph
Branch: MAIN
Changes since 1.27: +6 -4 lines
File MIME type: application/xml
update EFI partition location, bug #431556

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

  ViewVC Help
Powered by ViewVC 1.1.20