/[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.56 - (hide annotations) (download) (as text)
Sun May 11 07:26:10 2014 UTC (7 months, 2 weeks ago) by swift
Branch: MAIN
CVS Tags: HEAD
Changes since 1.55: +6 -4 lines
File MIME type: application/xml
Add link to kernel configuration guide on the wiki as per suggestion on #gentoo-doc by micsha

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

  ViewVC Help
Powered by ViewVC 1.1.20