/[gentoo]/xml/htdocs/doc/en/handbook/hb-install-system.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-install-system.xml

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

Revision 1.125 Revision 1.132
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.132 2013/01/20 18:11:00 swift Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<abstract> 11<abstract>
12After installing and configuring a stage3, the eventual result is that you 12After installing and configuring a stage3, the eventual result is that you
13have a Gentoo base system at your disposal. This chapter describes how 13have a Gentoo base system at your disposal. This chapter describes how
14to progress to that state. 14to progress to that state.
15</abstract> 15</abstract>
16 16
17<version>17</version> 17<version>24</version>
18<date>2012-07-24</date> 18<date>2013-01-20</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>
27In order to download source code quickly it is recommended to select a fast 27In order to download source code quickly it is recommended to select a fast
28mirror. Portage will look in your <path>make.conf</path> file for the 28mirror. Portage will look in your <path>make.conf</path> file for the
29GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to 29GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to
30our <uri link="/main/en/mirrors.xml">mirror list</uri> and search 30our <uri link="/main/en/mirrors.xml">mirror list</uri> and search
31for a mirror (or mirrors) close to you (as those are most frequently the 31for a mirror (or mirrors) close to you (as those are most frequently the
32fastest ones), but we provide a nice tool called <c>mirrorselect</c> which 32fastest ones), but we provide a nice tool called <c>mirrorselect</c> which
33provides you with a nice interface to select the mirrors you want. Just 33provides you with a nice interface to select the mirrors you want. Just
74<p> 74<p>
75One thing still remains to be done before we enter the new environment and that 75One thing still remains to be done before we enter the new environment and that
76is copying over the DNS information in <path>/etc/resolv.conf</path>. You need 76is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
77to do this to ensure that networking still works even after entering the new 77to do this to ensure that networking still works even after entering the new
78environment. <path>/etc/resolv.conf</path> contains the nameservers for your 78environment. <path>/etc/resolv.conf</path> contains the nameservers for your
79network. 79network.
80</p> 80</p>
81 81
82<pre caption="Copy over DNS information"> 82<pre caption="Copy over DNS information">
83<comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment> 83<comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
84# <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i> 84# <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/</i>
85</pre> 85</pre>
86 86
87</body> 87</body>
88</subsection> 88</subsection>
89<subsection test="not(func:keyval('arch')='IA64')"> 89<subsection>
90<title>Mounting the necessary Filesystems</title> 90<title>Mounting the necessary Filesystems</title>
91<body> 91<body>
92 92
93<p> 93<p>
94In a few moments, we will change the Linux root towards the new location. To 94In a few moments, we will change the Linux root towards the new location. To
95make sure that the new environment works properly, we need to make certain file 95make sure that the new environment works properly, we need to make certain file
96systems available there as well. 96systems available there as well.
97</p> 97</p>
98 98
99<p> 99<p>
100Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to 100Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
101allow the installation to use the kernel-provided information within the 101allow the installation to use the kernel-provided information within the
102chrooted environment, and then mount-bind the <path>/dev</path> and 102chrooted environment, and then mount-bind the <path>/dev</path> and
103<path>/sys</path> filesystems. 103<path>/sys</path> filesystems.
104</p> 104</p>
105 105
106<pre caption="Mounting /proc and /dev"> 106<pre caption="Mounting /proc and /dev">
107# <i>mount -t proc none /mnt/gentoo/proc</i> 107# <i>mount -t proc none /mnt/gentoo/proc</i>
108# <i>mount --rbind /sys /mnt/gentoo/sys</i> 108# <i>mount --rbind /sys /mnt/gentoo/sys</i>
109# <i>mount --rbind /dev /mnt/gentoo/dev</i> 109# <i>mount --rbind /dev /mnt/gentoo/dev</i>
110</pre>
111
112</body>
113</subsection>
114<subsection test="func:keyval('arch')='IA64'">
115<title>Mounting the /proc, /sys and /dev Filesystems</title>
116<body>
117
118<p>
119Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
120allow the installation to use the kernel-provided information within the
121chrooted environment, and then mount-bind the <path>/dev</path> and
122<path>/sys</path> filesystems.
123</p>
124
125<pre caption="Mounting /proc /sys and /dev">
126# <i>mount -t proc none /mnt/gentoo/proc</i>
127# <i>mount --rbind /dev /mnt/gentoo/dev</i>
128# <i>mount --rbind /sys /mnt/gentoo/sys</i>
129</pre> 110</pre>
130 111
131</body> 112</body>
132</subsection> 113</subsection>
133<subsection> 114<subsection>
134<title>Entering the new Environment</title> 115<title>Entering the new Environment</title>
135<body> 116<body>
136 117
137<p> 118<p>
138Now that all partitions are initialized and the base environment 119Now that all partitions are initialized and the base environment
139installed, it is time to enter our new installation environment by 120installed, it is time to enter our new installation environment by
140<e>chrooting</e> into it. This means that we change from the current 121<e>chrooting</e> into it. This means that we change from the current
141installation environment (Installation CD or other installation medium) to your 122installation environment (Installation CD or other installation medium) to your
142installation system (namely the initialized partitions). 123installation system (namely the initialized partitions).
143</p> 124</p>
144 125
145<p> 126<p>
146This chrooting is done in three steps. First we will change the root 127This chrooting is done in three steps. First we will change the root
147from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path> 128from <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 129(on your partitions) using <c>chroot</c>. Then we will reload some settings, as
149using <c>env-update</c>, which essentially creates environment variables. 130provided by <path>/etc/profile</path>, in memory using <c>source</c>.
150Finally, we load those variables into memory using <c>source</c>. 131The last step is to redefine the primary prompt to help us remember that we are
132inside a chroot environment.
151</p> 133</p>
152 134
153<pre caption = "Chrooting into the new environment"> 135<pre caption = "Chrooting into the new environment">
154# <i>chroot /mnt/gentoo /bin/bash</i> 136# <i>chroot /mnt/gentoo /bin/bash</i>
155# <i>env-update</i>
156>> Regenerating /etc/ld.so.cache...
157# <i>source /etc/profile</i> 137# <i>source /etc/profile</i>
158# <i>export PS1="(chroot) $PS1"</i> 138# <i>export PS1="(chroot) $PS1"</i>
159</pre> 139</pre>
160 140
161<p> 141<p>
162Congratulations! You are now inside your own Gentoo Linux environment. 142Congratulations! You are now inside your own Gentoo Linux environment.
163Of course it is far from finished, which is why the installation still 143Of course it is far from finished, which is why the installation still
164has some sections left :-) 144has some sections left :-)
165</p> 145</p>
166 146
167<p> 147<p>
168If you at any time would need another terminal or console to access the chroot 148If you at any time would need another terminal or console to access the chroot
169environment, all you need to do is to execute the above steps again. 149environment, all you need to do is to execute the above steps again.
170</p> 150</p>
171 151
172</body> 152</body>
173</subsection> 153</subsection>
174</section> 154</section>
175 155
176<section> 156<section id="installing_portage">
177<title>Configuring Portage</title> 157<title>Configuring Portage</title>
178<subsection> 158<subsection>
179<title>Updating the Portage tree</title> 159<title>Unpacking a Portage Snapshot</title>
160<body>
161
162<p>
163You now have to install a Portage snapshot, a collection of files that inform
164Portage what software titles you can install, which profiles are available, etc.
165The contents of this snapshot will be extracted to <path>/usr/portage</path>.
166</p>
167
168<p>
169We recommend the use of <c>emerge-webrsync</c>. This will fetch the latest
170portage snapshot (which Gentoo releases on a daily basis) from one of our mirrors
171and install it onto your system.
172</p>
173
174<pre caption="Running emerge-webrsync to install a Portage snapshot">
175# <i>mkdir /usr/portage</i>
176# <i>emerge-webrsync</i>
177</pre>
178
180<body> 179</body>
180</subsection>
181<subsection>
182<title>Optional: Updating the Portage tree</title>
183<body>
181 184
182<p> 185<p>
183You should now update your Portage tree to the latest version. <c>emerge 186You can now update your Portage tree to the latest version. <c>emerge
184--sync</c> does this for you. 187--sync</c> will use the rsync protocol to update the Portage tree (which
188you fetched earlier on through <c>emerge-webrsync</c>) to the latest state.
185</p> 189</p>
186 190
187<pre caption="Updating the Portage tree"> 191<pre caption="Updating the Portage tree">
188# <i>emerge --sync</i> 192# <i>emerge --sync</i>
189<comment>(If you're using a slow terminal like some framebuffers or a serial 193<comment>(If you're using a slow terminal like some framebuffers or a serial
190console, you can add the --quiet option to speed up this process:)</comment> 194console, you can add the --quiet option to speed up this process:)</comment>
191# <i>emerge --sync --quiet</i> 195# <i>emerge --sync --quiet</i>
192</pre> 196</pre>
193 197
194<p> 198<p>
195If you are behind a firewall that blocks rsync traffic, you can use 199If 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 200step as you already have a quite up-to-date Portage tree.
197you.
198</p> 201</p>
199 202
200<p> 203<p>
201If you are warned that a new Portage version is available and that you should 204If you are warned that a new Portage version is available and that you should
202update Portage, you should do it now using <c>emerge --oneshot portage</c>. 205update Portage, you should do it now using <c>emerge --oneshot portage</c>. You
206might also be notified that "news items need reading". More on that next.
207</p>
208
209</body>
210</subsection>
211<subsection>
212<title>Reading News Items</title>
213<body>
214
215<p>
216When a Portage tree is synchronized to your system, Portage might warn you with
217the following:
218</p>
219
220<pre caption="Portage informing that news items are available">
221 * IMPORTANT: 2 news items need reading for repository 'gentoo'.
222 * Use eselect news to read news items.
223</pre>
224
225<p>
226Portage news items were created to provide a communication medium to push
227critical messages to users via the rsync tree. To manage them you will need to
228use <c>eselect news</c>. With the <c>read</c> subcommand, you can read all news
229items. With <c>list</c> you can get an overview of the available news items, and
230with <c>purge</c> you can remove them once you have read them and have no
231further need for the item(s) anymore.
232</p>
233
234<pre caption="Handling Portage news">
235# <i>eselect news list</i>
236# <i>eselect news read</i>
237</pre>
238
239<p>
240More information about the newsreader is available through its manual page:
241<c>man news.eselect</c>.
203</p> 242</p>
204 243
205</body> 244</body>
206</subsection> 245</subsection>
207<subsection> 246<subsection>
208<title>Choosing the Right Profile</title> 247<title>Choosing the Right Profile</title>
209<body> 248<body>
210 249
211<p> 250<p>
212First, a small definition is in place. 251First, a small definition is in place.
213</p> 252</p>
214 253
215<p> 254<p>
216A profile is a building block for any Gentoo system. Not only does it specify 255A profile is a building block for any Gentoo system. Not only does it specify
217default values for USE, CFLAGS and other important variables, it also locks 256default values for USE, CFLAGS and other important variables, it also locks

Legend:
Removed from v.1.125  
changed lines
  Added in v.1.132

  ViewVC Help
Powered by ViewVC 1.1.20