/[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.47 - (show annotations) (download) (as text)
Wed Aug 3 08:22:56 2011 UTC (3 years, 2 months ago) by jkt
Branch: MAIN
Changes since 1.46: +4 -4 lines
File MIME type: application/xml
#369841, initrd is in initial RAM disk, not a root disk

Thanks to swift for a patch.

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

  ViewVC Help
Powered by ViewVC 1.1.20