1 |
neysx |
1.1 |
<?xml version='1.0' encoding="UTF-8"?> |
2 |
|
|
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 |
swift |
1.32 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/migration-to-2.6.xml,v 1.31 2012/07/24 12:12:51 swift Exp $ --> |
4 |
neysx |
1.1 |
|
5 |
nightmorph |
1.28 |
<guide> |
6 |
neysx |
1.1 |
<title>The complete Gentoo Linux 2.6 migration guide</title> |
7 |
|
|
|
8 |
|
|
<author title="Author"> |
9 |
neysx |
1.18 |
<mail link="dsd@gentoo.org">Daniel Drake</mail> |
10 |
neysx |
1.1 |
</author> |
11 |
|
|
<author title="Contributor"> |
12 |
neysx |
1.18 |
<mail link="sergey_zlodey@mail.ru">Sergey Galkin</mail> |
13 |
neysx |
1.1 |
</author> |
14 |
|
|
<author title="Contributor"> |
15 |
neysx |
1.18 |
<mail link="svyatogor@gentoo.org">Sergey Kuleshov</mail> |
16 |
neysx |
1.1 |
</author> |
17 |
|
|
<author title="Editor"> |
18 |
neysx |
1.18 |
<mail link="neysx@gentoo.org">Xavier Neys</mail> |
19 |
neysx |
1.1 |
</author> |
20 |
bennyc |
1.3 |
<author title="Editor"> |
21 |
neysx |
1.18 |
<mail link="bennyc@gentoo.org">Benny Chuang</mail> |
22 |
bennyc |
1.3 |
</author> |
23 |
nightmorph |
1.28 |
<author title="Editor"> |
24 |
|
|
<mail link="nightmorph"/> |
25 |
|
|
</author> |
26 |
neysx |
1.1 |
|
27 |
|
|
<abstract> |
28 |
|
|
This document will aid you in the process of migrating from Linux 2.4 to Linux |
29 |
swift |
1.9 |
2.6, devfs to udev, OSS to ALSA, and LVM to LVM2. |
30 |
neysx |
1.1 |
</abstract> |
31 |
|
|
|
32 |
swift |
1.32 |
<version>5</version> |
33 |
|
|
<!-- Latest content change: 2012-07-24 --> |
34 |
|
|
<date>2013-07-23</date> |
35 |
neysx |
1.1 |
|
36 |
|
|
<chapter> |
37 |
|
|
<title>Introduction</title> |
38 |
|
|
<section> |
39 |
fox2mike |
1.21 |
<title>What is new in Linux 2.6?</title> |
40 |
neysx |
1.1 |
<body> |
41 |
|
|
|
42 |
|
|
<p> |
43 |
fox2mike |
1.21 |
That is not an easy question to answer. Linux 2.6 is the result of over 2 years |
44 |
|
|
of rapid development and stabilisation of new features, and is architecturally |
45 |
|
|
quite different from its 2.4 counterpart. Some of the major changes are listed |
46 |
|
|
below: |
47 |
neysx |
1.1 |
</p> |
48 |
|
|
|
49 |
|
|
<ul> |
50 |
|
|
<li> |
51 |
|
|
Scheduler/Interactivity improvements: Linux feels very smooth on desktop |
52 |
|
|
systems and copes much better than 2.4 while under load |
53 |
fox2mike |
1.19 |
</li> |
54 |
neysx |
1.1 |
<li> |
55 |
|
|
Scalability: Linux now scales much better at both ends - on small embedded |
56 |
|
|
devices and also systems with many processors |
57 |
|
|
</li> |
58 |
|
|
<li>Performance: Throughput from common applications is much improved</li> |
59 |
|
|
<li> |
60 |
|
|
Hardware support: Linux now supports many more architectures and hardware |
61 |
|
|
devices out-of-the-box than any other operating system. |
62 |
fox2mike |
1.19 |
</li> |
63 |
neysx |
1.1 |
</ul> |
64 |
|
|
|
65 |
|
|
<p> |
66 |
|
|
Joseph Pranevich has written a very detailed document, <uri |
67 |
|
|
link="http://www.kniggit.net/wwol26.html">The Wonderful World Of Linux |
68 |
|
|
2.6</uri> which you may be interested to glance over. If you are interested in |
69 |
|
|
the more technical details, you can refer to <uri |
70 |
fox2mike |
1.19 |
link="http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt">The |
71 |
|
|
post-halloween document</uri> - but do bear in mind that this is somewhat |
72 |
|
|
outdated now. |
73 |
|
|
</p> |
74 |
|
|
|
75 |
|
|
</body> |
76 |
|
|
</section> |
77 |
|
|
<section> |
78 |
|
|
<title>Gentoo and 2.6</title> |
79 |
|
|
<body> |
80 |
|
|
|
81 |
|
|
<p> |
82 |
|
|
From the 2005.0 release of Gentoo Linux, the default kernel is the latest 2.6 |
83 |
|
|
series kernel. The default profile of the system is picked up from |
84 |
swift |
1.31 |
<path>/etc/portage/make.profile</path> which on 2005.0 or above would be a symlink to |
85 |
fox2mike |
1.19 |
<path>/usr/portage/profiles/default-linux/x86/2005.0</path> under which various |
86 |
|
|
important settings are taken care of. |
87 |
|
|
</p> |
88 |
|
|
|
89 |
|
|
<p> |
90 |
fox2mike |
1.21 |
If you are using a 2.4 profile, please change it to one that supports a 2.6 |
91 |
fox2mike |
1.19 |
kernel by doing the following. |
92 |
neysx |
1.1 |
</p> |
93 |
|
|
|
94 |
fox2mike |
1.19 |
<pre caption="Changing your profile"> |
95 |
swift |
1.31 |
# <i>rm -f /etc/portage/make.profile</i> |
96 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/x86/2005.1 /etc/portage/make.profile</i> |
97 |
fox2mike |
1.19 |
</pre> |
98 |
|
|
|
99 |
neysx |
1.1 |
</body> |
100 |
|
|
</section> |
101 |
|
|
<section> |
102 |
|
|
<title>What is udev?</title> |
103 |
|
|
<body> |
104 |
|
|
|
105 |
|
|
<p> |
106 |
|
|
In the past, Gentoo has instructed users to use <e>devfs</e> for managing the |
107 |
fox2mike |
1.19 |
<path>/dev</path> directory, which contains a series of device interfaces to |
108 |
|
|
allow system applications to communicate with hardware (through the kernel). |
109 |
neysx |
1.1 |
</p> |
110 |
|
|
|
111 |
|
|
<p> |
112 |
|
|
<e>devfs</e>, whilst a good concept, has some internal problems, and has been |
113 |
fox2mike |
1.19 |
completely removed from the main stable tree as of 2.6.13. |
114 |
neysx |
1.1 |
</p> |
115 |
|
|
|
116 |
|
|
<p> |
117 |
|
|
<e>udev</e> is the new way of managing device nodes. It addresses issues with |
118 |
|
|
previous device managers, and also attempts to solve some other problems. |
119 |
|
|
</p> |
120 |
|
|
|
121 |
|
|
<p> |
122 |
|
|
The above may not mean much to you, but fear not, the hard working Gentoo |
123 |
|
|
developers have put effort into making the migration from devfs very easy. |
124 |
fox2mike |
1.19 |
Please read the <uri link="/doc/en/udev-guide.xml">Gentoo udev Guide</uri> for |
125 |
|
|
more information regarding the same. |
126 |
neysx |
1.1 |
</p> |
127 |
|
|
|
128 |
|
|
</body> |
129 |
|
|
</section> |
130 |
|
|
<section> |
131 |
|
|
<title>What is ALSA?</title> |
132 |
|
|
<body> |
133 |
|
|
|
134 |
|
|
<p> |
135 |
|
|
With Linux 2.4, chances are that you used OSS (open sound system) drivers to |
136 |
|
|
power your sound card. OSS has been replaced by a newer and better set of sound |
137 |
|
|
drivers: ALSA. |
138 |
|
|
</p> |
139 |
|
|
|
140 |
|
|
<p> |
141 |
|
|
ALSA, the Advanced Linux Sound Architecture, is a new set of sound drivers with |
142 |
|
|
a new and improved API, present in the Linux 2.6 kernel. It is backwards |
143 |
|
|
compatible with OSS applications, provided that you select the right kernel |
144 |
|
|
configuration options! |
145 |
|
|
</p> |
146 |
|
|
|
147 |
|
|
<note> |
148 |
|
|
If you do not have any sound/audio hardware, you can safely skip over any |
149 |
|
|
ALSA-related instructions in this document. |
150 |
|
|
</note> |
151 |
|
|
|
152 |
|
|
</body> |
153 |
|
|
</section> |
154 |
swift |
1.9 |
<section> |
155 |
|
|
<title>What is LVM?</title> |
156 |
|
|
<body> |
157 |
|
|
|
158 |
|
|
<p> |
159 |
|
|
<e>Logical Volume Management</e> (LVM) exists as set of tools allowing you to |
160 |
|
|
manage your disk storage in a very flexible manner. Amongst other things, it |
161 |
|
|
allows powerful control over partitions (e.g. resizing without reboot), and |
162 |
|
|
makes operations like device changes relatively simple. LVM acts as an |
163 |
|
|
alternative to standard partition-based disk management. |
164 |
|
|
</p> |
165 |
|
|
|
166 |
|
|
<p> |
167 |
|
|
LVM support has historically been implemented in Linux 2.4. Linux 2.6 features |
168 |
|
|
a new version of LVM, named <e>LVM2</e>. The migration process requires you to |
169 |
|
|
install new versions of the user-level tools (covered later in this document) |
170 |
|
|
but will leave your data intact! |
171 |
|
|
</p> |
172 |
|
|
|
173 |
|
|
<p> |
174 |
|
|
<e>If you do not currently use LVM for data-storage management, then LVM2 |
175 |
|
|
migration does not apply to you.</e> If this is the case, you can safely ignore |
176 |
|
|
any parts of this document referencing LVM/LVM2. Upgrading to Linux 2.6 does |
177 |
neysx |
1.18 |
<e>not</e> require you to store your data on LVM partitions - you can keep your |
178 |
|
|
data in the standard partition-format as it always has been. |
179 |
swift |
1.9 |
</p> |
180 |
|
|
|
181 |
|
|
<p> |
182 |
|
|
If you are not a LVM user, but you think LVM2 sounds useful for you, you can |
183 |
neysx |
1.18 |
convert your disks to this format at a later date, by following the <uri |
184 |
swift |
1.32 |
link="https://wiki.gentoo.org/wiki/LVM">LVM article</uri> on the Gentoo wiki. For now, let us |
185 |
neysx |
1.18 |
just concentrate on getting a smooth 2.6 migration underway. |
186 |
swift |
1.9 |
</p> |
187 |
|
|
|
188 |
|
|
</body> |
189 |
|
|
</section> |
190 |
neysx |
1.1 |
</chapter> |
191 |
|
|
|
192 |
|
|
<chapter> |
193 |
|
|
<title>Preparation</title> |
194 |
|
|
<section> |
195 |
|
|
<title>Get your system up-to-date</title> |
196 |
|
|
<body> |
197 |
|
|
|
198 |
|
|
<p> |
199 |
|
|
Some of the changes brought in with Linux 2.6 also required some changes in the |
200 |
|
|
base system applications. Before continuing, you should ensure that your system |
201 |
|
|
is relatively up-to-date, and to be perfectly sure, you should update all world |
202 |
|
|
and system packages where updates are available. |
203 |
|
|
</p> |
204 |
|
|
|
205 |
|
|
<p> |
206 |
|
|
In particular, make sure you have the latest stable versions of the following |
207 |
|
|
packages: |
208 |
|
|
</p> |
209 |
|
|
|
210 |
|
|
<ul> |
211 |
|
|
<li><c>sys-apps/baselayout</c></li> |
212 |
|
|
<li><c>sys-apps/util-linux</c></li> |
213 |
|
|
<li> |
214 |
|
|
<c>sys-kernel/genkernel</c> (only if you wish to use genkernel as opposed |
215 |
|
|
to manual configuration) |
216 |
fox2mike |
1.19 |
</li> |
217 |
neysx |
1.1 |
</ul> |
218 |
|
|
|
219 |
|
|
<pre caption="Updating all world packages"> |
220 |
cam |
1.11 |
# <i>emerge --sync</i> |
221 |
neysx |
1.1 |
# <i>emerge -ua world</i> |
222 |
|
|
</pre> |
223 |
|
|
|
224 |
|
|
</body> |
225 |
|
|
</section> |
226 |
|
|
<section> |
227 |
|
|
<title>modutils vs module-init-tools</title> |
228 |
|
|
<body> |
229 |
|
|
|
230 |
|
|
<p> |
231 |
|
|
<c>sys-apps/modutils</c> is the package that provides tools such as |
232 |
|
|
<c>modprobe</c>, <c>rmmod</c> and <c>insmod</c> for Linux 2.4. |
233 |
|
|
</p> |
234 |
|
|
|
235 |
|
|
<p> |
236 |
|
|
Linux 2.6 introduces a new module format, and therefore requires new tools for |
237 |
|
|
handling modules. These are bundled up into the |
238 |
neysx |
1.18 |
<c>sys-apps/module-init-tools</c> package. |
239 |
|
|
</p> |
240 |
neysx |
1.1 |
|
241 |
|
|
<p> |
242 |
|
|
You should now remove modutils and install module-init-tools: |
243 |
|
|
</p> |
244 |
|
|
|
245 |
|
|
<pre caption="Switching from modutils to module-init-tools"> |
246 |
cam |
1.11 |
# <i>emerge --unmerge sys-apps/modutils</i> |
247 |
neysx |
1.1 |
# <i>emerge module-init-tools</i> |
248 |
|
|
</pre> |
249 |
|
|
|
250 |
|
|
<note> |
251 |
|
|
Don't worry - even though you have just unmerged modutils, module-init-tools |
252 |
neysx |
1.18 |
provides backwards compatibility for Linux 2.4, so you will still be able to |
253 |
|
|
boot into Linux 2.4 and handle modules for that kernel. |
254 |
neysx |
1.1 |
</note> |
255 |
|
|
|
256 |
|
|
<note> |
257 |
|
|
For the above reason, module-init-tools might already be installed and working |
258 |
|
|
with your existing Linux 2.4 kernel. In this case, you don't need to worry |
259 |
|
|
about this stage - your system is already ready to deal with Linux 2.6 modules. |
260 |
|
|
</note> |
261 |
|
|
|
262 |
|
|
</body> |
263 |
|
|
</section> |
264 |
|
|
<section> |
265 |
|
|
<title>Installing udev</title> |
266 |
|
|
<body> |
267 |
|
|
|
268 |
|
|
<p> |
269 |
|
|
There is no configuration involved here. Simply use <c>emerge</c> to install |
270 |
|
|
udev: |
271 |
|
|
</p> |
272 |
|
|
|
273 |
|
|
<pre caption="Installing udev"> |
274 |
|
|
# <i>emerge -a udev</i> |
275 |
|
|
</pre> |
276 |
|
|
|
277 |
swift |
1.7 |
<p> |
278 |
neysx |
1.18 |
You should now read the <uri link="/doc/en/udev-guide.xml">Gentoo udev |
279 |
|
|
Guide</uri> to get a more complete idea about the differences between udev and |
280 |
|
|
devfs. |
281 |
swift |
1.7 |
</p> |
282 |
|
|
|
283 |
neysx |
1.1 |
</body> |
284 |
|
|
</section> |
285 |
|
|
<section> |
286 |
swift |
1.5 |
<title>Checking for essential device nodes</title> |
287 |
|
|
<body> |
288 |
|
|
|
289 |
|
|
<p> |
290 |
|
|
When the system boots up, the system requires some essential device nodes. As |
291 |
|
|
udev is not included in the kernel, it is not activated immediately. To work |
292 |
|
|
around this, you must ensure that you have some essential device nodes on your |
293 |
|
|
disk. |
294 |
|
|
</p> |
295 |
|
|
|
296 |
|
|
<p> |
297 |
|
|
Our installation stage files will have created the required devices during the |
298 |
|
|
initial installation. However, some users have reported that this is not the |
299 |
|
|
case. We will use this opportunity to check that the device files exist, and |
300 |
|
|
create them if they do not. |
301 |
|
|
</p> |
302 |
|
|
|
303 |
|
|
<p> |
304 |
fox2mike |
1.19 |
As your existing device manager will be mounted at <path>/dev</path>, we cannot |
305 |
|
|
access it directly. So we will bind-mount your root partition to another |
306 |
|
|
location and access the <path>/dev</path> directory from there. |
307 |
swift |
1.5 |
</p> |
308 |
|
|
|
309 |
|
|
<pre caption="Bind-mounting your root partition and listing static devices"> |
310 |
|
|
# <i>mkdir -p /mnt/temp</i> |
311 |
nightmorph |
1.28 |
# <i>mount --rbind / /mnt/temp</i> |
312 |
swift |
1.5 |
# <i>cd /mnt/temp/dev</i> |
313 |
|
|
# <i>ls -l console null</i> |
314 |
|
|
</pre> |
315 |
|
|
|
316 |
|
|
<p> |
317 |
|
|
If the above <e>ls</e> command reported that either <c>console</c> or |
318 |
|
|
<c>null</c> do not exist, then you must create them yourself, as shown below. |
319 |
|
|
</p> |
320 |
|
|
|
321 |
|
|
<pre caption="Creating the missing console and null nodes"> |
322 |
|
|
# <i>mknod -m 660 console c 5 1</i> |
323 |
|
|
# <i>mknod -m 660 null c 1 3</i> |
324 |
|
|
</pre> |
325 |
|
|
|
326 |
|
|
<p> |
327 |
|
|
You should now unmount your bind-mounted root partition, even if you did not |
328 |
|
|
have to create those devices: |
329 |
|
|
</p> |
330 |
|
|
|
331 |
|
|
<pre caption="Unmounting the bind-mounted root"> |
332 |
swift |
1.7 |
# <i>cd</i> |
333 |
swift |
1.5 |
# <i>umount /mnt/temp</i> |
334 |
swift |
1.6 |
# <i>rmdir /mnt/temp</i> |
335 |
swift |
1.5 |
</pre> |
336 |
|
|
|
337 |
|
|
</body> |
338 |
|
|
</section> |
339 |
|
|
<section> |
340 |
neysx |
1.1 |
<title>Installing ALSA utilities</title> |
341 |
|
|
<body> |
342 |
|
|
|
343 |
|
|
<p> |
344 |
|
|
ALSA requires you to have some packages installed, so that applications can use |
345 |
|
|
the ALSA API. These packages will also allow you to control the mixer and |
346 |
|
|
volume levels. Install the required utilities as follows: |
347 |
|
|
</p> |
348 |
|
|
|
349 |
|
|
<pre caption="Installing ALSA utilities and libraries"> |
350 |
|
|
# <i>emerge -a alsa-lib alsa-utils alsa-tools alsa-headers alsa-oss</i> |
351 |
|
|
</pre> |
352 |
|
|
|
353 |
|
|
</body> |
354 |
|
|
</section> |
355 |
|
|
</chapter> |
356 |
|
|
|
357 |
|
|
<chapter> |
358 |
|
|
<title>Installing the Linux 2.6 sources</title> |
359 |
|
|
|
360 |
|
|
<section> |
361 |
|
|
<title>Choosing and installing a kernel</title> |
362 |
|
|
<body> |
363 |
|
|
|
364 |
|
|
<p> |
365 |
|
|
The first thing you need to do is install sources of a 2.6 kernel of your |
366 |
|
|
choice. The two Gentoo-supported 2.6 kernels are currently |
367 |
fox2mike |
1.20 |
<e>gentoo-sources</e> (for desktops) and <e>hardened-sources</e> (for |
368 |
neysx |
1.1 |
servers). There are others available, see the <uri |
369 |
|
|
link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri> for more |
370 |
|
|
choices. |
371 |
|
|
</p> |
372 |
|
|
|
373 |
|
|
<p> |
374 |
swift |
1.13 |
In this guide, we'll use <c>gentoo-sources</c> as an example. Install your |
375 |
neysx |
1.1 |
chosen set of kernel sources using the <c>emerge</c> utility: |
376 |
|
|
</p> |
377 |
|
|
|
378 |
swift |
1.13 |
<pre caption="Installing gentoo-sources"> |
379 |
|
|
# <i>emerge -a gentoo-sources</i> |
380 |
neysx |
1.1 |
These are the packages that I would merge, in order: |
381 |
|
|
Calculating dependencies ...done! |
382 |
swift |
1.13 |
[ebuild NS ] sys-kernel/gentoo-sources-2.6.10-r4 |
383 |
neysx |
1.1 |
|
384 |
|
|
Do you want me to merge these packages? [Yes/No] <i>y</i> |
385 |
|
|
</pre> |
386 |
|
|
|
387 |
swift |
1.13 |
<p> |
388 |
|
|
When performing the above <c>emerge</c> command, if you find that it wants to |
389 |
|
|
install a 2.4 version of gentoo-sources (e.g. <c>gentoo-sources-2.4.26</c>), |
390 |
|
|
then it means that the profile you are using is not designed for Linux 2.6 |
391 |
neysx |
1.18 |
users. Please follow the <uri link="/doc/en/gentoo-upgrading.xml">Gentoo |
392 |
|
|
Upgrading Document</uri> to switch to a 2.6-based profile, and retry installing |
393 |
|
|
2.6 kernel sources. |
394 |
swift |
1.13 |
</p> |
395 |
|
|
|
396 |
neysx |
1.1 |
</body> |
397 |
|
|
</section> |
398 |
|
|
<section> |
399 |
|
|
<title>Updating the /usr/src/linux symbolic link</title> |
400 |
|
|
<body> |
401 |
|
|
|
402 |
|
|
<p> |
403 |
fox2mike |
1.19 |
Various components of the Gentoo utilities rely on <path>/usr/src/linux</path> |
404 |
|
|
being a symbolic link to the kernel sources that you are running (or wish to |
405 |
|
|
compile against). |
406 |
neysx |
1.1 |
</p> |
407 |
|
|
|
408 |
|
|
<p> |
409 |
fox2mike |
1.19 |
We will now update our <path>/usr/src/linux</path> link to point at the kernel |
410 |
|
|
sources we just installed. Continuing our example: |
411 |
neysx |
1.1 |
</p> |
412 |
|
|
|
413 |
|
|
<pre caption="Updating the /usr/src/linux softlink"> |
414 |
|
|
# <i>cd /usr/src</i> |
415 |
swift |
1.13 |
# <i>ln -sfn linux-2.6.10-gentoo-r4 linux</i> |
416 |
neysx |
1.1 |
</pre> |
417 |
|
|
|
418 |
|
|
</body> |
419 |
|
|
</section> |
420 |
|
|
</chapter> |
421 |
|
|
|
422 |
swift |
1.7 |
<chapter id="pitfalls"> |
423 |
neysx |
1.1 |
<title>Known pitfalls with Linux 2.6 migration</title> |
424 |
|
|
<section> |
425 |
|
|
<body> |
426 |
|
|
|
427 |
|
|
<p> |
428 |
|
|
Before we get stuck into configuring the kernel, I'll attempt to detail the |
429 |
|
|
most common errors that people make when migrating to Linux 2.6, as some of |
430 |
|
|
these points will influence the way you configure the new kernel. |
431 |
|
|
</p> |
432 |
|
|
|
433 |
|
|
<note> |
434 |
|
|
Not all of these points are relevant at this stage, but I will detail them all |
435 |
|
|
here in one place, and you can refer back at your leisure. |
436 |
|
|
</note> |
437 |
|
|
|
438 |
|
|
</body> |
439 |
|
|
</section> |
440 |
|
|
<section> |
441 |
|
|
<title>Don't use "make oldconfig" with a 2.4 .config</title> |
442 |
|
|
<body> |
443 |
|
|
|
444 |
|
|
<note> |
445 |
|
|
If you don't understand what this means, don't worry, you won't make this |
446 |
|
|
mistake if you follow the rest of this guide correctly. |
447 |
|
|
</note> |
448 |
|
|
|
449 |
|
|
<p> |
450 |
|
|
You'll be asked many many questions, since there have been a large amount of |
451 |
|
|
changes. Many people who do try a <c>make oldconfig</c> from a 2.4 config end |
452 |
|
|
up creating an unworkable kernel (e.g. no output on-screen, no input from |
453 |
|
|
keyboard, etc). Please save yourself the trouble, and use the traditional |
454 |
|
|
<c>menuconfig</c> configuration method just this once. |
455 |
|
|
</p> |
456 |
|
|
|
457 |
|
|
</body> |
458 |
|
|
</section> |
459 |
|
|
<section> |
460 |
|
|
<title>Don't use ide-scsi for CD/DVD writing</title> |
461 |
|
|
<body> |
462 |
|
|
|
463 |
|
|
<p> |
464 |
|
|
In Linux 2.4, the only way to achieve good CD/DVD writing results was to enable |
465 |
|
|
the (rather ugly) <c>ide-scsi</c> emulation. Thankfully, the IDE layer in Linux |
466 |
|
|
2.6 has been extended to support CD/DVD writers much better. |
467 |
|
|
</p> |
468 |
|
|
|
469 |
|
|
<p> |
470 |
|
|
You don't need to enable any extra options to support CD writing. Just be sure |
471 |
|
|
<e>not</e> to enable <c>ide-scsi</c> as you used to. |
472 |
|
|
</p> |
473 |
|
|
|
474 |
|
|
</body> |
475 |
|
|
</section> |
476 |
|
|
<section> |
477 |
|
|
<title>PC Speaker is now a configurable option</title> |
478 |
|
|
<body> |
479 |
|
|
|
480 |
|
|
<p> |
481 |
|
|
You won't get your normal console beeps (or any response from the PC speaker at |
482 |
|
|
all) unless you specifically enable the new PC speaker option |
483 |
|
|
(<c>CONFIG_INPUT_PCSPKR</c>): |
484 |
|
|
</p> |
485 |
|
|
|
486 |
|
|
<pre caption="Location of PC speaker option"> |
487 |
|
|
Device Drivers ---> |
488 |
|
|
Input device support ---> |
489 |
|
|
[*] Misc |
490 |
|
|
<*> PC Speaker support |
491 |
|
|
</pre> |
492 |
|
|
|
493 |
|
|
<note> |
494 |
|
|
By "PC speaker", I am referring to the analogue speaker that beeps once when |
495 |
|
|
your system is powering up, I am not referring to normal sound hardware used |
496 |
|
|
for playing music, etc. |
497 |
|
|
</note> |
498 |
|
|
|
499 |
|
|
</body> |
500 |
|
|
</section> |
501 |
|
|
<section> |
502 |
|
|
<title>New USB Storage block device driver sometimes problematic</title> |
503 |
|
|
<body> |
504 |
|
|
|
505 |
|
|
<p> |
506 |
|
|
Very recently, a new USB storage device driver has been added to the kernel. |
507 |
|
|
At the time of writing, this driver ("ub") is still in its early stages and |
508 |
|
|
some users find it to be unreliable. If you have problems accessing your USB |
509 |
|
|
hard disk, USB flash disk, USB card reader, or USB digital camera, then you |
510 |
|
|
could try reverting to the older SCSI-style driver: |
511 |
|
|
</p> |
512 |
|
|
|
513 |
|
|
<pre caption="Disabling ub"> |
514 |
|
|
Device Drivers ---> |
515 |
|
|
Block devices ---> |
516 |
|
|
< > Low Performance USB Block driver |
517 |
|
|
</pre> |
518 |
|
|
|
519 |
|
|
<note> |
520 |
|
|
The older SCSI-style driver (USB Mass Storage support) is enabled by default. |
521 |
|
|
It can be found under "Device Drivers --> USB support", but will generally |
522 |
|
|
not come into effect while ub is also present. |
523 |
|
|
</note> |
524 |
|
|
|
525 |
|
|
</body> |
526 |
|
|
</section> |
527 |
|
|
<section> |
528 |
|
|
<title>usbdevfs renamed to usbfs</title> |
529 |
|
|
<body> |
530 |
|
|
|
531 |
|
|
<p> |
532 |
|
|
If you have edited your <path>/etc/fstab</path> file to customise the way that |
533 |
|
|
the USB device filesystem gets mounted, you may have to modify the filesystem |
534 |
|
|
type from <e>usbdevfs</e> to <e>usbfs</e>. |
535 |
|
|
</p> |
536 |
|
|
|
537 |
|
|
<note> |
538 |
|
|
Recent 2.4 kernels will also allow you to use "usbfs" as well as "usbdevfs", so |
539 |
fox2mike |
1.21 |
you are not breaking any backwards compatibility by doing this. |
540 |
neysx |
1.1 |
</note> |
541 |
|
|
|
542 |
|
|
</body> |
543 |
|
|
</section> |
544 |
|
|
<section> |
545 |
|
|
<title>Don't renice X</title> |
546 |
|
|
<body> |
547 |
|
|
|
548 |
|
|
<p> |
549 |
|
|
If you are a desktop 2.4 user, you may have hacked your system into running X |
550 |
|
|
at a higher priority, as in some cases it seems to provide better desktop |
551 |
|
|
performance. |
552 |
|
|
</p> |
553 |
|
|
|
554 |
|
|
<p> |
555 |
|
|
There have been many scheduler changes in 2.6 which change this behaviour. If |
556 |
|
|
you continue to run X at a higher priority, it will do exactly what it is |
557 |
|
|
supposed to (run the <e>display server</e> at a very high priority) and you |
558 |
|
|
will notice consequences such as sound stuttering and slow application load |
559 |
|
|
times because your CPU is spending too long serving X and only X. |
560 |
|
|
</p> |
561 |
|
|
|
562 |
|
|
<p> |
563 |
|
|
In Linux 2.6, you no longer need to renice desktop applications to get good |
564 |
|
|
interactivity. Please remove your "niceness" hacks! |
565 |
|
|
</p> |
566 |
|
|
|
567 |
|
|
</body> |
568 |
|
|
</section> |
569 |
|
|
<section> |
570 |
neysx |
1.18 |
<title>X11 config file should now use /dev/input/mice for PS/2 and USB mice</title> |
571 |
neysx |
1.1 |
<body> |
572 |
|
|
|
573 |
|
|
<p> |
574 |
|
|
One of the changes that a default udev configuration introduces is different |
575 |
|
|
organisation of the mouse device nodes. Previously, you would have had nodes |
576 |
|
|
such as <path>/dev/psaux</path> and <path>/dev/mouse</path>. You will now have |
577 |
|
|
nodes such as <path>/dev/input/mouse0</path>, <path>/dev/input/mouse1</path>, |
578 |
|
|
and a collective <path>/dev/input/mice</path> node which combines movements |
579 |
|
|
from all mice. |
580 |
|
|
</p> |
581 |
|
|
|
582 |
|
|
<p> |
583 |
|
|
Since the old X configurations typically reference <path>/dev/mouse</path> or |
584 |
|
|
<path>/dev/psaux</path> then you may get an error similar to the one shown |
585 |
|
|
below when you attempt to start X11: |
586 |
|
|
</p> |
587 |
|
|
|
588 |
|
|
<pre caption="Common error when starting X on a udev system for the first time"> |
589 |
|
|
(EE) xf86OpenSerial: Cannot open device /dev/mouse |
590 |
neysx |
1.18 |
No such file or directory. |
591 |
neysx |
1.1 |
(EE) Mouse0: cannot open input device |
592 |
|
|
(EE) PreInit failed for input device "Mouse0" |
593 |
|
|
No core pointer |
594 |
|
|
</pre> |
595 |
|
|
|
596 |
|
|
<p> |
597 |
|
|
To correct this, open your X11 config in a text editor, and update the mouse |
598 |
|
|
<e>InputDevice</e> section to use the <path>/dev/input/mice</path> device. An |
599 |
|
|
example is shown below: |
600 |
|
|
</p> |
601 |
|
|
|
602 |
|
|
<pre caption="Opening your X11 config file"> |
603 |
|
|
# <i>nano -w /etc/X11/xorg.conf</i> |
604 |
|
|
</pre> |
605 |
|
|
|
606 |
|
|
<note> |
607 |
|
|
If you are still using XFree86, your config file will be |
608 |
|
|
<path>/etc/X11/XF86Config</path> |
609 |
|
|
</note> |
610 |
|
|
|
611 |
|
|
<pre caption="Sample mouse InputDevice section"> |
612 |
|
|
Section "InputDevice" |
613 |
neysx |
1.18 |
Identifier "Mouse0" |
614 |
|
|
Driver "mouse" |
615 |
|
|
Option "Protocol" "auto" |
616 |
|
|
Option "Device" "/dev/input/mice" |
617 |
neysx |
1.1 |
EndSection |
618 |
|
|
</pre> |
619 |
|
|
|
620 |
swift |
1.12 |
<note> |
621 |
|
|
If you are using a serial mouse, the new device path will be |
622 |
|
|
<path>/dev/tts/0</path> instead of <path>/dev/ttyS0</path>. |
623 |
|
|
</note> |
624 |
|
|
|
625 |
neysx |
1.1 |
</body> |
626 |
|
|
</section> |
627 |
swift |
1.8 |
<section> |
628 |
|
|
<title>New Serial-ATA (SATA) drivers name the devices differently</title> |
629 |
|
|
<body> |
630 |
|
|
|
631 |
|
|
<p> |
632 |
|
|
If you used the original Serial ATA drivers under Linux 2.4, you probably |
633 |
fox2mike |
1.19 |
observed your SATA devices having names such as <path>/dev/hde</path>. |
634 |
swift |
1.8 |
</p> |
635 |
|
|
|
636 |
|
|
<p> |
637 |
neysx |
1.18 |
Linux 2.6 introduces some new SATA drivers (libata) which are based on the SCSI |
638 |
|
|
subsystem. As these drivers are based on SCSI, your SATA disks will now show up |
639 |
fox2mike |
1.19 |
as SCSI devices. Your first SATA disk will be named <path>/dev/sda</path>. You will |
640 |
|
|
need to update your <path>/etc/fstab</path> file to reflect this, and you will need |
641 |
neysx |
1.18 |
to bear this in mind when choosing the root/real_root kernel boot parameter |
642 |
|
|
later on. |
643 |
swift |
1.8 |
</p> |
644 |
|
|
|
645 |
|
|
<note> |
646 |
|
|
libata has been backported into recent versions of Linux 2.4, so you may |
647 |
|
|
already be familiar with the new device naming. |
648 |
|
|
</note> |
649 |
|
|
|
650 |
|
|
</body> |
651 |
|
|
</section> |
652 |
|
|
<section> |
653 |
|
|
<title>bootsplash no longer maintained</title> |
654 |
|
|
<body> |
655 |
|
|
|
656 |
|
|
<p> |
657 |
|
|
If you used the <c>gentoo-sources-2.4</c> kernel, you may have used the |
658 |
|
|
<e>bootsplash</e> functionality in order to provide yourself with a colourful |
659 |
|
|
framebuffer console. |
660 |
|
|
</p> |
661 |
|
|
|
662 |
|
|
<p> |
663 |
|
|
The developer of bootsplash appears to have lost interest in his project, given |
664 |
alin |
1.23 |
some design problems. However, Gentoo developer <e>Michał Januszewski</e> is |
665 |
swift |
1.8 |
developing a successor, <c>gensplash</c>, which in included in the |
666 |
alin |
1.23 |
gentoo-sources-2.6 kernel. You can follow Michał's <uri |
667 |
neysx |
1.18 |
link="http://dev.gentoo.org/~spock/projects/gensplash/archive/gensplash-in-5-easy-steps.txt"> |
668 |
swift |
1.8 |
Gensplash in 5 easy steps</uri> document in order to familiarize yourself with |
669 |
|
|
how gensplash is operated. |
670 |
|
|
</p> |
671 |
|
|
|
672 |
|
|
</body> |
673 |
|
|
</section> |
674 |
|
|
<section> |
675 |
|
|
<title>I2C drivers now included in the kernel</title> |
676 |
|
|
<body> |
677 |
|
|
|
678 |
|
|
<p> |
679 |
|
|
If you use <c>lm-sensors</c> to monitor system temperatures and power levels, |
680 |
|
|
you previously needed to install the <c>i2c</c> package in order to provide |
681 |
|
|
hardware support. |
682 |
|
|
</p> |
683 |
|
|
|
684 |
|
|
<p> |
685 |
|
|
The I2C hardware drivers are now included in the Linux 2.6 kernel, no external |
686 |
|
|
i2c package is required. Remember to compile support for your specific I2C |
687 |
|
|
devices into the kernel configuration. You will then be able to use |
688 |
|
|
<c>lm-sensors</c> as usual. |
689 |
|
|
</p> |
690 |
|
|
|
691 |
|
|
</body> |
692 |
|
|
</section> |
693 |
|
|
|
694 |
|
|
|
695 |
neysx |
1.1 |
</chapter> |
696 |
|
|
|
697 |
|
|
<chapter id="conf"> |
698 |
|
|
<title>Configuring, building, and installing the kernel</title> |
699 |
|
|
<section> |
700 |
|
|
<body> |
701 |
|
|
|
702 |
|
|
<p> |
703 |
|
|
As with Linux 2.4, you have two options for managing your new kernel build. |
704 |
|
|
</p> |
705 |
|
|
|
706 |
|
|
<ol> |
707 |
|
|
<li> |
708 |
|
|
The default method is to configure your kernel manually. This may seem |
709 |
|
|
daunting but is the preferred way as long as you know your system. If you |
710 |
|
|
wish to configure your new kernel manually, please continue on to the <uri |
711 |
|
|
link="#manual">next chapter</uri>. |
712 |
|
|
</li> |
713 |
|
|
<li> |
714 |
|
|
The alternative option is to use our <c>genkernel</c> utility to |
715 |
|
|
automatically configure, compile, and install a kernel for you. If you wish |
716 |
|
|
to use <c>genkernel</c> then skip over the next chapter and proceed with |
717 |
|
|
<uri link="#genkernel">using genkernel</uri>. |
718 |
|
|
</li> |
719 |
|
|
</ol> |
720 |
|
|
|
721 |
|
|
</body> |
722 |
|
|
</section> |
723 |
|
|
</chapter> |
724 |
|
|
|
725 |
|
|
<chapter id="manual"> |
726 |
|
|
<title>Default: Manual configuration</title> |
727 |
|
|
<section> |
728 |
|
|
<title>Configuring the kernel</title> |
729 |
|
|
<body> |
730 |
|
|
|
731 |
|
|
<p> |
732 |
|
|
We'll now get on with configuring the kernel. Open menuconfig in the usual way: |
733 |
|
|
</p> |
734 |
|
|
|
735 |
|
|
<pre caption="Invoking menuconfig"> |
736 |
|
|
# <i>cd /usr/src/linux</i> |
737 |
|
|
# <i>make menuconfig</i> |
738 |
|
|
</pre> |
739 |
|
|
|
740 |
|
|
<p> |
741 |
|
|
You will probably be familiar with using menuconfig from configuring 2.4 |
742 |
|
|
kernels. Fortunately, the front end has barely changed at all, but you will |
743 |
|
|
observe much better organisation of kernel options, plus <e>many</e> new |
744 |
|
|
options that weren't present in 2.4. |
745 |
|
|
</p> |
746 |
|
|
|
747 |
|
|
<p> |
748 |
|
|
Be sure to enable the following important kernel options: |
749 |
|
|
</p> |
750 |
|
|
|
751 |
|
|
<pre caption="Required kernel options"> |
752 |
|
|
File systems ---> |
753 |
|
|
Pseudo Filesystems ---> |
754 |
|
|
[*] /proc file system support |
755 |
|
|
[*] Virtual memory file system support (former shm fs) |
756 |
neysx |
1.18 |
|
757 |
neysx |
1.1 |
<comment>(the following are required for udev):</comment> |
758 |
|
|
General setup ---> |
759 |
|
|
[*] Support for hot-pluggable devices |
760 |
|
|
|
761 |
|
|
<comment>(the following are required for ALSA):</comment> |
762 |
|
|
Device Drivers ---> |
763 |
|
|
Sound ---> |
764 |
|
|
<*> Sound card support |
765 |
|
|
Advanced Linux Sound Architecture ---> |
766 |
|
|
<M> Advanced Linux Sound Architecture |
767 |
|
|
<M> Sequencer support |
768 |
|
|
<M> OSS Mixer API |
769 |
|
|
[*] OSS Sequencer API |
770 |
fox2mike |
1.21 |
<comment> (and do not forget to select your soundcard from the submenus!)</comment> |
771 |
swift |
1.9 |
|
772 |
|
|
<comment>(the following are required if you use LVM for disk management):</comment> |
773 |
|
|
Device Drivers ---> |
774 |
|
|
Multi-device support (RAID and LVM) ---> |
775 |
|
|
[*] Multiple devices driver support (RAID and LVM) |
776 |
|
|
<*> Device mapper support |
777 |
neysx |
1.1 |
</pre> |
778 |
|
|
|
779 |
|
|
<warn> |
780 |
|
|
Previously you may have included support for the <path>/dev</path> file system |
781 |
|
|
(now marked OBSOLETE). Do not enable devfs support. We have installed udev, |
782 |
|
|
which we will be using instead of devfs from now on. |
783 |
|
|
</warn> |
784 |
|
|
|
785 |
|
|
<p> |
786 |
|
|
Also, remember to enable support for the filesystems that you use, and the |
787 |
|
|
hardware present in your system. Be sure to enable support for the IDE |
788 |
|
|
controller on your motherboard if you wish to benefit from fast DMA disk |
789 |
|
|
access. Refer to the <uri |
790 |
|
|
link="/doc/en/handbook/handbook-x86.xml?part=1&chap=7">Configuring the |
791 |
|
|
Kernel</uri> section of the <uri link="/doc/en/handbook/index.xml">Gentoo |
792 |
neysx |
1.18 |
Handbook</uri> for additional guidance here. |
793 |
neysx |
1.1 |
</p> |
794 |
|
|
|
795 |
|
|
</body> |
796 |
|
|
</section> |
797 |
|
|
<section> |
798 |
|
|
<title>Building the kernel</title> |
799 |
|
|
<body> |
800 |
|
|
|
801 |
|
|
<p> |
802 |
|
|
Now that we have configured the kernel, we can start the compilation process: |
803 |
|
|
</p> |
804 |
|
|
|
805 |
|
|
<pre caption="Compiling the kernel source"> |
806 |
|
|
# <i>make && make modules_install</i> |
807 |
|
|
</pre> |
808 |
|
|
|
809 |
|
|
<note> |
810 |
|
|
You may recall having to run <c>make dep</c> with Linux 2.4 sources. This is no |
811 |
|
|
longer required. |
812 |
|
|
</note> |
813 |
|
|
|
814 |
|
|
<p> |
815 |
|
|
Wait for the kernel compilation to complete (and observe the much more readable |
816 |
|
|
compilation output). |
817 |
|
|
</p> |
818 |
|
|
|
819 |
|
|
</body> |
820 |
|
|
</section> |
821 |
|
|
<section> |
822 |
|
|
<title>Installing the kernel</title> |
823 |
|
|
<body> |
824 |
|
|
|
825 |
|
|
<p> |
826 |
|
|
The next step is mounting your <path>/boot</path> partition and copying the |
827 |
|
|
kernel image over. You must then update your bootloader config manually. |
828 |
|
|
</p> |
829 |
|
|
|
830 |
|
|
<pre caption="Installing the kernel"> |
831 |
|
|
# <i>mount /boot</i> |
832 |
swift |
1.13 |
# <i>cp arch/i386/boot/bzImage /boot/bzImage-2.6.10-gentoo-r4</i> |
833 |
neysx |
1.1 |
</pre> |
834 |
|
|
|
835 |
|
|
<p> |
836 |
|
|
Note that the above instructions are examples only, you should follow your |
837 |
|
|
usual procedure of updating kernels by following the instructions in the <uri |
838 |
|
|
link="/doc/en/handbook/index.xml">Gentoo Handbook</uri> (see the <uri |
839 |
|
|
link="/doc/en/handbook/handbook-x86.xml?part=1&chap=7">Configuring the |
840 |
|
|
Kernel</uri> chapter). |
841 |
|
|
</p> |
842 |
|
|
|
843 |
|
|
<p> |
844 |
|
|
When updating your bootloader config, do not remove the old entry pointing at |
845 |
|
|
your 2.4 kernel. This way, you will easily be able to switch between the two if |
846 |
|
|
something is not working. |
847 |
|
|
</p> |
848 |
|
|
|
849 |
|
|
<p> |
850 |
|
|
Now continue onto the <uri link="#modules">Module Configuration</uri> section. |
851 |
|
|
</p> |
852 |
|
|
|
853 |
|
|
</body> |
854 |
|
|
</section> |
855 |
|
|
</chapter> |
856 |
|
|
|
857 |
|
|
<chapter id="genkernel"> |
858 |
|
|
<title>Alternative: Using genkernel</title> |
859 |
|
|
<section> |
860 |
|
|
<body> |
861 |
|
|
|
862 |
|
|
<p> |
863 |
|
|
If you prefer to use genkernel instead of manually configuring your kernel, you |
864 |
|
|
will be happy to hear that using genkernel to produce 2.6 kernels is very |
865 |
|
|
similar to the process you performed when producing your previous 2.4 kernel. |
866 |
|
|
</p> |
867 |
|
|
|
868 |
|
|
<p> |
869 |
|
|
You should invoke genkernel as shown below: |
870 |
|
|
</p> |
871 |
|
|
|
872 |
|
|
<pre caption="Invoking genkernel with some common arguments"> |
873 |
|
|
# <i>genkernel --udev --menuconfig --bootloader=grub all</i> |
874 |
|
|
</pre> |
875 |
|
|
|
876 |
|
|
<p> |
877 |
|
|
In the above example, we also take advantage of genkernel features to open |
878 |
|
|
menuconfig to allow you to customise the kernel configuration (if you wish), |
879 |
neysx |
1.18 |
and to update the grub bootloader configuration after compilation. |
880 |
neysx |
1.1 |
</p> |
881 |
|
|
|
882 |
|
|
<p> |
883 |
|
|
You should choose genkernel arguments that suit you, but do not forget to |
884 |
|
|
include the <c>--udev</c> argument! Refer to the <uri |
885 |
|
|
link="/doc/en/genkernel.xml">Gentoo Linux Genkernel Guide</uri> and the <uri |
886 |
|
|
link="/doc/en/handbook/handbook-x86.xml?part=1&chap=7">Configuring the |
887 |
|
|
Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo |
888 |
|
|
Handbook</uri> for additional information. |
889 |
|
|
</p> |
890 |
|
|
|
891 |
swift |
1.7 |
<p> |
892 |
neysx |
1.18 |
If you choose to update your bootloader config yourself, then you must remember |
893 |
|
|
to include the <c>udev</c> kernel parameter. A sample <e>grub</e> config |
894 |
|
|
section is shown below, but remember to adjust the <e>real_root</e> parameter |
895 |
|
|
for your system. |
896 |
swift |
1.7 |
</p> |
897 |
|
|
|
898 |
|
|
<pre caption="Sample GRUB config for genkernel + udev"> |
899 |
nightmorph |
1.27 |
title Gentoo Linux (2.6 kernel) |
900 |
swift |
1.7 |
root (hd0,0) |
901 |
swift |
1.30 |
kernel /kernel-2.6.10-gentoo-r4 <i>udev</i> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 |
902 |
swift |
1.13 |
initrd /initrd-2.6.10-gentoo-r4 |
903 |
swift |
1.7 |
</pre> |
904 |
|
|
|
905 |
neysx |
1.1 |
</body> |
906 |
|
|
</section> |
907 |
|
|
</chapter> |
908 |
|
|
|
909 |
|
|
<chapter id="modules"> |
910 |
|
|
<title>Module Configuration</title> |
911 |
|
|
|
912 |
|
|
<section> |
913 |
|
|
<title>Installing external modules</title> |
914 |
|
|
<body> |
915 |
|
|
|
916 |
|
|
<p> |
917 |
|
|
Many users will additionally rely on kernel modules that are built outside of |
918 |
|
|
the kernel tree. Common examples are the binary ATI and Nvidia graphics |
919 |
|
|
drivers. You now need to install those modules, which will compile against the |
920 |
|
|
2.6 sources found at <path>/usr/src/linux</path>. This is the usual case of |
921 |
|
|
<c>emerge packagename</c> for all the external modules you are used to using |
922 |
|
|
with 2.4. |
923 |
|
|
</p> |
924 |
|
|
|
925 |
|
|
<p> |
926 |
|
|
Refer again to the <uri |
927 |
|
|
link="/doc/en/handbook/handbook-x86.xml?part=1&chap=7">Configuring the |
928 |
|
|
Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo |
929 |
|
|
Handbook</uri> for more info. |
930 |
|
|
</p> |
931 |
|
|
|
932 |
|
|
</body> |
933 |
|
|
</section> |
934 |
|
|
<section> |
935 |
|
|
<title>Autoloading modules</title> |
936 |
|
|
<body> |
937 |
|
|
|
938 |
|
|
<p> |
939 |
|
|
You may have decided to compile some kernel components as modules (as opposed |
940 |
|
|
to compiled directly into the kernel) and would like to have them autoloaded on |
941 |
|
|
bootup like you did with 2.4. Also, if you installed any external modules from |
942 |
|
|
the portage tree (as described above) you will probably want to autoload them |
943 |
|
|
too. |
944 |
|
|
</p> |
945 |
|
|
|
946 |
|
|
<p> |
947 |
swift |
1.29 |
To achieve this, edit <path>/etc/conf.d/modules</path> in your favorite text |
948 |
|
|
editor and list the names of the modules you would like autoloaded. |
949 |
neysx |
1.1 |
</p> |
950 |
|
|
|
951 |
|
|
<pre caption="Opening the module autoload list in nano"> |
952 |
swift |
1.29 |
# <i>nano -w /etc/conf.d/modules</i> |
953 |
neysx |
1.1 |
</pre> |
954 |
|
|
|
955 |
swift |
1.29 |
<pre caption="Sample configuration entry to load the 3c59x and nvidia modules"> |
956 |
|
|
modules="<i>3c59x nvidia</i>" |
957 |
neysx |
1.1 |
</pre> |
958 |
|
|
|
959 |
|
|
</body> |
960 |
|
|
</section> |
961 |
|
|
</chapter> |
962 |
|
|
|
963 |
|
|
<chapter> |
964 |
swift |
1.9 |
<title>LVM to LVM2 migration</title> |
965 |
|
|
<section> |
966 |
|
|
<title>Upgrading to LVM2 tools</title> |
967 |
|
|
<body> |
968 |
|
|
|
969 |
|
|
<note> |
970 |
neysx |
1.18 |
If you do not use LVM to manage your disk storage, you can safely skip this |
971 |
|
|
chapter and skip onto the next. |
972 |
swift |
1.9 |
</note> |
973 |
|
|
|
974 |
|
|
<p> |
975 |
|
|
Fortunately, upgrading from the LVM1 user tools to the LVM2 versions is very |
976 |
|
|
simple: |
977 |
|
|
</p> |
978 |
|
|
|
979 |
|
|
<pre caption="Upgrading user-tools from LVM1 to LVM2"> |
980 |
cam |
1.11 |
# <i>emerge --unmerge lvm-user</i> |
981 |
swift |
1.9 |
# <i>emerge lvm2</i> |
982 |
|
|
</pre> |
983 |
|
|
|
984 |
|
|
<note> |
985 |
nightmorph |
1.26 |
You will need to re-emerge <c>lvm-user</c> if you plan to go back to booting a |
986 |
|
|
2.4 kernel, as <c>lvm2</c> by itself isn't enough for 2.4 kernels. |
987 |
swift |
1.9 |
</note> |
988 |
|
|
|
989 |
|
|
</body> |
990 |
|
|
</section> |
991 |
|
|
</chapter> |
992 |
|
|
|
993 |
|
|
<chapter> |
994 |
neysx |
1.1 |
<title>Booting into Linux 2.6</title> |
995 |
|
|
<section> |
996 |
|
|
<body> |
997 |
|
|
|
998 |
|
|
<p> |
999 |
|
|
It's now time to boot into Linux 2.6. Close all applications and reboot: |
1000 |
|
|
</p> |
1001 |
|
|
|
1002 |
|
|
<pre caption="Rebooting"> |
1003 |
|
|
# <i>umount /boot</i> |
1004 |
|
|
# <i>reboot</i> |
1005 |
|
|
</pre> |
1006 |
|
|
|
1007 |
|
|
<p> |
1008 |
|
|
When you reboot, if you followed this document correctly so far, you will have |
1009 |
|
|
the option of either loading Linux 2.4 or Linux 2.6 from your bootloader. |
1010 |
|
|
Choose Linux 2.6. |
1011 |
|
|
</p> |
1012 |
|
|
|
1013 |
|
|
<p> |
1014 |
|
|
Once the system has booted, check that things are working. If you made a |
1015 |
neysx |
1.18 |
mistake in the kernel configuration, don't worry, you can skip back to the <uri |
1016 |
|
|
link="#conf">Configuring, building, and installing the kernel</uri> section, |
1017 |
|
|
make your change, recompile and install new kernel image, reboot, and try |
1018 |
|
|
again! |
1019 |
neysx |
1.1 |
</p> |
1020 |
|
|
|
1021 |
|
|
</body> |
1022 |
|
|
</section> |
1023 |
|
|
<section> |
1024 |
swift |
1.8 |
<title>Configuring and unmuting ALSA</title> |
1025 |
neysx |
1.1 |
<body> |
1026 |
|
|
|
1027 |
|
|
<p> |
1028 |
swift |
1.8 |
We will now complete the ALSA configuration and unmute the audio channels. The |
1029 |
|
|
ALSA packages provide a useful utility to make this process relatively simple: |
1030 |
|
|
</p> |
1031 |
|
|
|
1032 |
|
|
<pre caption="Invoking the automatic ALSA configuration utility"> |
1033 |
|
|
# <i>alsaconf</i> |
1034 |
|
|
</pre> |
1035 |
|
|
|
1036 |
|
|
<p> |
1037 |
neysx |
1.18 |
The process is straightforward: allow the <e>/etc/modules.d/alsa</e> file to be |
1038 |
|
|
automatically updated, and then allow ALSA to be reloaded. alsaconf will then |
1039 |
|
|
terminate, however you will need to run it multiple times if you have multiple |
1040 |
|
|
sound devices installed in your system. |
1041 |
swift |
1.8 |
</p> |
1042 |
|
|
|
1043 |
|
|
<p> |
1044 |
neysx |
1.18 |
You should now add <c>alsasound</c> to your boot runlevel, so that volumes will |
1045 |
|
|
be saved on shutdown and restored on bootup: |
1046 |
neysx |
1.1 |
</p> |
1047 |
|
|
|
1048 |
swift |
1.8 |
<pre caption="Adding alsasound to the boot runlevel"> |
1049 |
|
|
# <i>rc-update add alsasound boot</i> |
1050 |
|
|
</pre> |
1051 |
|
|
|
1052 |
neysx |
1.1 |
<note> |
1053 |
swift |
1.8 |
The <c>alsaconf</c> utility chooses initial volume levels for your sound |
1054 |
|
|
devices. If these are inappropriate, you can modify them at any time with the |
1055 |
|
|
<c>alsamixer</c> utility. |
1056 |
neysx |
1.1 |
</note> |
1057 |
|
|
|
1058 |
|
|
</body> |
1059 |
|
|
</section> |
1060 |
swift |
1.7 |
<section> |
1061 |
|
|
<title>Any immediate problems?</title> |
1062 |
|
|
<body> |
1063 |
|
|
|
1064 |
|
|
<p> |
1065 |
neysx |
1.18 |
At this stage you should refer back to the <uri link="#pitfalls">Known pitfalls |
1066 |
|
|
with Linux 2.6 migration</uri> section which may be helpful with any issues you |
1067 |
|
|
encounter immediately. |
1068 |
swift |
1.7 |
</p> |
1069 |
|
|
|
1070 |
|
|
</body> |
1071 |
|
|
</section> |
1072 |
neysx |
1.1 |
</chapter> |
1073 |
|
|
|
1074 |
|
|
<chapter> |
1075 |
|
|
<title>Header files and NPTL</title> |
1076 |
|
|
<section> |
1077 |
|
|
<body> |
1078 |
|
|
|
1079 |
|
|
<p> |
1080 |
neysx |
1.18 |
By now you are running Linux 2.6 and hopefully have all issues ironed out. You |
1081 |
neysx |
1.1 |
should now update your Linux kernel header files and re-merge glibc so that |
1082 |
|
|
userspace applications can take advantage of new Linux 2.6 features. |
1083 |
|
|
</p> |
1084 |
|
|
|
1085 |
swift |
1.15 |
<pre caption="Updating to linux-headers"> |
1086 |
|
|
# <i>emerge -u linux-headers</i> |
1087 |
neysx |
1.1 |
</pre> |
1088 |
|
|
|
1089 |
|
|
<p> |
1090 |
|
|
After updating your headers package, you should generally re-merge glibc. |
1091 |
|
|
There is a new feature here that you may be interested in - NPTL. NPTL is a new |
1092 |
|
|
threading model present in Linux 2.6, which features much quicker thread create |
1093 |
|
|
and destroy times. This won't make much of a difference to most systems, but |
1094 |
|
|
you may wish to enable it during this migration process! To enable NPTL, edit |
1095 |
swift |
1.31 |
<path>/etc/portage/make.conf</path>, adding <e>nptl</e> to your USE variable. |
1096 |
neysx |
1.1 |
</p> |
1097 |
|
|
|
1098 |
|
|
<warn> |
1099 |
swift |
1.15 |
If you choose to also enable the "nptlonly" flag, be aware that you will no |
1100 |
|
|
longer be able to boot a 2.4 kernel. |
1101 |
neysx |
1.1 |
</warn> |
1102 |
|
|
|
1103 |
|
|
<p> |
1104 |
|
|
Now re-merge glibc (you should do this even if you did not choose to enable |
1105 |
|
|
NPTL). |
1106 |
|
|
</p> |
1107 |
|
|
|
1108 |
|
|
<pre caption="Reinstalling glibc against the new kernel headers"> |
1109 |
|
|
# <i>emerge -a glibc</i> |
1110 |
|
|
</pre> |
1111 |
|
|
|
1112 |
|
|
<p> |
1113 |
|
|
If you enabled NPTL, existing binaries will not use it until they are |
1114 |
|
|
recompiled. However, any binaries compiled from this point onwards <e>will</e> |
1115 |
|
|
use NPTL. You may wish to recompile all binaries now, e.g.: |
1116 |
|
|
</p> |
1117 |
|
|
|
1118 |
|
|
<pre caption="Recompiling all packages on the system"> |
1119 |
|
|
# <i>emerge -e world</i> |
1120 |
|
|
</pre> |
1121 |
|
|
|
1122 |
|
|
<p> |
1123 |
|
|
Alternatively, you can just let your system "naturally" convert itself to NPTL |
1124 |
|
|
as you update to newer versions of packages when they are released. |
1125 |
|
|
</p> |
1126 |
|
|
|
1127 |
|
|
</body> |
1128 |
|
|
</section> |
1129 |
|
|
</chapter> |
1130 |
|
|
|
1131 |
|
|
<chapter> |
1132 |
|
|
<title>Closing remarks</title> |
1133 |
|
|
<section> |
1134 |
|
|
<title>Problems?</title> |
1135 |
|
|
<body> |
1136 |
|
|
|
1137 |
|
|
<p> |
1138 |
|
|
With the incredible amount of work that went into Linux 2.6, it is sometimes |
1139 |
|
|
inevitable that things which used to work fine, no longer function as expected. |
1140 |
|
|
</p> |
1141 |
|
|
|
1142 |
|
|
<p> |
1143 |
|
|
If you have any problems with your 2.6 kernel, and you can confirm that this |
1144 |
|
|
problem does not exist with Linux 2.4, then please open a bug with us on our |
1145 |
|
|
<uri link="http://bugs.gentoo.org">Bugzilla</uri>. We will investigate the |
1146 |
|
|
issue, and if we find that it is a problem in the mainline kernel, we may then |
1147 |
|
|
ask you to file a report at the central kernel bugzilla. |
1148 |
|
|
</p> |
1149 |
|
|
|
1150 |
|
|
</body> |
1151 |
|
|
</section> |
1152 |
|
|
<section> |
1153 |
|
|
<title>Conclusion</title> |
1154 |
|
|
<body> |
1155 |
|
|
|
1156 |
|
|
<p> |
1157 |
|
|
Hopefully you have just completed a smooth migration and you are enjoying the |
1158 |
swift |
1.13 |
benefits which Linux 2.6 brings over 2.4. |
1159 |
|
|
</p> |
1160 |
|
|
|
1161 |
|
|
<p> |
1162 |
neysx |
1.18 |
I would like to say a word of thanks to the many users who effectively 'tested' |
1163 |
|
|
this document while it was in its early stages, and provided feedback about how |
1164 |
|
|
the migration process went. Sorry that I did not reply to all the emails (there |
1165 |
|
|
were a lot!), but I did read every one, and refined this document where |
1166 |
|
|
appropriate. Enjoy your 2.6-enhanced systems :) |
1167 |
neysx |
1.1 |
</p> |
1168 |
|
|
|
1169 |
|
|
</body> |
1170 |
|
|
</section> |
1171 |
swift |
1.8 |
<section> |
1172 |
|
|
<title>Removing Linux 2.4 from your system</title> |
1173 |
|
|
<body> |
1174 |
|
|
|
1175 |
|
|
<p> |
1176 |
|
|
After you have been running 2.6 for a while, you may decide that you no longer |
1177 |
|
|
have any requirement to be able to use Linux 2.4. The steps you can take to |
1178 |
swift |
1.9 |
clean up your system are detailed below. <e>Only follow the procedure in this |
1179 |
|
|
section if you are sure that you don't want/need to use 2.4 again!</e> |
1180 |
swift |
1.8 |
</p> |
1181 |
|
|
|
1182 |
|
|
<p> |
1183 |
|
|
The 2.4 kernel source code can be removed, using the emerge utility as usual. |
1184 |
|
|
For example, assuming you have 2.4 versions of vanilla-sources and |
1185 |
|
|
gentoo-sources installed, you could use the following command to remove them |
1186 |
|
|
while keeping the 2.6 versions intact: |
1187 |
|
|
</p> |
1188 |
|
|
|
1189 |
|
|
<pre caption="Example: Removing Linux 2.4 sources"> |
1190 |
cam |
1.11 |
# <i>emerge --unmerge =vanilla-sources-2.4.* =gentoo-sources-2.4.*</i> |
1191 |
swift |
1.8 |
</pre> |
1192 |
|
|
|
1193 |
|
|
<p> |
1194 |
|
|
Portage will not completely clean out your 2.4 kernel source installations, |
1195 |
|
|
because some temporary files are created during compilation. It is safe to |
1196 |
|
|
remove these remnants with the following command: |
1197 |
|
|
</p> |
1198 |
|
|
|
1199 |
|
|
<pre caption="Removing remaining temporary files"> |
1200 |
|
|
# <i>rm -rf /usr/src/linux-2.4.*</i> |
1201 |
|
|
</pre> |
1202 |
|
|
|
1203 |
|
|
<p> |
1204 |
neysx |
1.18 |
You can additionally remove modules and information files relating to your old |
1205 |
|
|
2.4 kernel installations, as these are no longer needed. |
1206 |
swift |
1.8 |
</p> |
1207 |
|
|
|
1208 |
|
|
<pre caption="Removing previously-installed 2.4 modules"> |
1209 |
|
|
# <i>rm -rf /lib/modules/2.4.*</i> |
1210 |
|
|
</pre> |
1211 |
|
|
|
1212 |
|
|
<p> |
1213 |
neysx |
1.18 |
The 2.4 kernel binaries you used to boot from can also be safely removed. You |
1214 |
|
|
should mount your <c>/boot</c> partition, and remove those images. You should |
1215 |
|
|
also update your bootloader configuration so that it no longer references these |
1216 |
|
|
deleted kernel images. |
1217 |
swift |
1.8 |
</p> |
1218 |
|
|
|
1219 |
|
|
<p> |
1220 |
swift |
1.10 |
Some Linux 2.4 users will have previously installed the <c>alsa-driver</c> |
1221 |
swift |
1.8 |
package to benefit from the new audio capabilities included in Linux 2.6. If |
1222 |
|
|
you were one of these users, and you followed the advice given earlier in this |
1223 |
|
|
document about building ALSA with the 2.6 kernel sources (as opposed to using |
1224 |
|
|
the <c>alsa-driver</c> package), then you can safely remove this to prevent |
1225 |
|
|
future conflicts. |
1226 |
|
|
</p> |
1227 |
|
|
|
1228 |
|
|
<p> |
1229 |
|
|
Additionally, <c>lm-sensors</c> users will have previously used the <c>i2c</c> |
1230 |
|
|
package to provide the hardware drivers. As already mentioned, I2C drivers are |
1231 |
|
|
now included in the kernel, so this package can also be removed in order to |
1232 |
|
|
prevent future conflicts. |
1233 |
|
|
</p> |
1234 |
|
|
|
1235 |
swift |
1.9 |
<p> |
1236 |
|
|
The devfs management daemon, <c>devfsd</c>, can also safely be removed, now |
1237 |
|
|
that we are using <c>udev</c> for device management. |
1238 |
|
|
</p> |
1239 |
|
|
|
1240 |
|
|
<pre caption="Removing alsa-driver, i2c, and devfsd"> |
1241 |
cam |
1.11 |
# <i>emerge --unmerge alsa-driver i2c devfsd</i> |
1242 |
swift |
1.9 |
</pre> |
1243 |
|
|
|
1244 |
|
|
<p> |
1245 |
|
|
If you are LVM2 user, you may wish to convert your data into the LVM2 data |
1246 |
neysx |
1.18 |
format in order to benefit from the advantages which LVM2 provides. However, |
1247 |
|
|
this operation will prevent you from ever accessing your LVM data from a 2.4 |
1248 |
|
|
kernel. If you want to continue with the conversion (this is totally |
1249 |
swift |
1.9 |
optional!), then you should examine the <c>vgconvert</c> man page for |
1250 |
|
|
instructions on how to carry this out. An example is shown below, where |
1251 |
|
|
<c>main</c> is the volume group name. |
1252 |
|
|
</p> |
1253 |
|
|
|
1254 |
|
|
<pre caption="Converting a LVM1 volume to LVM2 format"> |
1255 |
|
|
# <i>vgconvert -M2 main</i> |
1256 |
swift |
1.8 |
</pre> |
1257 |
|
|
|
1258 |
|
|
</body> |
1259 |
|
|
</section> |
1260 |
neysx |
1.1 |
</chapter> |
1261 |
|
|
</guide> |