| 1 | <?xml version='1.0' encoding='UTF-8'?> |
1 | <?xml version='1.0' encoding='UTF-8'?> |
| 2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
2 | <!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
| 3 | |
3 | |
| 4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
4 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
5 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 6 | |
6 | |
| 7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.125 2012/07/24 12:12:52 swift Exp $ --> |
7 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.130 2013/01/08 19:18:37 swift Exp $ --> |
| 8 | |
8 | |
| 9 | <sections> |
9 | <sections> |
| 10 | |
10 | |
| 11 | <abstract> |
11 | <abstract> |
| 12 | After installing and configuring a stage3, the eventual result is that you |
12 | After installing and configuring a stage3, the eventual result is that you |
| 13 | have a Gentoo base system at your disposal. This chapter describes how |
13 | have a Gentoo base system at your disposal. This chapter describes how |
| 14 | to progress to that state. |
14 | to progress to that state. |
| 15 | </abstract> |
15 | </abstract> |
| 16 | |
16 | |
| 17 | <version>17</version> |
17 | <version>22</version> |
| 18 | <date>2012-07-24</date> |
18 | <date>2013-01-08</date> |
| 19 | |
19 | |
| 20 | <section> |
20 | <section> |
| 21 | <title>Chrooting</title> |
21 | <title>Chrooting</title> |
| 22 | <subsection> |
22 | <subsection> |
| 23 | <title>Optional: Selecting Mirrors</title> |
23 | <title>Optional: Selecting Mirrors</title> |
| 24 | <body> |
24 | <body> |
| 25 | |
25 | |
| 26 | <p> |
26 | <p> |
| 27 | In order to download source code quickly it is recommended to select a fast |
27 | In order to download source code quickly it is recommended to select a fast |
| 28 | mirror. Portage will look in your <path>make.conf</path> file for the |
28 | mirror. Portage will look in your <path>make.conf</path> file for the |
| 29 | GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to |
29 | GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to |
| 30 | our <uri link="/main/en/mirrors.xml">mirror list</uri> and search |
30 | our <uri link="/main/en/mirrors.xml">mirror list</uri> and search |
| 31 | for a mirror (or mirrors) close to you (as those are most frequently the |
31 | for a mirror (or mirrors) close to you (as those are most frequently the |
| 32 | fastest ones), but we provide a nice tool called <c>mirrorselect</c> which |
32 | fastest ones), but we provide a nice tool called <c>mirrorselect</c> which |
| 33 | provides you with a nice interface to select the mirrors you want. Just |
33 | provides you with a nice interface to select the mirrors you want. Just |
| … | |
… | |
| 133 | <subsection> |
133 | <subsection> |
| 134 | <title>Entering the new Environment</title> |
134 | <title>Entering the new Environment</title> |
| 135 | <body> |
135 | <body> |
| 136 | |
136 | |
| 137 | <p> |
137 | <p> |
| 138 | Now that all partitions are initialized and the base environment |
138 | Now that all partitions are initialized and the base environment |
| 139 | installed, it is time to enter our new installation environment by |
139 | installed, it is time to enter our new installation environment by |
| 140 | <e>chrooting</e> into it. This means that we change from the current |
140 | <e>chrooting</e> into it. This means that we change from the current |
| 141 | installation environment (Installation CD or other installation medium) to your |
141 | installation environment (Installation CD or other installation medium) to your |
| 142 | installation system (namely the initialized partitions). |
142 | installation system (namely the initialized partitions). |
| 143 | </p> |
143 | </p> |
| 144 | |
144 | |
| 145 | <p> |
145 | <p> |
| 146 | This chrooting is done in three steps. First we will change the root |
146 | This chrooting is done in three steps. First we will change the root |
| 147 | from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path> |
147 | from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path> |
| 148 | (on your partitions) using <c>chroot</c>. Then we will create a new environment |
148 | (on your partitions) using <c>chroot</c>. Then we will reload some settings, as |
| 149 | using <c>env-update</c>, which essentially creates environment variables. |
149 | provided by <path>/etc/profile</path>, in memory using <c>source</c>. |
| 150 | Finally, we load those variables into memory using <c>source</c>. |
150 | The last step is to redefine the primary prompt to help us remember that we are |
|
|
151 | inside a chroot environment. |
| 151 | </p> |
152 | </p> |
| 152 | |
153 | |
| 153 | <pre caption = "Chrooting into the new environment"> |
154 | <pre caption = "Chrooting into the new environment"> |
| 154 | # <i>chroot /mnt/gentoo /bin/bash</i> |
155 | # <i>chroot /mnt/gentoo /bin/bash</i> |
| 155 | # <i>env-update</i> |
|
|
| 156 | >> Regenerating /etc/ld.so.cache... |
|
|
| 157 | # <i>source /etc/profile</i> |
156 | # <i>source /etc/profile</i> |
| 158 | # <i>export PS1="(chroot) $PS1"</i> |
157 | # <i>export PS1="(chroot) $PS1"</i> |
| 159 | </pre> |
158 | </pre> |
| 160 | |
159 | |
| 161 | <p> |
160 | <p> |
| 162 | Congratulations! You are now inside your own Gentoo Linux environment. |
161 | Congratulations! You are now inside your own Gentoo Linux environment. |
| 163 | Of course it is far from finished, which is why the installation still |
162 | Of course it is far from finished, which is why the installation still |
| 164 | has some sections left :-) |
163 | has some sections left :-) |
| 165 | </p> |
164 | </p> |
| 166 | |
165 | |
| 167 | <p> |
166 | <p> |
| 168 | If you at any time would need another terminal or console to access the chroot |
167 | If you at any time would need another terminal or console to access the chroot |
| 169 | environment, all you need to do is to execute the above steps again. |
168 | environment, all you need to do is to execute the above steps again. |
| 170 | </p> |
169 | </p> |
| 171 | |
170 | |
| 172 | </body> |
171 | </body> |
| 173 | </subsection> |
172 | </subsection> |
| 174 | </section> |
173 | </section> |
| 175 | |
174 | |
| 176 | <section> |
175 | <section id="installing_portage"> |
| 177 | <title>Configuring Portage</title> |
176 | <title>Configuring Portage</title> |
| 178 | <subsection> |
177 | <subsection> |
| 179 | <title>Updating the Portage tree</title> |
178 | <title>Unpacking a Portage Snapshot</title> |
|
|
179 | <body> |
|
|
180 | |
|
|
181 | <p> |
|
|
182 | You now have to install a Portage snapshot, a collection of files that inform |
|
|
183 | Portage what software titles you can install, which profiles are available, etc. |
|
|
184 | The contents of this snapshot will be extracted to <path>/usr/portage</path>. |
|
|
185 | </p> |
|
|
186 | |
|
|
187 | <p> |
|
|
188 | We recommend the use of <c>emerge-webrsync</c>. This will fetch the latest |
|
|
189 | portage snapshot (which Gentoo releases on a daily basis) from one of our mirrors |
|
|
190 | and install it onto your system. |
|
|
191 | </p> |
|
|
192 | |
|
|
193 | <pre caption="Running emerge-webrsync to install a Portage snapshot"> |
|
|
194 | # <i>mkdir /usr/portage</i> |
|
|
195 | # <i>emerge-webrsync</i> |
|
|
196 | </pre> |
|
|
197 | |
| 180 | <body> |
198 | </body> |
|
|
199 | </subsection> |
|
|
200 | <subsection> |
|
|
201 | <title>Optional: Updating the Portage tree</title> |
|
|
202 | <body> |
| 181 | |
203 | |
| 182 | <p> |
204 | <p> |
| 183 | You should now update your Portage tree to the latest version. <c>emerge |
205 | You can now update your Portage tree to the latest version. <c>emerge |
| 184 | --sync</c> does this for you. |
206 | --sync</c> will use the rsync protocol to update the Portage tree (which |
|
|
207 | you fetched earlier on through <c>emerge-webrsync</c>) to the latest state. |
| 185 | </p> |
208 | </p> |
| 186 | |
209 | |
| 187 | <pre caption="Updating the Portage tree"> |
210 | <pre caption="Updating the Portage tree"> |
| 188 | # <i>emerge --sync</i> |
211 | # <i>emerge --sync</i> |
| 189 | <comment>(If you're using a slow terminal like some framebuffers or a serial |
212 | <comment>(If you're using a slow terminal like some framebuffers or a serial |
| 190 | console, you can add the --quiet option to speed up this process:)</comment> |
213 | console, you can add the --quiet option to speed up this process:)</comment> |
| 191 | # <i>emerge --sync --quiet</i> |
214 | # <i>emerge --sync --quiet</i> |
| 192 | </pre> |
215 | </pre> |
| 193 | |
216 | |
| 194 | <p> |
217 | <p> |
| 195 | If you are behind a firewall that blocks rsync traffic, you can use |
218 | If you are behind a firewall that blocks rsync traffic, you safely ignore this |
| 196 | <c>emerge-webrsync</c> which will download and install a portage snapshot for |
219 | step as you already have a quite up-to-date Portage tree. |
| 197 | you. |
|
|
| 198 | </p> |
220 | </p> |
| 199 | |
221 | |
| 200 | <p> |
222 | <p> |
| 201 | If you are warned that a new Portage version is available and that you should |
223 | If you are warned that a new Portage version is available and that you should |
| 202 | update Portage, you should do it now using <c>emerge --oneshot portage</c>. |
224 | update Portage, you should do it now using <c>emerge --oneshot portage</c>. |
| 203 | </p> |
225 | </p> |
| 204 | |
226 | |
| 205 | </body> |
227 | </body> |
| 206 | </subsection> |
228 | </subsection> |
| 207 | <subsection> |
229 | <subsection> |
| 208 | <title>Choosing the Right Profile</title> |
230 | <title>Choosing the Right Profile</title> |
| 209 | <body> |
231 | <body> |
| 210 | |
232 | |
| 211 | <p> |
233 | <p> |
| 212 | First, a small definition is in place. |
234 | First, a small definition is in place. |