| 1 |
swift |
1.26 |
<?xml version='1.0' encoding='UTF-8'?>
|
| 2 |
|
|
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
|
| 3 |
|
|
|
| 4 |
swift |
1.6 |
<!-- The content of this document is licensed under the CC-BY-SA license -->
|
| 5 |
|
|
<!-- See http://creativecommons.org/licenses/by-sa/1.0 -->
|
| 6 |
|
|
|
| 7 |
neysx |
1.84 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-system.xml,v 1.83 2005/08/09 09:43:58 swift Exp $ -->
|
| 8 |
swift |
1.11 |
|
| 9 |
swift |
1.3 |
<sections>
|
| 10 |
swift |
1.56 |
|
| 11 |
neysx |
1.84 |
<version>2.11</version>
|
| 12 |
|
|
<date>2005-08-17</date>
|
| 13 |
swift |
1.56 |
|
| 14 |
swift |
1.1 |
<section>
|
| 15 |
swift |
1.3 |
<title>Chrooting</title>
|
| 16 |
swift |
1.1 |
<subsection>
|
| 17 |
swift |
1.2 |
<title>Optional: Selecting Mirrors</title>
|
| 18 |
|
|
<body>
|
| 19 |
|
|
|
| 20 |
|
|
<p>
|
| 21 |
swift |
1.70 |
In order to download source code quickly it is recommended to select a fast
|
| 22 |
|
|
mirror. Portage will look in your <path>make.conf</path> file for the
|
| 23 |
|
|
GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to
|
| 24 |
|
|
our <uri link="/main/en/mirrors.xml">mirror list</uri> and search
|
| 25 |
|
|
for a mirror (or mirrors) close to you (as those are most frequently the
|
| 26 |
|
|
fastest ones), but we provide a nice tool called <c>mirrorselect</c> which
|
| 27 |
|
|
provides you with a nice interface to select the mirrors you want.
|
| 28 |
|
|
</p>
|
| 29 |
|
|
|
| 30 |
|
|
<pre caption="Using mirrorselect for the GENTOO_MIRRORS variable">
|
| 31 |
|
|
# <i>mirrorselect -i -o >> /mnt/gentoo/etc/make.conf</i>
|
| 32 |
|
|
</pre>
|
| 33 |
|
|
|
| 34 |
swift |
1.71 |
<warn>
|
| 35 |
|
|
Do not select any IPv6 mirrors. Our stages currently do not support IPv6.
|
| 36 |
|
|
</warn>
|
| 37 |
|
|
|
| 38 |
swift |
1.70 |
<p>
|
| 39 |
|
|
A second important setting is the SYNC setting in <path>make.conf</path>. This
|
| 40 |
|
|
variable contains the rsync server you want to use when updating your Portage
|
| 41 |
|
|
tree (the collection of ebuilds, scripts containing all the information Portage
|
| 42 |
|
|
needs to download and install software). Although you can manually enter a SYNC
|
| 43 |
|
|
server for yourself, <c>mirrorselect</c> can ease that operation for you:
|
| 44 |
swift |
1.2 |
</p>
|
| 45 |
|
|
|
| 46 |
swift |
1.70 |
<pre caption="Selecting an rsync mirror using mirrorselect">
|
| 47 |
|
|
# <i>mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf</i>
|
| 48 |
swift |
1.2 |
</pre>
|
| 49 |
|
|
|
| 50 |
|
|
<p>
|
| 51 |
swift |
1.70 |
After running <c>mirrorselect</c> it is adviseable to double-check the settings
|
| 52 |
|
|
in <path>/mnt/gentoo/etc/make.conf</path> !
|
| 53 |
swift |
1.2 |
</p>
|
| 54 |
|
|
|
| 55 |
|
|
</body>
|
| 56 |
swift |
1.3 |
</subsection>
|
| 57 |
|
|
<subsection>
|
| 58 |
swift |
1.5 |
<title>Copy DNS Info</title>
|
| 59 |
|
|
<body>
|
| 60 |
|
|
|
| 61 |
|
|
<p>
|
| 62 |
swift |
1.24 |
One thing still remains to be done before we enter the new environment and that
|
| 63 |
|
|
is copying over the DNS information in <path>/etc/resolv.conf</path>. You need
|
| 64 |
swift |
1.5 |
to do this to ensure that networking still works even after entering the new
|
| 65 |
|
|
environment. <path>/etc/resolv.conf</path> contains the nameservers for your
|
| 66 |
|
|
network.
|
| 67 |
|
|
</p>
|
| 68 |
|
|
|
| 69 |
|
|
<pre caption="Copy over DNS information">
|
| 70 |
swift |
1.35 |
<comment>(The "-L" option is needed to make sure we don't copy a symbolic link)</comment>
|
| 71 |
|
|
# <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i>
|
| 72 |
swift |
1.18 |
</pre>
|
| 73 |
|
|
|
| 74 |
|
|
</body>
|
| 75 |
|
|
</subsection>
|
| 76 |
|
|
<subsection>
|
| 77 |
swift |
1.43 |
<title>Mounting the proc Filesystem</title>
|
| 78 |
|
|
<body>
|
| 79 |
|
|
|
| 80 |
|
|
<p>
|
| 81 |
|
|
Mount the <path>/proc</path> filesystem on <path>/mnt/gentoo/proc</path> to
|
| 82 |
|
|
allow the installation to use the kernel-provided information even within the
|
| 83 |
|
|
chrooted environment.
|
| 84 |
|
|
</p>
|
| 85 |
|
|
|
| 86 |
|
|
<pre caption="Mounting /proc">
|
| 87 |
|
|
# <i>mount -t proc none /mnt/gentoo/proc</i>
|
| 88 |
|
|
</pre>
|
| 89 |
|
|
|
| 90 |
|
|
</body>
|
| 91 |
|
|
</subsection>
|
| 92 |
|
|
<subsection>
|
| 93 |
swift |
1.2 |
<title>Entering the new Environment</title>
|
| 94 |
swift |
1.1 |
<body>
|
| 95 |
|
|
|
| 96 |
|
|
<p>
|
| 97 |
swift |
1.19 |
Now that all partitions are initialized and the base environment
|
| 98 |
swift |
1.1 |
installed, it is time to enter our new installation environment by
|
| 99 |
swift |
1.9 |
<e>chrooting</e> into it. This means that we change from the current
|
| 100 |
swift |
1.72 |
installation environment (Installation CD or other installation medium) to your
|
| 101 |
swift |
1.19 |
installation system (namely the initialized partitions).
|
| 102 |
swift |
1.1 |
</p>
|
| 103 |
|
|
|
| 104 |
|
|
<p>
|
| 105 |
|
|
This chrooting is done in three steps. First we will change the root
|
| 106 |
swift |
1.2 |
from <path>/</path> (on the installation medium) to <path>/mnt/gentoo</path>
|
| 107 |
|
|
(on your partitions) using <c>chroot</c>. Then we will create a new environment
|
| 108 |
|
|
using <c>env-update</c>, which essentially creates environment variables.
|
| 109 |
swift |
1.1 |
Finally, we load those variables into memory using <c>source</c>.
|
| 110 |
|
|
</p>
|
| 111 |
|
|
|
| 112 |
|
|
<pre caption = "Chrooting into the new environment">
|
| 113 |
|
|
# <i>chroot /mnt/gentoo /bin/bash</i>
|
| 114 |
|
|
# <i>env-update</i>
|
| 115 |
neysx |
1.39 |
* Caching service dependencies...
|
| 116 |
swift |
1.1 |
# <i>source /etc/profile</i>
|
| 117 |
|
|
</pre>
|
| 118 |
|
|
|
| 119 |
|
|
<p>
|
| 120 |
|
|
Congratulations! You are now inside your own Gentoo Linux environment.
|
| 121 |
swift |
1.10 |
Of course it is far from finished, which is why the installation still
|
| 122 |
swift |
1.1 |
has some sections left :-)
|
| 123 |
|
|
</p>
|
| 124 |
|
|
|
| 125 |
|
|
</body>
|
| 126 |
swift |
1.3 |
</subsection>
|
| 127 |
|
|
<subsection>
|
| 128 |
swift |
1.64 |
<title>Updating the Portage tree</title>
|
| 129 |
swift |
1.2 |
<body>
|
| 130 |
|
|
|
| 131 |
|
|
<p>
|
| 132 |
swift |
1.69 |
You should now update your Portage tree to the latest version. <c>emerge
|
| 133 |
|
|
--sync</c> does this for you.
|
| 134 |
swift |
1.2 |
</p>
|
| 135 |
|
|
|
| 136 |
dertobi123 |
1.40 |
<pre caption="Updating the Portage tree">
|
| 137 |
cam |
1.50 |
# <i>emerge --sync</i>
|
| 138 |
neysx |
1.78 |
<comment>(If you're using a slow terminal like some framebuffers or a serial
|
| 139 |
|
|
console, you can add the --quiet option to speed up this process:)</comment>
|
| 140 |
|
|
# <i>emerge --sync --quiet</i>
|
| 141 |
swift |
1.13 |
</pre>
|
| 142 |
|
|
|
| 143 |
|
|
<p>
|
| 144 |
swift |
1.75 |
If you are behind a firewall that blocks rsync traffic, you can use
|
| 145 |
|
|
<c>emerge-webrsync</c> which will download and install a portage snapshot for
|
| 146 |
|
|
you.
|
| 147 |
|
|
</p>
|
| 148 |
|
|
|
| 149 |
|
|
<p>
|
| 150 |
swift |
1.13 |
If you are warned that a new Portage version is available and that you should
|
| 151 |
swift |
1.34 |
update Portage, you should ignore it. Portage will be updated for you later
|
| 152 |
bennyc |
1.16 |
on during the installation.
|
| 153 |
swift |
1.13 |
</p>
|
| 154 |
swift |
1.8 |
|
| 155 |
|
|
</body>
|
| 156 |
|
|
</subsection>
|
| 157 |
swift |
1.72 |
<subsection>
|
| 158 |
|
|
<title>Choosing the Right Profile</title>
|
| 159 |
|
|
<body>
|
| 160 |
|
|
|
| 161 |
|
|
<p>
|
| 162 |
|
|
First, a small definition is in place.
|
| 163 |
|
|
</p>
|
| 164 |
|
|
|
| 165 |
|
|
<p>
|
| 166 |
|
|
A profile is a building block for any Gentoo system. Not only does it specify
|
| 167 |
|
|
default values for CHOST, CFLAGS and other important variables, it also locks
|
| 168 |
|
|
the system to a certain range of package versions. This is all maintained by the
|
| 169 |
|
|
Gentoo developers.
|
| 170 |
|
|
</p>
|
| 171 |
|
|
|
| 172 |
|
|
<p>
|
| 173 |
neysx |
1.79 |
Previously, such a profile was barely touched by the user. However, x86, hppa
|
| 174 |
|
|
and alpha users can choose between two profiles, one for a 2.4 kernel and one
|
| 175 |
|
|
for a 2.6 kernel. This requirement has been imposed to improve the integration
|
| 176 |
swift |
1.83 |
of the 2.6 kernels. The ppc and ppc64 architectures have several profiles
|
| 177 |
|
|
available as well. We will talk about those later.
|
| 178 |
swift |
1.72 |
</p>
|
| 179 |
|
|
|
| 180 |
|
|
<p>
|
| 181 |
neysx |
1.79 |
You can see what profile you are currently using with the following command:
|
| 182 |
swift |
1.72 |
</p>
|
| 183 |
|
|
|
| 184 |
|
|
<pre caption="Verifying system profile">
|
| 185 |
neysx |
1.79 |
# <i>ls -FGg /etc/make.profile</i>
|
| 186 |
swift |
1.83 |
lrwxrwxrwx 1 48 Apr 8 18:51 /etc/make.profile -> ../usr/portage/profiles/default-linux/x86/2005.1/
|
| 187 |
swift |
1.72 |
</pre>
|
| 188 |
|
|
|
| 189 |
|
|
<p>
|
| 190 |
neysx |
1.80 |
If you are using one of the aforementioned three architectures, the default
|
| 191 |
|
|
profile will provide you with a Linux 2.6-based system. This is the recommended
|
| 192 |
|
|
default, but you have the option of choosing another profile too.
|
| 193 |
|
|
</p>
|
| 194 |
|
|
|
| 195 |
|
|
<p>
|
| 196 |
|
|
Some users may wish to install a system based on the older Linux 2.4 profile.
|
| 197 |
|
|
If you have good reason to do this, then you should first check that an
|
| 198 |
|
|
additional profile exists. On x86, we can do this with the following command:
|
| 199 |
swift |
1.72 |
</p>
|
| 200 |
|
|
|
| 201 |
|
|
<pre caption="Finding out if an additional profile exists">
|
| 202 |
swift |
1.83 |
# <i>ls -d /usr/portage/profiles/default-linux/x86/2005.1/2.4</i>
|
| 203 |
|
|
/usr/portage/profiles/default-linux/x86/2005.1/2.4
|
| 204 |
swift |
1.72 |
</pre>
|
| 205 |
|
|
|
| 206 |
|
|
<p>
|
| 207 |
neysx |
1.80 |
The above example shows that the additional 2.4 profile exists (i.e. it didn't
|
| 208 |
|
|
complain about missing file or directory). It is recommended that you stay with
|
| 209 |
|
|
the default, but if you wish to switch, you can do so with as follows:
|
| 210 |
swift |
1.72 |
</p>
|
| 211 |
|
|
|
| 212 |
neysx |
1.79 |
<pre caption="Switching to a 2.4 profile">
|
| 213 |
|
|
<comment>(Make sure you use the right architecture, the example below is for x86)</comment>
|
| 214 |
swift |
1.83 |
# <i>ln -snf /usr/portage/profiles/default-linux/x86/2005.1/2.4 /etc/make.profile</i>
|
| 215 |
neysx |
1.79 |
<comment>(List the files in the 2.4 profile)</comment>
|
| 216 |
|
|
# <i>ls -FGg /etc/make.profile/</i>
|
| 217 |
|
|
total 12
|
| 218 |
|
|
-rw-r--r-- 1 939 Dec 10 14:06 packages
|
| 219 |
|
|
-rw-r--r-- 1 347 Dec 3 2004 parent
|
| 220 |
|
|
-rw-r--r-- 1 573 Dec 3 2004 virtuals
|
| 221 |
swift |
1.72 |
</pre>
|
| 222 |
|
|
|
| 223 |
swift |
1.83 |
<p>
|
| 224 |
|
|
For ppc, there are a number of new profiles provided with 2005.1.
|
| 225 |
|
|
</p>
|
| 226 |
|
|
|
| 227 |
|
|
<pre caption="PPC Profiles">
|
| 228 |
|
|
<comment>(Generic PPC profile, for all PPC machines)</comment>
|
| 229 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc /etc/make.profile</i>
|
| 230 |
|
|
<comment>(G3 profile)</comment>
|
| 231 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc/G3 /etc/make.profile</i>
|
| 232 |
|
|
<comment>(G3 Pegasos profile)</comment>
|
| 233 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc/G3/Pegasos/ /etc/make.profile</i>
|
| 234 |
|
|
<comment>(G4 (Altivec) profile)</comment>
|
| 235 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc/G4 /etc/make.profile</i>
|
| 236 |
|
|
<comment>(G4 Pegasos profile)</comment>
|
| 237 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc/G4/Pegasos/ /etc/make.profile</i>
|
| 238 |
|
|
</pre>
|
| 239 |
|
|
|
| 240 |
|
|
<p>
|
| 241 |
|
|
For ppc64, there are a number of new profiles provided with 2005.1.
|
| 242 |
|
|
</p>
|
| 243 |
|
|
|
| 244 |
|
|
<pre caption="PPC64 Profiles">
|
| 245 |
|
|
<comment>(Generic 64bit userland PPC64 profile, for all PPC64 machines)</comment>
|
| 246 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/64bit-userland /etc/make.profile</i>
|
| 247 |
|
|
<comment>(Generic 32bit userland PPC64 profile, for all PPC64 machines)</comment>
|
| 248 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/32bit-userland /etc/make.profile</i>
|
| 249 |
|
|
<comment>(Each type of userland has sub profiles as follows, with (userland) replaced with the chosen userland from above)</comment>
|
| 250 |
|
|
<comment>(970 profile for JS20)</comment>
|
| 251 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/970 /etc/make.profile</i>
|
| 252 |
|
|
<comment>(G5 profile)</comment>
|
| 253 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/970/pmac /etc/make.profile</i>
|
| 254 |
|
|
<comment>(POWER3 profile)</comment>
|
| 255 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/power3 /etc/make.profile</i>
|
| 256 |
|
|
<comment>(POWER4 profile)</comment>
|
| 257 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/power4 /etc/make.profile</i>
|
| 258 |
|
|
<comment>(POWER5 profile)</comment>
|
| 259 |
|
|
# <i>ln -snf /usr/portage/profiles/default-linux/ppc/2005.1/ppc64/(userland)/power5 /etc/make.profile</i>
|
| 260 |
|
|
<comment>(The multilib profile is not stable as of this release.)</comment>
|
| 261 |
|
|
</pre>
|
| 262 |
|
|
|
| 263 |
swift |
1.72 |
</body>
|
| 264 |
|
|
</subsection>
|
| 265 |
swift |
1.28 |
<subsection id="configure_USE">
|
| 266 |
swift |
1.21 |
<title>Configuring the USE variable</title>
|
| 267 |
|
|
<body>
|
| 268 |
|
|
|
| 269 |
|
|
<p>
|
| 270 |
|
|
<c>USE</c> is one of the most powerful variables Gentoo provides to its users.
|
| 271 |
|
|
Several programs can be compiled with or without optional support for certain
|
| 272 |
|
|
items. For instance, some programs can be compiled with gtk-support, or with
|
| 273 |
|
|
qt-support. Others can be compiled with or without SSL support. Some programs
|
| 274 |
|
|
can even be compiled with framebuffer support (svgalib) instead of X11 support
|
| 275 |
|
|
(X-server).
|
| 276 |
|
|
</p>
|
| 277 |
|
|
|
| 278 |
|
|
<p>
|
| 279 |
|
|
Most distributions compile their packages with support for as much as possible,
|
| 280 |
|
|
increasing the size of the programs and startup time, not to mention an enormous
|
| 281 |
swift |
1.24 |
amount of dependencies. With Gentoo you can define what options a package
|
| 282 |
swift |
1.21 |
should be compiled with. This is where <c>USE</c> comes into play.
|
| 283 |
|
|
</p>
|
| 284 |
|
|
|
| 285 |
|
|
<p>
|
| 286 |
|
|
In the <c>USE</c> variable you define keywords which are mapped onto
|
| 287 |
|
|
compile-options. For instance, <e>ssl</e> will compile ssl-support in the
|
| 288 |
|
|
programs that support it. <e>-X</e> will remove X-server support (note the minus
|
| 289 |
|
|
sign in front). <e>gnome gtk -kde -qt</e> will compile your programs with gnome
|
| 290 |
|
|
(and gtk) support, and not with kde (and qt) support, making your system fully
|
| 291 |
|
|
tweaked for GNOME.
|
| 292 |
|
|
</p>
|
| 293 |
|
|
|
| 294 |
|
|
<p>
|
| 295 |
swift |
1.68 |
The default <c>USE</c> settings are placed in the <path>make.defaults</path>
|
| 296 |
|
|
files of your profile. You will find <path>make.defaults</path> files in the
|
| 297 |
|
|
directory which <path>/etc/make.profile</path> points to and all parent
|
| 298 |
|
|
directories as well. The default <c>USE</c> setting is the sum of all <c>USE</c>
|
| 299 |
|
|
settings in all <path>make.defaults</path> files. What you place in
|
| 300 |
swift |
1.21 |
<path>/etc/make.conf</path> is calculated against these defaults settings. If
|
| 301 |
|
|
you add something to the <c>USE</c> setting, it is added to the default list. If
|
| 302 |
|
|
you remove something from the <c>USE</c> setting (by placing a minus sign in
|
| 303 |
|
|
front of it) it is removed from the default list (if it was in the default list
|
| 304 |
|
|
at all). <e>Never</e> alter anything inside the <path>/etc/make.profile</path>
|
| 305 |
|
|
directory; it gets overwritten when you update Portage!
|
| 306 |
|
|
</p>
|
| 307 |
|
|
|
| 308 |
|
|
<p>
|
| 309 |
|
|
A full description on <c>USE</c> can be found in the second part of the Gentoo
|
| 310 |
neysx |
1.52 |
Handbook, <uri link="?part=2&chap=2">USE flags</uri>. A full description on
|
| 311 |
|
|
the available USE flags can be found on your system in
|
| 312 |
swift |
1.23 |
<path>/usr/portage/profiles/use.desc</path>.
|
| 313 |
|
|
</p>
|
| 314 |
|
|
|
| 315 |
|
|
<pre caption="Viewing available USE flags">
|
| 316 |
|
|
# <i>less /usr/portage/profiles/use.desc</i>
|
| 317 |
swift |
1.45 |
<comment>(You can scroll using your arrow keys, exit by pressing 'q')</comment>
|
| 318 |
swift |
1.23 |
</pre>
|
| 319 |
|
|
|
| 320 |
|
|
<p>
|
| 321 |
|
|
As an example we show a <c>USE</c> setting for a KDE-based system with DVD, ALSA
|
| 322 |
|
|
and CD Recording support:
|
| 323 |
swift |
1.21 |
</p>
|
| 324 |
|
|
|
| 325 |
|
|
<pre caption="Opening /etc/make.conf">
|
| 326 |
|
|
# <i>nano -w /etc/make.conf</i>
|
| 327 |
|
|
</pre>
|
| 328 |
|
|
|
| 329 |
|
|
<pre caption="USE setting">
|
| 330 |
|
|
USE="-gtk -gnome qt kde dvd alsa cdr"
|
| 331 |
|
|
</pre>
|
| 332 |
|
|
|
| 333 |
swift |
1.69 |
</body>
|
| 334 |
|
|
</subsection>
|
| 335 |
|
|
<subsection>
|
| 336 |
|
|
<title>Optional: GLIBC Locales</title>
|
| 337 |
|
|
<body>
|
| 338 |
|
|
|
| 339 |
dertobi123 |
1.53 |
<p>
|
| 340 |
|
|
You will probably only use one or maybe two locales on your system. Up until now
|
| 341 |
swift |
1.55 |
after compiling <c>glibc</c> a full set of all available locales will be
|
| 342 |
|
|
created. As of now you can activate the <c>userlocales</c> USE flag and specify
|
| 343 |
swift |
1.67 |
only the locales you will need in <path>/etc/locales.build</path>. Only do this
|
| 344 |
swift |
1.74 |
if you know what locales to choose. This will not work for the bootstrapping,
|
| 345 |
|
|
but when you recompile glibc afterwards it will.
|
| 346 |
dertobi123 |
1.53 |
</p>
|
| 347 |
|
|
|
| 348 |
|
|
<pre caption="Activate the userlocales USE flag especially for glibc">
|
| 349 |
neysx |
1.84 |
# <i>mkdir -p /etc/portage</i>
|
| 350 |
swift |
1.54 |
# <i>echo "sys-libs/glibc userlocales" >> /etc/portage/package.use</i>
|
| 351 |
dertobi123 |
1.53 |
</pre>
|
| 352 |
|
|
|
| 353 |
|
|
<p>
|
| 354 |
|
|
Now specify the locales you want to be able to use:
|
| 355 |
|
|
</p>
|
| 356 |
|
|
|
| 357 |
bennyc |
1.60 |
<pre caption="Opening /etc/locales.build">
|
| 358 |
neysx |
1.61 |
# <i>nano -w /etc/locales.build</i>
|
| 359 |
bennyc |
1.60 |
</pre>
|
| 360 |
|
|
|
| 361 |
swift |
1.67 |
<p>
|
| 362 |
|
|
The following locales are an example to get both English (United States) and
|
| 363 |
|
|
German (Germany) with the accompanying character formats (like UTF-8).
|
| 364 |
|
|
</p>
|
| 365 |
|
|
|
| 366 |
bennyc |
1.60 |
<pre caption="Specify your locales">
|
| 367 |
dertobi123 |
1.53 |
en_US/ISO-8859-1
|
| 368 |
|
|
en_US.UTF-8/UTF-8
|
| 369 |
|
|
de_DE/ISO-8859-1
|
| 370 |
|
|
de_DE@euro/ISO-8859-15
|
| 371 |
|
|
</pre>
|
| 372 |
|
|
|
| 373 |
swift |
1.21 |
</body>
|
| 374 |
|
|
</subsection>
|
| 375 |
swift |
1.3 |
</section>
|
| 376 |
|
|
<section>
|
| 377 |
swift |
1.1 |
<title>Differences between Stage1, Stage2 and Stage3</title>
|
| 378 |
|
|
<body>
|
| 379 |
|
|
|
| 380 |
|
|
<p>
|
| 381 |
|
|
Now take a seat and think of your previous steps. We asked you to
|
| 382 |
|
|
select a <e>stage1</e>, <e>stage2</e> or <e>stage3</e> and warned you
|
| 383 |
|
|
that your choice is important for further installation steps. Well, this
|
| 384 |
neysx |
1.48 |
is the first place where your choice defines the subsequent steps.
|
| 385 |
swift |
1.1 |
</p>
|
| 386 |
|
|
|
| 387 |
|
|
<ul>
|
| 388 |
|
|
<li>
|
| 389 |
swift |
1.4 |
If you chose <e>stage1</e>, then you have to follow <e>both</e> steps in
|
| 390 |
|
|
this chapter (starting with <uri link="#doc_chap3">Progressing from Stage1
|
| 391 |
|
|
to Stage2</uri>)
|
| 392 |
swift |
1.1 |
</li>
|
| 393 |
|
|
<li>
|
| 394 |
swift |
1.4 |
If you chose <e>stage2</e> you only can skip the first step
|
| 395 |
|
|
and immediately start with the second one (<uri link="#doc_chap4">Progressing
|
| 396 |
|
|
from Stage2 to Stage3</uri>)
|
| 397 |
swift |
1.1 |
</li>
|
| 398 |
|
|
<li>
|
| 399 |
swift |
1.69 |
If you chose <e>stage3</e> then you can skip both
|
| 400 |
swift |
1.31 |
steps and continue with <uri link="?part=1&chap=7">Configuring the
|
| 401 |
|
|
Kernel</uri>
|
| 402 |
swift |
1.1 |
</li>
|
| 403 |
|
|
</ul>
|
| 404 |
|
|
|
| 405 |
|
|
</body>
|
| 406 |
swift |
1.3 |
</section>
|
| 407 |
|
|
<section>
|
| 408 |
|
|
<title>Progressing from Stage1 to Stage2</title>
|
| 409 |
swift |
1.1 |
<subsection>
|
| 410 |
|
|
<title>Introduction to Bootstrapping</title>
|
| 411 |
|
|
<body>
|
| 412 |
|
|
|
| 413 |
|
|
<p>
|
| 414 |
|
|
So, you want to compile everything from scratch? Okay then :-)
|
| 415 |
|
|
</p>
|
| 416 |
|
|
|
| 417 |
|
|
<p>
|
| 418 |
|
|
In this step, we will <e>bootstrap</e> your Gentoo system. This takes a
|
| 419 |
|
|
long time, but the result is a system that has been optimized from the
|
| 420 |
|
|
ground up for your specific machine and needs.
|
| 421 |
|
|
</p>
|
| 422 |
|
|
|
| 423 |
|
|
<p>
|
| 424 |
|
|
<e>Bootstrapping</e> means building the GNU C Library, GNU Compiler
|
| 425 |
swift |
1.32 |
Collection and several other key system programs.
|
| 426 |
swift |
1.1 |
</p>
|
| 427 |
|
|
|
| 428 |
|
|
<p>
|
| 429 |
swift |
1.62 |
Before starting the bootstrap, you might want to download all necessary
|
| 430 |
|
|
sourcecode first. If you do not want to do this, continue
|
| 431 |
|
|
with <uri link="#bootstrap">Bootstrapping the System</uri>.
|
| 432 |
swift |
1.1 |
</p>
|
| 433 |
|
|
|
| 434 |
|
|
</body>
|
| 435 |
swift |
1.3 |
</subsection>
|
| 436 |
|
|
<subsection>
|
| 437 |
swift |
1.1 |
<title>Optional: Downloading the Sources First</title>
|
| 438 |
|
|
<body>
|
| 439 |
|
|
|
| 440 |
|
|
<p>
|
| 441 |
swift |
1.25 |
If you haven't copied over all source code before, then the bootstrap
|
| 442 |
swift |
1.69 |
script will download all necessary files. If you want to
|
| 443 |
swift |
1.25 |
download the source code first and later bootstrap the system (for instance
|
| 444 |
swift |
1.1 |
because you don't want to have your internet connection open during the
|
| 445 |
|
|
compilation) use the <e>-f</e> option of the bootstrap script, which will
|
| 446 |
swift |
1.25 |
fetch (hence the letter <e>f</e>) all source code for you.
|
| 447 |
swift |
1.1 |
</p>
|
| 448 |
|
|
|
| 449 |
|
|
<pre caption = "Downloading the necessary sources">
|
| 450 |
|
|
# <i>cd /usr/portage</i>
|
| 451 |
swift |
1.47 |
# <i>scripts/bootstrap.sh -f</i>
|
| 452 |
swift |
1.1 |
</pre>
|
| 453 |
|
|
|
| 454 |
|
|
</body>
|
| 455 |
swift |
1.3 |
</subsection>
|
| 456 |
swift |
1.41 |
<subsection id="bootstrap">
|
| 457 |
swift |
1.1 |
<title>Bootstrapping the System</title>
|
| 458 |
|
|
<body>
|
| 459 |
|
|
|
| 460 |
|
|
<p>
|
| 461 |
|
|
Okay then, take your keyboard and punch in the next commands to start
|
| 462 |
swift |
1.36 |
the bootstrap. Then go amuse yourself with something else because this step
|
| 463 |
|
|
takes quite some time to finish.
|
| 464 |
swift |
1.1 |
</p>
|
| 465 |
|
|
|
| 466 |
|
|
<pre caption = "Bootstrapping the system">
|
| 467 |
|
|
# <i>cd /usr/portage</i>
|
| 468 |
swift |
1.47 |
# <i>scripts/bootstrap.sh</i>
|
| 469 |
swift |
1.12 |
</pre>
|
| 470 |
|
|
|
| 471 |
|
|
<p>
|
| 472 |
swift |
1.4 |
Now continue with the next step, <uri link="#doc_chap4">Progressing from Stage2
|
| 473 |
|
|
to Stage3</uri>.
|
| 474 |
|
|
</p>
|
| 475 |
|
|
|
| 476 |
swift |
1.1 |
</body>
|
| 477 |
|
|
</subsection>
|
| 478 |
swift |
1.3 |
</section>
|
| 479 |
|
|
<section>
|
| 480 |
|
|
<title>Progressing from Stage2 to Stage3</title>
|
| 481 |
swift |
1.1 |
<subsection>
|
| 482 |
|
|
<title>Introduction</title>
|
| 483 |
|
|
<body>
|
| 484 |
|
|
|
| 485 |
|
|
<p>
|
| 486 |
|
|
If you are reading this section, then you have a bootstrapped system
|
| 487 |
|
|
(either because you bootstrapped it previously, or you are using a
|
| 488 |
|
|
<e>stage2</e>). Then it is now time to build all system packages.
|
| 489 |
|
|
</p>
|
| 490 |
|
|
|
| 491 |
|
|
<p>
|
| 492 |
|
|
<e>All</e> system packages? No, not really. In this step, you will build
|
| 493 |
swift |
1.19 |
the system packages of which there are no alternatives to use.
|
| 494 |
|
|
Some system packages have several alternatives (such as system loggers)
|
| 495 |
swift |
1.1 |
and as Gentoo is all about choices, we don't want to force one upon you.
|
| 496 |
|
|
</p>
|
| 497 |
|
|
|
| 498 |
|
|
</body>
|
| 499 |
swift |
1.3 |
</subsection>
|
| 500 |
|
|
<subsection>
|
| 501 |
swift |
1.1 |
<title>Optional: Viewing what will be done</title>
|
| 502 |
|
|
<body>
|
| 503 |
|
|
|
| 504 |
|
|
<p>
|
| 505 |
|
|
If you want to know what packages will be installed, execute <c>emerge
|
| 506 |
swift |
1.72 |
--pretend --emptytree system</c>. This will list all packages that will be
|
| 507 |
|
|
built. As this list is pretty big, you should also use a pager like
|
| 508 |
|
|
<c>less</c> or <c>more</c> to go up and down the list.
|
| 509 |
swift |
1.1 |
</p>
|
| 510 |
|
|
|
| 511 |
|
|
<pre caption = "View what 'emerge system' will do">
|
| 512 |
swift |
1.72 |
# <i>emerge --pretend --emptytree system | less</i>
|
| 513 |
swift |
1.1 |
</pre>
|
| 514 |
|
|
|
| 515 |
swift |
1.72 |
<p>
|
| 516 |
|
|
Note that, if you haven't touched the default CFLAGS/CXXFLAGS setting, using
|
| 517 |
swift |
1.76 |
<c>emerge --pretend --newuse system</c> is sufficient: it will rebuild the
|
| 518 |
|
|
applications that are affected by a change in USE flags (compared to the USE
|
| 519 |
|
|
flag we used while building the stage2). If you didn't touch
|
| 520 |
|
|
the USE flag either, why are you running a stage2 installation then?
|
| 521 |
swift |
1.72 |
</p>
|
| 522 |
|
|
|
| 523 |
swift |
1.1 |
</body>
|
| 524 |
swift |
1.3 |
</subsection>
|
| 525 |
|
|
<subsection>
|
| 526 |
swift |
1.4 |
<title>Optional: Downloading the Sources</title>
|
| 527 |
swift |
1.1 |
<body>
|
| 528 |
|
|
|
| 529 |
|
|
<p>
|
| 530 |
|
|
If you want <c>emerge</c> to download the sources before you continue
|
| 531 |
|
|
(for instance because you don't want the internet connection to be left
|
| 532 |
swift |
1.20 |
open while you are building all packages) you can use the <e>--fetchonly</e>
|
| 533 |
swift |
1.1 |
option of <c>emerge</c> which will fetch all sources for you.
|
| 534 |
|
|
</p>
|
| 535 |
|
|
|
| 536 |
|
|
<pre caption = "Fetching the sources">
|
| 537 |
swift |
1.72 |
# <i>emerge --fetchonly --emptytree system</i>
|
| 538 |
swift |
1.1 |
</pre>
|
| 539 |
|
|
|
| 540 |
|
|
</body>
|
| 541 |
swift |
1.3 |
</subsection>
|
| 542 |
|
|
<subsection>
|
| 543 |
swift |
1.1 |
<title>Building the System</title>
|
| 544 |
|
|
<body>
|
| 545 |
|
|
|
| 546 |
|
|
<p>
|
| 547 |
swift |
1.72 |
To start building the system, execute <c>emerge --emptytree system</c>. Then
|
| 548 |
|
|
go do something to keep your mind busy, because this step takes a long time to
|
| 549 |
swift |
1.4 |
complete.
|
| 550 |
swift |
1.1 |
</p>
|
| 551 |
|
|
|
| 552 |
|
|
<pre caption = "Building the System">
|
| 553 |
swift |
1.72 |
# <i>emerge --emptytree system</i>
|
| 554 |
swift |
1.1 |
</pre>
|
| 555 |
|
|
|
| 556 |
|
|
<p>
|
| 557 |
swift |
1.72 |
Again, if you haven't touched the default CFLAGS and CXXFLAGS setting, using
|
| 558 |
|
|
<c>--newuse</c> is sufficient.
|
| 559 |
|
|
</p>
|
| 560 |
|
|
|
| 561 |
|
|
<p>
|
| 562 |
swift |
1.30 |
You can for now safely ignore any warnings about updated configuration files
|
| 563 |
|
|
(and running <c>etc-update</c>). When your Gentoo system is fully installed and
|
| 564 |
|
|
booted, do read our documentation on <uri
|
| 565 |
neysx |
1.52 |
link="?part=3&chap=2#doc_chap3">Configuration File Protection</uri>.
|
| 566 |
swift |
1.28 |
</p>
|
| 567 |
|
|
|
| 568 |
|
|
<p>
|
| 569 |
swift |
1.31 |
When the build process has completed, continue with <uri
|
| 570 |
|
|
link="?part=1&chap=7">Configuring the Kernel</uri>.
|
| 571 |
swift |
1.28 |
</p>
|
| 572 |
|
|
|
| 573 |
|
|
</body>
|
| 574 |
|
|
</subsection>
|
| 575 |
|
|
</section>
|
| 576 |
|
|
|
| 577 |
swift |
1.3 |
</sections>
|