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