/[gentoo]/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml
Gentoo

Contents of /xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.14 - (hide annotations) (download) (as text)
Sat Jul 2 09:53:51 2005 UTC (9 years, 5 months ago) by swift
Branch: MAIN
Changes since 1.13: +11 -11 lines
File MIME type: application/xml
Fix pre captions

1 neysx 1.13 <?xml version="1.0" encoding="UTF-8"?>
2    
3 swift 1.14 <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/new-upgrade-to-gentoo-1.4.xml,v 1.13 2005/06/05 16:25:51 neysx Exp $ -->
4 neysx 1.13
5 rac 1.1 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
6    
7 swift 1.9 <guide link="new-upgrade-to-gentoo-1.4.xml">
8 rac 1.1
9     <title>Gentoo 1.4 Upgrade Guide</title>
10    
11 neysx 1.13 <author title="Author">
12     <mail link="rac@gentoo.org">Robert Coie</mail>
13 rac 1.1 </author>
14    
15 neysx 1.13 <author title="Copy Editor">
16     <mail link="avenj@gentoo.org">Jon Portnoy</mail>
17 rac 1.1 </author>
18    
19 neysx 1.13 <abstract>A method for upgrading older Gentoo installations in place to Gentoo 1.4</abstract>
20    
21     <!-- The content of this document is licensed under the CC-BY-SA license -->
22     <!-- See http://creativecommons.org/licenses/by-sa/2.0 -->
23     <license/>
24    
25 swift 1.14 <version>0.4</version>
26     <date>2005-07-02</date>
27 neysx 1.13
28     <chapter>
29     <title>Before you begin</title>
30     <section>
31     <title>Be prepared</title>
32     <body>
33    
34     <p>
35     As with any major upgrade to the core of your Gentoo system, there is always the
36     possibility that unforeseen problems will ensue. It is always prudent to back
37     up all important data before beginning this process. If possible, try to
38     allocate a large block of time for this upgrade, so that you will not feel
39     rushed. All the software on your machine will need to be recompiled.
40     </p>
41 rac 1.1
42 neysx 1.13 </body>
43     </section>
44     <section>
45     <title>Other options</title>
46     <body>
47    
48     <p>
49     This is not the only way to upgrade your system. You can install a new 1.4
50     system onto a separate partition and reuse some of your system configuration
51     instead. This method also has the advantage that you can always go back to your
52     old system in the meantime as a fallback. You may also decide to simply not
53     upgrade your system. If you decide you want to upgrade in place, read on.
54     </p>
55    
56     </body>
57     </section>
58     <section>
59     <title>General notes</title>
60     <body>
61    
62     <p>
63     Whenever the code listings suggest running the <c>emerge</c> command, it is
64     always a good idea to make a test run of the command using the <c>-p</c> or
65     <c>--pretend</c> option to make sure that the command will do what you expect it
66     to do.
67     </p>
68 swift 1.4
69 neysx 1.13 </body>
70     </section>
71     </chapter>
72     <chapter>
73     <title>Upgrading in place</title>
74     <section>
75     <title>Get Portage as current as possible</title>
76     <body>
77 rac 1.1
78 neysx 1.13 <p>
79     Some of the syntax of current ebuilds is unreadable by older versions of
80     Portage. If you don't have at least Portage 2.0.44, try upgrading Portage.
81     </p>
82    
83 swift 1.14 <pre caption="Updating Portage">
84 cam 1.11 # <i>emerge --sync</i>
85 rac 1.1 # <i>emerge -u portage</i>
86     </pre>
87    
88 neysx 1.13 <note>
89     If your Portage version is very old, you may get an error message containing the
90     phrase "unscriptable object". Read and follow the instructions in
91     <path>/usr/portage/sys-apps/portage/files/README.RESCUE</path>. Your Portage
92     install should then be current.
93     </note>
94    
95     </body>
96     </section>
97     <section>
98     <title>Preparing GCC for cohabitation</title>
99     <body>
100    
101     <p>
102     You will be installing a newer version of GCC during this upgrade. Versions of
103     GCC older than 2.95.3-r8 are not designed to have multiple versions of GCC
104     installed. You must therefore upgrade GCC to at least version 2.95.3-r8. This
105     will also have the beneficial side-effect of installing the <c>gcc-config</c>
106     package on your system, which can be used to switch back and forth between
107     various installed versions of GCC.
108     </p>
109    
110 swift 1.14 <pre caption="Updating GCC">
111 rac 1.1 # <i>emerge -u gcc</i>
112     </pre>
113    
114 neysx 1.13 <p>
115     You can now check to see if gcc-config is working properly:
116     </p>
117    
118 swift 1.14 <pre caption="Verifying GCC profile">
119 cam 1.8 # <i>gcc-config --get-current-profile</i>
120 rac 1.1 </pre>
121 neysx 1.13
122     <p>
123     This should return i686-pc-linux-gnu-2.95.3 on most x86 systems. Older systems
124     may return i586-pc-linux-gnu-2.95.3.
125     </p>
126    
127     </body>
128     </section>
129     <section>
130     <title>Installing GCC 3</title>
131     <body>
132    
133     <p>
134     Now you can install a newer version of GCC without damaging your current
135     compiler. Look in <path>/usr/portage/sys-devel/gcc</path> for a version of the
136     GCC ebuild that is at least 3.2.1-r6. Choose the highest version that is marked
137     stable for your architecture. To see if an ebuild is considered stable for your
138     architecture, look for the KEYWORDS line in the ebuild file. If it has your
139     architecture listed without a ~ in front of it, it is considered stable.
140     Assuming 3.2.2 is the most current stable version, we first need to remove the
141     glibc dependency from gcc.
142     </p>
143 swift 1.10
144     <p>
145     Edit <path>/usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</path> and search for the
146     line containing <c>DEPEND</c>. Remove the <c>glibc</c> dependency and save the
147     ebuild.
148     </p>
149    
150     <pre caption="Editing gcc-3.2.2.ebuild">
151     # <i>vim /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i>
152     </pre>
153    
154     <p>
155     Now install the latest GCC version on your system:
156     </p>
157    
158 swift 1.14 <pre caption="Install the latest GCC">
159 swift 1.10 # <i>USE="-java" emerge /usr/portage/sys-devel/gcc/gcc-3.2.2.ebuild</i>
160 rac 1.1 </pre>
161 neysx 1.13
162     </body>
163     </section>
164     <section>
165     <title>Changing profiles</title>
166     <body>
167    
168     <p>
169     Now you need to change two sets of profiles: your gcc-config profile and your
170     Portage profile.
171     </p>
172    
173 swift 1.14 <pre caption="Change the Portage profile">
174 rac 1.1 # <i>cd /etc</i>
175     # <i>rm make.profile</i>
176 neysx 1.13 <comment>(Replace "x86" with your architecture)</comment>
177     # <i>ln -s ../usr/portage/profiles/default-x86-1.4 make.profile</i>
178     </pre>
179    
180 swift 1.14 <pre caption="Change the GCC profile">
181 neysx 1.13 <comment>(Note the one for the version you just emerged, use it below)</comment>
182     # <i>gcc-config --list-profiles</i>
183     <comment>(Replace with the version you noted above)</comment>
184     # <i>gcc-config i686-pc-linux-gnu-3.2.2</i>
185 rac 1.1 </pre>
186    
187 neysx 1.13 </body>
188     </section>
189     <section>
190     <title>Recompile toolchain</title>
191     <body>
192    
193     <p>
194     Now you need to recompile your core toolchain with your new compiler. If you
195     are continuing in the same shell, you need to run <c>source /etc/profile</c> as
196     gcc-config instructed you to. Then emerge glibc and binutils using your new
197     compiler:
198     </p>
199    
200 swift 1.14 <pre caption="Rebuilding the toolchain">
201 rac 1.1 # <i>emerge glibc binutils</i>
202     </pre>
203 neysx 1.13
204     <warn>
205     It is quite likely that you will upgrade glibc from a 2.2 or older version to
206     2.3. Do not downgrade glibc afterwards. Any software you have compiled against
207     glibc 2.3 will stop working, and this can make your system unusable.
208     </warn>
209    
210     </body>
211     </section>
212     <section>
213     <title>Recompiling everything with your new compiler</title>
214     <body>
215    
216     <p>
217     Now you may recompile everything on your system with your new compiler:
218     </p>
219    
220 swift 1.14 <pre caption="Rebuilding the entire system">
221 rac 1.1 # <i>emerge -e world</i>
222     </pre>
223 neysx 1.13
224     <note>
225     If this command fails at any point due to errors, you
226     can use <c>emerge --resume</c> to continue the process where
227     you left off. This requires Portage 2.0.47 or later.
228     </note>
229    
230     </body>
231     </section>
232     </chapter>
233 rac 1.1 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20