/[gentoo]/xml/htdocs/doc/en/migration-to-2.6.xml
Gentoo

Diff of /xml/htdocs/doc/en/migration-to-2.6.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.10 Revision 1.27
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 2<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
3
4<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/migration-to-2.6.xml,v 1.10 2005/01/16 15:56:35 swift Exp $ --> 3<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/migration-to-2.6.xml,v 1.27 2008/03/06 05:59:25 nightmorph Exp $ -->
5 4
6<guide link="/doc/en/migration-to-2.6.xml"> 5<guide link="/doc/en/migration-to-2.6.xml">
7
8<title>The complete Gentoo Linux 2.6 migration guide</title> 6<title>The complete Gentoo Linux 2.6 migration guide</title>
9 7
10<author title="Author"> 8<author title="Author">
11 <mail link="dsd@gentoo.org">Daniel Drake</mail> 9 <mail link="dsd@gentoo.org">Daniel Drake</mail>
12</author> 10</author>
13<author title="Contributor"> 11<author title="Contributor">
14 <mail link="sergey_zlodey@mail.ru">Sergey Galkin</mail> 12 <mail link="sergey_zlodey@mail.ru">Sergey Galkin</mail>
15</author> 13</author>
16<author title="Contributor"> 14<author title="Contributor">
17 <mail link="svyatogor@gentoo.org">Sergey Kuleshov</mail> 15 <mail link="svyatogor@gentoo.org">Sergey Kuleshov</mail>
18</author> 16</author>
19<author title="Editor"> 17<author title="Editor">
20 <mail link="neysx@gentoo.org">Xavier Neys</mail> 18 <mail link="neysx@gentoo.org">Xavier Neys</mail>
21</author> 19</author>
22<author title="Editor"> 20<author title="Editor">
23 <mail link="bennyc@gentoo.org">Benny Chuang</mail> 21 <mail link="bennyc@gentoo.org">Benny Chuang</mail>
24</author> 22</author>
25 23
26<abstract> 24<abstract>
27This document will aid you in the process of migrating from Linux 2.4 to Linux 25This document will aid you in the process of migrating from Linux 2.4 to Linux
282.6, devfs to udev, OSS to ALSA, and LVM to LVM2. 262.6, devfs to udev, OSS to ALSA, and LVM to LVM2.
29</abstract> 27</abstract>
30 28
31<version>0.2.1</version> 29<version>0.4</version>
32<date>2005-01-11</date> 30<date>2008-03-05</date>
33 31
34<chapter> 32<chapter>
35<title>Introduction</title> 33<title>Introduction</title>
36
37<section>
38<title>Status of this document</title>
39<body>
40
41<p>
42The migration processes described in this document are not minor changes. This
43document is in early stages and may be missing some details but hopefully the
44main things have been covered. If you do try a migration, please <uri
45link="http://bugs.gentoo.org">report</uri> any problem you might encounter so
46that we can refine this guide.
47</p>
48
49<p>
50We are planning on making Linux 2.6 the default kernel for when 2005.0 is
51released (for some arch's). At the same time, we will encourage all existing
52users of those arch's to upgrade to Linux 2.6, as many will still be running
532.4. Your feedback on this document is much appreciated, so that when this
54time comes, the document can be in good shape for the mass-migration.
55</p>
56
57</body>
58</section> 34<section>
59
60<section>
61<title>Whats new in Linux 2.6?</title> 35<title>What is new in Linux 2.6?</title>
62<body> 36<body>
63 37
64<p> 38<p>
65That is no easy question to answer. Linux 2.6 is the result of over 2 years 39That is not an easy question to answer. Linux 2.6 is the result of over 2 years
66of rapid development and stabilisation of new features, and is architectually 40of rapid development and stabilisation of new features, and is architecturally
67quite different from its 2.4 counterpart. Some of the more major changes are 41quite different from its 2.4 counterpart. Some of the major changes are listed
68listed below: 42below:
69</p> 43</p>
70 44
71<ul> 45<ul>
72 <li> 46 <li>
73 Scheduler/Interactivity improvements: Linux feels very smooth on desktop 47 Scheduler/Interactivity improvements: Linux feels very smooth on desktop
74 systems and copes much better than 2.4 while under load 48 systems and copes much better than 2.4 while under load
75</li> 49 </li>
76 <li> 50 <li>
77 Scalability: Linux now scales much better at both ends - on small embedded 51 Scalability: Linux now scales much better at both ends - on small embedded
78 devices and also systems with many processors 52 devices and also systems with many processors
79 </li> 53 </li>
80 <li>Performance: Throughput from common applications is much improved</li> 54 <li>Performance: Throughput from common applications is much improved</li>
81 <li> 55 <li>
82 Hardware support: Linux now supports many more architectures and hardware 56 Hardware support: Linux now supports many more architectures and hardware
83 devices out-of-the-box than any other operating system. 57 devices out-of-the-box than any other operating system.
84</li> 58 </li>
85</ul> 59</ul>
86 60
87<p> 61<p>
88Joseph Pranevich has written a very detailed document, <uri 62Joseph Pranevich has written a very detailed document, <uri
89link="http://www.kniggit.net/wwol26.html">The Wonderful World Of Linux 63link="http://www.kniggit.net/wwol26.html">The Wonderful World Of Linux
902.6</uri> which you may be interested to glance over. If you are interested in 642.6</uri> which you may be interested to glance over. If you are interested in
91the more technical details, you can refer to <uri 65the more technical details, you can refer to <uri
92link="http://www.linux.org.uk/~davej/docs/post-halloween-2.6.txt">The 66link="http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt">The
93post-halloween document</uri> - but bear in mind that this is somewhat outdated 67post-halloween document</uri> - but do bear in mind that this is somewhat
94now. 68outdated now.
69</p>
70
71</body>
72</section>
73<section>
74<title>Gentoo and 2.6</title>
75<body>
76
95</p> 77<p>
78From the 2005.0 release of Gentoo Linux, the default kernel is the latest 2.6
79series kernel. The default profile of the system is picked up from
80<path>/etc/make.profile</path> which on 2005.0 or above would be a symlink to
81<path>/usr/portage/profiles/default-linux/x86/2005.0</path> under which various
82important settings are taken care of.
83</p>
84
85<p>
86If you are using a 2.4 profile, please change it to one that supports a 2.6
87kernel by doing the following.
88</p>
89
90<pre caption="Changing your profile">
91# <i>rm -f /etc/make.profile</i>
92# <i>ln -snf /usr/portage/profiles/default-linux/x86/2005.1 /etc/make.profile</i>
93</pre>
96 94
97</body> 95</body>
98</section> 96</section>
99<section> 97<section>
100<title>What is udev?</title> 98<title>What is udev?</title>
101<body> 99<body>
102 100
103<p> 101<p>
104In the past, Gentoo has instructed users to use <e>devfs</e> for managing the 102In the past, Gentoo has instructed users to use <e>devfs</e> for managing the
105/dev directory, which contains a series of device interfaces to allow system 103<path>/dev</path> directory, which contains a series of device interfaces to
106applications to communicate with hardware (through the kernel). 104allow system applications to communicate with hardware (through the kernel).
107</p> 105</p>
108 106
109<p> 107<p>
110<e>devfs</e>, whilst a good concept, has some internal problems, and has been 108<e>devfs</e>, whilst a good concept, has some internal problems, and has been
111marked obselete in Linux 2.6. 109completely removed from the main stable tree as of 2.6.13.
112</p> 110</p>
113 111
114<p> 112<p>
115<e>udev</e> is the new way of managing device nodes. It addresses issues with 113<e>udev</e> is the new way of managing device nodes. It addresses issues with
116previous device managers, and also attempts to solve some other problems. 114previous device managers, and also attempts to solve some other problems.
117</p> 115</p>
118 116
119<p> 117<p>
120The above may not mean much to you, but fear not, the hard working Gentoo 118The above may not mean much to you, but fear not, the hard working Gentoo
121developers have put effort into making the migration from devfs very easy. 119developers have put effort into making the migration from devfs very easy.
120Please read the <uri link="/doc/en/udev-guide.xml">Gentoo udev Guide</uri> for
121more information regarding the same.
122</p> 122</p>
123 123
124</body> 124</body>
125</section> 125</section>
126<section> 126<section>
168 168
169<p> 169<p>
170<e>If you do not currently use LVM for data-storage management, then LVM2 170<e>If you do not currently use LVM for data-storage management, then LVM2
171migration does not apply to you.</e> If this is the case, you can safely ignore 171migration does not apply to you.</e> If this is the case, you can safely ignore
172any parts of this document referencing LVM/LVM2. Upgrading to Linux 2.6 does 172any parts of this document referencing LVM/LVM2. Upgrading to Linux 2.6 does
173<e>not</e> require you to store your data on LVM partitions - you can keep 173<e>not</e> require you to store your data on LVM partitions - you can keep your
174your data in the standard partition-format as it always has been. 174data in the standard partition-format as it always has been.
175</p> 175</p>
176 176
177<p> 177<p>
178If you are not a LVM user, but you think LVM2 sounds useful for you, you can 178If you are not a LVM user, but you think LVM2 sounds useful for you, you can
179convert your disks to this format at a later date, by following the 179convert your disks to this format at a later date, by following the <uri
180<uri link="http://www.gentoo.org/doc/en/lvm2.xml">Gentoo LVM2 Installation 180link="/doc/en/lvm2.xml">Gentoo LVM2 Installation Guide</uri>. For now, let us
181Guide</uri>. For now, lets just concentrate on getting a smooth 2.6 migration 181just concentrate on getting a smooth 2.6 migration underway.
182underway.
183</p> 182</p>
184 183
185</body> 184</body>
186</section> 185</section>
187</chapter> 186</chapter>
208 <li><c>sys-apps/baselayout</c></li> 207 <li><c>sys-apps/baselayout</c></li>
209 <li><c>sys-apps/util-linux</c></li> 208 <li><c>sys-apps/util-linux</c></li>
210 <li> 209 <li>
211 <c>sys-kernel/genkernel</c> (only if you wish to use genkernel as opposed 210 <c>sys-kernel/genkernel</c> (only if you wish to use genkernel as opposed
212 to manual configuration) 211 to manual configuration)
213</li> 212 </li>
214</ul> 213</ul>
215 214
216<pre caption="Updating all world packages"> 215<pre caption="Updating all world packages">
217# <i>emerge sync</i> 216# <i>emerge --sync</i>
218# <i>emerge -ua world</i> 217# <i>emerge -ua world</i>
219</pre> 218</pre>
220 219
221</body> 220</body>
222</section> 221</section>
230</p> 229</p>
231 230
232<p> 231<p>
233Linux 2.6 introduces a new module format, and therefore requires new tools for 232Linux 2.6 introduces a new module format, and therefore requires new tools for
234handling modules. These are bundled up into the 233handling modules. These are bundled up into the
235<c>sys-apps/module-init-tools</c> package. </p> 234<c>sys-apps/module-init-tools</c> package.
235</p>
236 236
237<p> 237<p>
238You should now remove modutils and install module-init-tools: 238You should now remove modutils and install module-init-tools:
239</p> 239</p>
240 240
241<pre caption="Switching from modutils to module-init-tools"> 241<pre caption="Switching from modutils to module-init-tools">
242# <i>emerge unmerge sys-apps/modutils</i> 242# <i>emerge --unmerge sys-apps/modutils</i>
243# <i>emerge module-init-tools</i> 243# <i>emerge module-init-tools</i>
244</pre> 244</pre>
245 245
246<note> 246<note>
247Don't worry - even though you have just unmerged modutils, module-init-tools 247Don't worry - even though you have just unmerged modutils, module-init-tools
248provides backwards compatibility for Linux 2.4, so you will still be 248provides backwards compatibility for Linux 2.4, so you will still be able to
249able to boot into Linux 2.4 and handle modules for that kernel. 249boot into Linux 2.4 and handle modules for that kernel.
250</note> 250</note>
251 251
252<note> 252<note>
253For the above reason, module-init-tools might already be installed and working 253For the above reason, module-init-tools might already be installed and working
254with your existing Linux 2.4 kernel. In this case, you don't need to worry 254with your existing Linux 2.4 kernel. In this case, you don't need to worry
269<pre caption="Installing udev"> 269<pre caption="Installing udev">
270# <i>emerge -a udev</i> 270# <i>emerge -a udev</i>
271</pre> 271</pre>
272 272
273<p> 273<p>
274You should now read the 274You should now read the <uri link="/doc/en/udev-guide.xml">Gentoo udev
275<uri link="http://www.gentoo.org/doc/en/udev-guide.xml">Gentoo udev
276Guide</uri> to get a more complete idea about the differences between udev 275Guide</uri> to get a more complete idea about the differences between udev and
277and devfs. 276devfs.
278</p> 277</p>
279 278
280</body> 279</body>
281</section> 280</section>
282<section> 281<section>
296case. We will use this opportunity to check that the device files exist, and 295case. We will use this opportunity to check that the device files exist, and
297create them if they do not. 296create them if they do not.
298</p> 297</p>
299 298
300<p> 299<p>
301As your existing device manager will be mounted at /dev, we cannot access it 300As your existing device manager will be mounted at <path>/dev</path>, we cannot
302directly. So we will bind-mount your root partition to another location and 301access it directly. So we will bind-mount your root partition to another
303access the /dev directory from there. 302location and access the <path>/dev</path> directory from there.
304</p> 303</p>
305 304
306<pre caption="Bind-mounting your root partition and listing static devices"> 305<pre caption="Bind-mounting your root partition and listing static devices">
307# <i>mkdir -p /mnt/temp</i> 306# <i>mkdir -p /mnt/temp</i>
308# <i>mount -o bind / /mnt/temp</i> 307# <i>mount -o bind / /mnt/temp</i>
359<body> 358<body>
360 359
361<p> 360<p>
362The first thing you need to do is install sources of a 2.6 kernel of your 361The first thing you need to do is install sources of a 2.6 kernel of your
363choice. The two Gentoo-supported 2.6 kernels are currently 362choice. The two Gentoo-supported 2.6 kernels are currently
364<e>gentoo-dev-sources</e> (for desktops) and <e>hardened-dev-sources</e> (for 363<e>gentoo-sources</e> (for desktops) and <e>hardened-sources</e> (for
365servers). There are others available, see the <uri 364servers). There are others available, see the <uri
366link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri> for more 365link="/doc/en/gentoo-kernel.xml">Gentoo Linux Kernel Guide</uri> for more
367choices. 366choices.
368</p> 367</p>
369 368
370<p> 369<p>
371In this guide, we'll use <c>gentoo-dev-sources</c> as an example. Install your 370In this guide, we'll use <c>gentoo-sources</c> as an example. Install your
372chosen set of kernel sources using the <c>emerge</c> utility: 371chosen set of kernel sources using the <c>emerge</c> utility:
373</p> 372</p>
374 373
375<pre caption="Installing gentoo-dev-sources"> 374<pre caption="Installing gentoo-sources">
376# <i>emerge -a gentoo-dev-sources</i> 375# <i>emerge -a gentoo-sources</i>
377These are the packages that I would merge, in order: 376These are the packages that I would merge, in order:
378Calculating dependencies ...done! 377Calculating dependencies ...done!
379[ebuild N ] sys-kernel/gentoo-dev-sources-2.6.9-r2 378[ebuild NS ] sys-kernel/gentoo-sources-2.6.10-r4
380 379
381Do you want me to merge these packages? [Yes/No] <i>y</i> 380Do you want me to merge these packages? [Yes/No] <i>y</i>
382</pre> 381</pre>
383 382
383<p>
384When performing the above <c>emerge</c> command, if you find that it wants to
385install a 2.4 version of gentoo-sources (e.g. <c>gentoo-sources-2.4.26</c>),
386then it means that the profile you are using is not designed for Linux 2.6
387users. Please follow the <uri link="/doc/en/gentoo-upgrading.xml">Gentoo
388Upgrading Document</uri> to switch to a 2.6-based profile, and retry installing
3892.6 kernel sources.
390</p>
391
384</body> 392</body>
385</section> 393</section>
386<section> 394<section>
387<title>Updating the /usr/src/linux symbolic link</title> 395<title>Updating the /usr/src/linux symbolic link</title>
388<body> 396<body>
389 397
390<p> 398<p>
391Various components of the Gentoo utilities rely on /usr/src/linux being a 399Various components of the Gentoo utilities rely on <path>/usr/src/linux</path>
392symbolic link to the kernel sources that you are running (or wish to compile 400being a symbolic link to the kernel sources that you are running (or wish to
393against). 401compile against).
394</p>
395
396<p> 402</p>
403
404<p>
397We will now update our /usr/src/linux link to point at the kernel sources we 405We will now update our <path>/usr/src/linux</path> link to point at the kernel
398just installed. Continuing our example: 406sources we just installed. Continuing our example:
399</p> 407</p>
400 408
401<pre caption="Updating the /usr/src/linux softlink"> 409<pre caption="Updating the /usr/src/linux softlink">
402# <i>cd /usr/src</i> 410# <i>cd /usr/src</i>
403# <i>ln -sfn linux-2.6.9-gentoo-r2 linux</i> 411# <i>ln -sfn linux-2.6.10-gentoo-r4 linux</i>
404</pre> 412</pre>
405 413
406</body> 414</body>
407</section> 415</section>
408</chapter> 416</chapter>
522type from <e>usbdevfs</e> to <e>usbfs</e>. 530type from <e>usbdevfs</e> to <e>usbfs</e>.
523</p> 531</p>
524 532
525<note> 533<note>
526Recent 2.4 kernels will also allow you to use "usbfs" as well as "usbdevfs", so 534Recent 2.4 kernels will also allow you to use "usbfs" as well as "usbdevfs", so
527you aren't breaking any backwards compatibility by doing this. 535you are not breaking any backwards compatibility by doing this.
528</note> 536</note>
529 537
530</body> 538</body>
531</section> 539</section>
532<section> 540<section>
553</p> 561</p>
554 562
555</body> 563</body>
556</section> 564</section>
557<section> 565<section>
558<title>X11 config file should now use /dev/input/mice for PS/2 and USB 566<title>X11 config file should now use /dev/input/mice for PS/2 and USB mice</title>
559mice</title>
560<body> 567<body>
561 568
562<p> 569<p>
563One of the changes that a default udev configuration introduces is different 570One of the changes that a default udev configuration introduces is different
564organisation of the mouse device nodes. Previously, you would have had nodes 571organisation of the mouse device nodes. Previously, you would have had nodes
574below when you attempt to start X11: 581below when you attempt to start X11:
575</p> 582</p>
576 583
577<pre caption="Common error when starting X on a udev system for the first time"> 584<pre caption="Common error when starting X on a udev system for the first time">
578(EE) xf86OpenSerial: Cannot open device /dev/mouse 585(EE) xf86OpenSerial: Cannot open device /dev/mouse
579 No such file or directory. 586 No such file or directory.
580(EE) Mouse0: cannot open input device 587(EE) Mouse0: cannot open input device
581(EE) PreInit failed for input device "Mouse0" 588(EE) PreInit failed for input device "Mouse0"
582No core pointer 589No core pointer
583</pre> 590</pre>
584 591
597<path>/etc/X11/XF86Config</path> 604<path>/etc/X11/XF86Config</path>
598</note> 605</note>
599 606
600<pre caption="Sample mouse InputDevice section"> 607<pre caption="Sample mouse InputDevice section">
601Section "InputDevice" 608Section "InputDevice"
602 Identifier "Mouse0" 609 Identifier "Mouse0"
603 Driver "mouse" 610 Driver "mouse"
604 Option "Protocol" "auto" 611 Option "Protocol" "auto"
605 Option "Device" "/dev/input/mice" 612 Option "Device" "/dev/input/mice"
606EndSection 613EndSection
607</pre> 614</pre>
608 615
616<note>
617If you are using a serial mouse, the new device path will be
618<path>/dev/tts/0</path> instead of <path>/dev/ttyS0</path>.
619</note>
620
609</body> 621</body>
610</section> 622</section>
611<section> 623<section>
612<title>New Serial-ATA (SATA) drivers name the devices differently</title> 624<title>New Serial-ATA (SATA) drivers name the devices differently</title>
613<body> 625<body>
614 626
615<p> 627<p>
616If you used the original Serial ATA drivers under Linux 2.4, you probably 628If you used the original Serial ATA drivers under Linux 2.4, you probably
617observed your SATA devices having names such as <c>/dev/hde</c>. 629observed your SATA devices having names such as <path>/dev/hde</path>.
618</p>
619
620<p> 630</p>
631
632<p>
621Linux 2.6 introduces some new SATA drivers (libata) which are based on the 633Linux 2.6 introduces some new SATA drivers (libata) which are based on the SCSI
622SCSI subsystem. As these drivers are based on SCSI, your SATA disks will now 634subsystem. As these drivers are based on SCSI, your SATA disks will now show up
623show up as SCSI devices. Your first SATA disk will be named <c>/dev/sda</c>. 635as SCSI devices. Your first SATA disk will be named <path>/dev/sda</path>. You will
624You will need to update your <c>/etc/fstab</c> file to reflect this, and you 636need to update your <path>/etc/fstab</path> file to reflect this, and you will need
625will need to bear this in mind when choosing the root/real_root kernel boot 637to bear this in mind when choosing the root/real_root kernel boot parameter
626parameter later on. 638later on.
627</p> 639</p>
628 640
629<note> 641<note>
630libata has been backported into recent versions of Linux 2.4, so you may 642libata has been backported into recent versions of Linux 2.4, so you may
631already be familiar with the new device naming. 643already be familiar with the new device naming.
643framebuffer console. 655framebuffer console.
644</p> 656</p>
645 657
646<p> 658<p>
647The developer of bootsplash appears to have lost interest in his project, given 659The developer of bootsplash appears to have lost interest in his project, given
648some design problems. However, Gentoo developer <e>Michal Januszewski</e> is 660some design problems. However, Gentoo developer <e>Michał Januszewski</e> is
649developing a successor, <c>gensplash</c>, which in included in the 661developing a successor, <c>gensplash</c>, which in included in the
650gentoo-dev-sources kernel. You can follow Michals 662gentoo-sources-2.6 kernel. You can follow Michał's <uri
651<uri link="http://dev.gentoo.org/~spock/projects/gensplash/archive/gensplash-in-5-easy-steps.txt"> 663link="http://dev.gentoo.org/~spock/projects/gensplash/archive/gensplash-in-5-easy-steps.txt">
652Gensplash in 5 easy steps</uri> document in order to familiarize yourself with 664Gensplash in 5 easy steps</uri> document in order to familiarize yourself with
653how gensplash is operated. 665how gensplash is operated.
654</p> 666</p>
655 667
656</body> 668</body>
735<pre caption="Required kernel options"> 747<pre caption="Required kernel options">
736File systems ---&gt; 748File systems ---&gt;
737 Pseudo Filesystems ---&gt; 749 Pseudo Filesystems ---&gt;
738 [*] /proc file system support 750 [*] /proc file system support
739 [*] Virtual memory file system support (former shm fs) 751 [*] Virtual memory file system support (former shm fs)
740 752
741<comment>(the following are required for udev):</comment> 753<comment>(the following are required for udev):</comment>
742General setup ---&gt; 754General setup ---&gt;
743 [*] Support for hot-pluggable devices 755 [*] Support for hot-pluggable devices
744 756
745Device Drivers ---&gt;
746 Block devices ---&gt;
747 &lt;*&gt; RAM disk support
748
749<comment>(the following are required for ALSA):</comment> 757<comment>(the following are required for ALSA):</comment>
750Device Drivers ---&gt; 758Device Drivers ---&gt;
751 Sound ---&gt; 759 Sound ---&gt;
752 &lt;*&gt; Sound card support 760 &lt;*&gt; Sound card support
753 Advanced Linux Sound Architecture ---&gt; 761 Advanced Linux Sound Architecture ---&gt;
754 &lt;M&gt; Advanced Linux Sound Architecture 762 &lt;M&gt; Advanced Linux Sound Architecture
755 &lt;M&gt; Sequencer support 763 &lt;M&gt; Sequencer support
756 &lt;M&gt; OSS Mixer API 764 &lt;M&gt; OSS Mixer API
757 [*] OSS Sequencer API 765 [*] OSS Sequencer API
758<comment> (and dont forget to select your soundcard from the submenus!)</comment> 766<comment> (and do not forget to select your soundcard from the submenus!)</comment>
759 767
760<comment>(the following are required if you use LVM for disk management):</comment> 768<comment>(the following are required if you use LVM for disk management):</comment>
761Device Drivers ---&gt; 769Device Drivers ---&gt;
762 Multi-device support (RAID and LVM) ---&gt; 770 Multi-device support (RAID and LVM) ---&gt;
763 [*] Multiple devices driver support (RAID and LVM) 771 [*] Multiple devices driver support (RAID and LVM)
775hardware present in your system. Be sure to enable support for the IDE 783hardware present in your system. Be sure to enable support for the IDE
776controller on your motherboard if you wish to benefit from fast DMA disk 784controller on your motherboard if you wish to benefit from fast DMA disk
777access. Refer to the <uri 785access. Refer to the <uri
778link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the 786link="/doc/en/handbook/handbook-x86.xml?part=1&amp;chap=7">Configuring the
779Kernel</uri> section of the <uri link="/doc/en/handbook/index.xml">Gentoo 787Kernel</uri> section of the <uri link="/doc/en/handbook/index.xml">Gentoo
780Handbook</uri> for additional guidance here. 788Handbook</uri> for additional guidance here.
781</p> 789</p>
782 790
783</body> 791</body>
784</section> 792</section>
785<section> 793<section>
815kernel image over. You must then update your bootloader config manually. 823kernel image over. You must then update your bootloader config manually.
816</p> 824</p>
817 825
818<pre caption="Installing the kernel"> 826<pre caption="Installing the kernel">
819# <i>mount /boot</i> 827# <i>mount /boot</i>
820# <i>cp arch/i386/boot/bzImage /boot/bzImage-2.6.9-gentoo-r2</i> 828# <i>cp arch/i386/boot/bzImage /boot/bzImage-2.6.10-gentoo-r4</i>
821# <i>cp System.map /boot/System.map-2.6.9-gentoo-r2</i>
822</pre> 829</pre>
823 830
824<p> 831<p>
825Note that the above instructions are examples only, you should follow your 832Note that the above instructions are examples only, you should follow your
826usual procedure of updating kernels by following the instructions in the <uri 833usual procedure of updating kernels by following the instructions in the <uri
863</pre> 870</pre>
864 871
865<p> 872<p>
866In the above example, we also take advantage of genkernel features to open 873In the above example, we also take advantage of genkernel features to open
867menuconfig to allow you to customise the kernel configuration (if you wish), 874menuconfig to allow you to customise the kernel configuration (if you wish),
868and to update the grub bootloader configuration after compilation. 875and to update the grub bootloader configuration after compilation.
869</p> 876</p>
870 877
871<p> 878<p>
872You should choose genkernel arguments that suit you, but do not forget to 879You should choose genkernel arguments that suit you, but do not forget to
873include the <c>--udev</c> argument! Refer to the <uri 880include the <c>--udev</c> argument! Refer to the <uri
876Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo 883Kernel</uri> chapter of the <uri link="/doc/en/handbook/index.xml">Gentoo
877Handbook</uri> for additional information. 884Handbook</uri> for additional information.
878</p> 885</p>
879 886
880<p> 887<p>
881If you choose to update your bootloader config yourself, then you must 888If you choose to update your bootloader config yourself, then you must remember
882remember to include the <c>udev</c> kernel parameter. A sample <e>grub</e> 889to include the <c>udev</c> kernel parameter. A sample <e>grub</e> config
883config section is shown below, but remember to adjust the <e>real_root</e> 890section is shown below, but remember to adjust the <e>real_root</e> parameter
884parameter for your system. 891for your system.
885</p> 892</p>
886 893
887<pre caption="Sample GRUB config for genkernel + udev"> 894<pre caption="Sample GRUB config for genkernel + udev">
888title=Gentoo Linux (2.6 kernel) 895title Gentoo Linux (2.6 kernel)
889root (hd0,0) 896root (hd0,0)
890kernel /kernel-2.6.9-gentoo-r2 <i>udev</i> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 897kernel /kernel-2.6.10-gentoo-r4 <i>udev</i> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3
891initrd /initrd-2.6.9-gentoo-r2 898initrd /initrd-2.6.10-gentoo-r4
892</pre> 899</pre>
893 900
894</body> 901</body>
895</section> 902</section>
896</chapter> 903</chapter>
946# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots. 953# /etc/modules.autoload.d/kernel-2.6: kernel modules to load when system boots.
947# 954#
948# Note that this file is for 2.6 kernels. 955# Note that this file is for 2.6 kernels.
949# 956#
950# Add the names of modules that you'd like to load when the system 957# Add the names of modules that you'd like to load when the system
951# starts into this file, one per line. Comments begin with # and 958# starts into this file, one per line. Comments begin with # and
952# are ignored. Read man modules.autoload for additional details. 959# are ignored. Read man modules.autoload for additional details.
953 960
9543c59x 9613c59x
955nvidia 962nvidia
956</pre> 963</pre>
957 964
964<section> 971<section>
965<title>Upgrading to LVM2 tools</title> 972<title>Upgrading to LVM2 tools</title>
966<body> 973<body>
967 974
968<note> 975<note>
969If you do not use LVM to manage your disk storage, you can safely skip 976If you do not use LVM to manage your disk storage, you can safely skip this
970this chapter and skip onto the next. 977chapter and skip onto the next.
971</note> 978</note>
972 979
973<p> 980<p>
974Fortunately, upgrading from the LVM1 user tools to the LVM2 versions is very 981Fortunately, upgrading from the LVM1 user tools to the LVM2 versions is very
975simple: 982simple:
976</p> 983</p>
977 984
978<pre caption="Upgrading user-tools from LVM1 to LVM2"> 985<pre caption="Upgrading user-tools from LVM1 to LVM2">
979# <i>emerge unmerge lvm-user</i> 986# <i>emerge --unmerge lvm-user</i>
980# <i>emerge lvm2</i> 987# <i>emerge lvm2</i>
981</pre> 988</pre>
982 989
983<note> 990<note>
984The LVM2 tools are fully backwards-compatible with LVM1. Your disk data will 991You will need to re-emerge <c>lvm-user</c> if you plan to go back to booting a
985not be touched. You are not breaking any backwards-compatibility by doing 9922.4 kernel, as <c>lvm2</c> by itself isn't enough for 2.4 kernels.
986this, you will continue to be able to boot 2.4 as usual.
987</note> 993</note>
988 994
989</body> 995</body>
990</section> 996</section>
991</chapter> 997</chapter>
1010Choose Linux 2.6. 1016Choose Linux 2.6.
1011</p> 1017</p>
1012 1018
1013<p> 1019<p>
1014Once the system has booted, check that things are working. If you made a 1020Once the system has booted, check that things are working. If you made a
1015mistake in the kernel configuration, don't worry, you can skip back to the 1021mistake in the kernel configuration, don't worry, you can skip back to the <uri
1016<uri link="#conf">Configuring, building, and installing the kernel</uri> 1022link="#conf">Configuring, building, and installing the kernel</uri> section,
1017section, make your change, recompile and install new kernel image, reboot, and 1023make your change, recompile and install new kernel image, reboot, and try
1018try again! 1024again!
1019</p> 1025</p>
1020 1026
1021</body> 1027</body>
1022</section> 1028</section>
1023<section> 1029<section>
1032<pre caption="Invoking the automatic ALSA configuration utility"> 1038<pre caption="Invoking the automatic ALSA configuration utility">
1033# <i>alsaconf</i> 1039# <i>alsaconf</i>
1034</pre> 1040</pre>
1035 1041
1036<p> 1042<p>
1037The process is straightforward: allow the <e>/etc/modules.d/alsa</e> file to 1043The process is straightforward: allow the <e>/etc/modules.d/alsa</e> file to be
1038be automatically updated, and then allow ALSA to be reloaded. alsaconf will 1044automatically updated, and then allow ALSA to be reloaded. alsaconf will then
1039then terminate, however you will need to run it multiple times if you have 1045terminate, however you will need to run it multiple times if you have multiple
1040multiple sound devices installed in your system. 1046sound devices installed in your system.
1041</p>
1042
1043<p> 1047</p>
1048
1049<p>
1044You should now add <c>alsasound</c> to your boot runlevel, so that volumes 1050You should now add <c>alsasound</c> to your boot runlevel, so that volumes will
1045will be saved on shutdown and restored on bootup: 1051be saved on shutdown and restored on bootup:
1046</p> 1052</p>
1047 1053
1048<pre caption="Adding alsasound to the boot runlevel"> 1054<pre caption="Adding alsasound to the boot runlevel">
1049# <i>rc-update add alsasound boot</i> 1055# <i>rc-update add alsasound boot</i>
1050</pre> 1056</pre>
1060<section> 1066<section>
1061<title>Any immediate problems?</title> 1067<title>Any immediate problems?</title>
1062<body> 1068<body>
1063 1069
1064<p> 1070<p>
1065At this stage you should refer back to the <uri link="#pitfalls">Known 1071At this stage you should refer back to the <uri link="#pitfalls">Known pitfalls
1066pitfalls with Linux 2.6 migration</uri> section which may be helpful with any 1072with Linux 2.6 migration</uri> section which may be helpful with any issues you
1067issues you encounter immediately. 1073encounter immediately.
1068</p> 1074</p>
1069 1075
1070</body> 1076</body>
1071</section> 1077</section>
1072</chapter> 1078</chapter>
1075<title>Header files and NPTL</title> 1081<title>Header files and NPTL</title>
1076<section> 1082<section>
1077<body> 1083<body>
1078 1084
1079<p> 1085<p>
1080By now you are running Linux 2.6 and hopefully have all issues ironed out. You 1086By now you are running Linux 2.6 and hopefully have all issues ironed out. You
1081should now update your Linux kernel header files and re-merge glibc so that 1087should now update your Linux kernel header files and re-merge glibc so that
1082userspace applications can take advantage of new Linux 2.6 features. 1088userspace applications can take advantage of new Linux 2.6 features.
1083</p> 1089</p>
1084 1090
1085<pre caption="Updating to linux26-headers"> 1091<pre caption="Updating to linux-headers">
1086# <i>emerge unmerge linux-headers</i>
1087# <i>emerge linux26-headers</i> 1092# <i>emerge -u linux-headers</i>
1088</pre> 1093</pre>
1089 1094
1090<p> 1095<p>
1091After updating your headers package, you should generally re-merge glibc. 1096After updating your headers package, you should generally re-merge glibc.
1092There is a new feature here that you may be interested in - NPTL. NPTL is a new 1097There is a new feature here that you may be interested in - NPTL. NPTL is a new
1095you may wish to enable it during this migration process! To enable NPTL, edit 1100you may wish to enable it during this migration process! To enable NPTL, edit
1096<path>/etc/make.conf</path>, adding <e>nptl</e> to your USE variable. 1101<path>/etc/make.conf</path>, adding <e>nptl</e> to your USE variable.
1097</p> 1102</p>
1098 1103
1099<warn> 1104<warn>
1100With the current stable glibc ebuilds, you will be unable to boot a 2.4 kernel 1105If you choose to also enable the "nptlonly" flag, be aware that you will no
1101after compiling glibc with USE="nptl". Be warned, be careful! 1106longer be able to boot a 2.4 kernel.
1102</warn> 1107</warn>
1103 1108
1104<p> 1109<p>
1105Now re-merge glibc (you should do this even if you did not choose to enable 1110Now re-merge glibc (you should do this even if you did not choose to enable
1106NPTL). 1111NPTL).
1154<title>Conclusion</title> 1159<title>Conclusion</title>
1155<body> 1160<body>
1156 1161
1157<p> 1162<p>
1158Hopefully you have just completed a smooth migration and you are enjoying the 1163Hopefully you have just completed a smooth migration and you are enjoying the
1159benefits which Linux 2.6 brings over 2.4. As I mentioned at the start, we are 1164benefits which Linux 2.6 brings over 2.4.
1160looking for feedback on this document - even if your migration went perfectly 1165</p>
1161smoothly. Please <mail link="dsd@gentoo.org">mail me</mail> your feedback so 1166
1162that we can get this document in perfect shape for when 2005.0 comes around. 1167<p>
1163Thanks! 1168I would like to say a word of thanks to the many users who effectively 'tested'
1169this document while it was in its early stages, and provided feedback about how
1170the migration process went. Sorry that I did not reply to all the emails (there
1171were a lot!), but I did read every one, and refined this document where
1172appropriate. Enjoy your 2.6-enhanced systems :)
1164</p> 1173</p>
1165 1174
1166</body> 1175</body>
1167</section> 1176</section>
1168<section> 1177<section>
1182gentoo-sources installed, you could use the following command to remove them 1191gentoo-sources installed, you could use the following command to remove them
1183while keeping the 2.6 versions intact: 1192while keeping the 2.6 versions intact:
1184</p> 1193</p>
1185 1194
1186<pre caption="Example: Removing Linux 2.4 sources"> 1195<pre caption="Example: Removing Linux 2.4 sources">
1187# <i>emerge unmerge =vanilla-sources-2.4.* =gentoo-sources-2.4.*</i> 1196# <i>emerge --unmerge =vanilla-sources-2.4.* =gentoo-sources-2.4.*</i>
1188</pre> 1197</pre>
1189 1198
1190<p> 1199<p>
1191Portage will not completely clean out your 2.4 kernel source installations, 1200Portage will not completely clean out your 2.4 kernel source installations,
1192because some temporary files are created during compilation. It is safe to 1201because some temporary files are created during compilation. It is safe to
1196<pre caption="Removing remaining temporary files"> 1205<pre caption="Removing remaining temporary files">
1197# <i>rm -rf /usr/src/linux-2.4.*</i> 1206# <i>rm -rf /usr/src/linux-2.4.*</i>
1198</pre> 1207</pre>
1199 1208
1200<p> 1209<p>
1201You can additionally remove modules and information files relating to your 1210You can additionally remove modules and information files relating to your old
1202old 2.4 kernel installations, as these are no longer needed. 12112.4 kernel installations, as these are no longer needed.
1203</p> 1212</p>
1204 1213
1205<pre caption="Removing previously-installed 2.4 modules"> 1214<pre caption="Removing previously-installed 2.4 modules">
1206# <i>rm -rf /lib/modules/2.4.*</i> 1215# <i>rm -rf /lib/modules/2.4.*</i>
1207</pre> 1216</pre>
1208 1217
1209<p> 1218<p>
1210The 2.4 kernel binaries you used to boot from can also be safely removed. 1219The 2.4 kernel binaries you used to boot from can also be safely removed. You
1211You should mount your <c>/boot</c> partition, and remove those images. You 1220should mount your <c>/boot</c> partition, and remove those images. You should
1212should also update your bootloader configuration so that it no longer 1221also update your bootloader configuration so that it no longer references these
1213references these deleted kernel images. 1222deleted kernel images.
1214</p> 1223</p>
1215 1224
1216<p> 1225<p>
1217Some Linux 2.4 users will have previously installed the <c>alsa-driver</c> 1226Some Linux 2.4 users will have previously installed the <c>alsa-driver</c>
1218package to benefit from the new audio capabilities included in Linux 2.6. If 1227package to benefit from the new audio capabilities included in Linux 2.6. If
1233The devfs management daemon, <c>devfsd</c>, can also safely be removed, now 1242The devfs management daemon, <c>devfsd</c>, can also safely be removed, now
1234that we are using <c>udev</c> for device management. 1243that we are using <c>udev</c> for device management.
1235</p> 1244</p>
1236 1245
1237<pre caption="Removing alsa-driver, i2c, and devfsd"> 1246<pre caption="Removing alsa-driver, i2c, and devfsd">
1238# <i>emerge unmerge alsa-driver i2c devfsd</i> 1247# <i>emerge --unmerge alsa-driver i2c devfsd</i>
1239</pre> 1248</pre>
1240 1249
1241<p> 1250<p>
1242If you are LVM2 user, you may wish to convert your data into the LVM2 data 1251If you are LVM2 user, you may wish to convert your data into the LVM2 data
1243format in order to benefit from the advantages which LVM2 provides. 1252format in order to benefit from the advantages which LVM2 provides. However,
1244However, this operation will prevent you from ever accessing your LVM data 1253this operation will prevent you from ever accessing your LVM data from a 2.4
1245from a 2.4 kernel. If you want to continue with the conversion (this is totally 1254kernel. If you want to continue with the conversion (this is totally
1246optional!), then you should examine the <c>vgconvert</c> man page for 1255optional!), then you should examine the <c>vgconvert</c> man page for
1247instructions on how to carry this out. An example is shown below, where 1256instructions on how to carry this out. An example is shown below, where
1248<c>main</c> is the volume group name. 1257<c>main</c> is the volume group name.
1249</p> 1258</p>
1250 1259

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20