/[gentoo]/xml/htdocs/doc/en/faq.xml
Gentoo

Contents of /xml/htdocs/doc/en/faq.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.52 - (show annotations) (download) (as text)
Tue Jan 27 14:59:35 2004 UTC (10 years, 5 months ago) by erwin
Branch: MAIN
Changes since 1.51: +23 -13 lines
File MIME type: application/xml
Fixed #39198: mention http://store.gentoo.org in the FAQ

1 <?xml version='1.0' encoding="UTF-8"?>
2 <!-- $Header: /home/cvsroot/gentoo/xml/htdocs/doc/en/faq.xml,v 1.51 2004/01/10 13:45:02 swift Exp $ -->
3 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
4
5 <guide link="/doc/en/faq.xml">
6 <title>Gentoo Linux Frequently Asked Questions</title>
7 <author title="Chief Architect"><mail link="drobbins@gentoo.org">Daniel Robbins</mail></author>
8 <author title="Reviewer">Colin Morey</author>
9 <author title="Editor"><!-- zhen@gentoo.org -->John P. Davis</author>
10 <author title="Editor"><mail link="stocke2@gentoo.org">Eric Stockbridge</mail></author>
11 <author title="Editor"><mail link="zhware@gentoo.org">Stoyan Zhekov</mail></author>
12 <author title="Editor"><mail link="carl@gentoo.org">Carl Anderson</mail></author>
13 <author title="Editor"><mail link="peesh@gentoo.org">Jorge Paulo</mail></author>
14 <author title="Editor"><mail link="swift@gentoo.org">Sven Vermeulen</mail></author>
15 <abstract>
16 This FAQ is a collection of questions and answers collected from the gentoo-dev mailing list
17 and from IRC -- if you have any questions (or answers!) to add, please contact either an author
18 or a member of the documentation team.
19 </abstract>
20
21 <license/>
22
23 <version>1.1.12</version>
24 <date>January 27, 2004</date>
25
26 <chapter>
27 <title>Featured Questions</title>
28 <section>
29 <title>Getting Started</title>
30 <body>
31 <ul>
32 <li><uri link="#doc_chap2_sect1">How is Gentoo pronounced, and what does it mean?</uri></li>
33 <li><uri link="#doc_chap2_sect2">What makes Gentoo different?</uri></li>
34 </ul>
35 </body>
36 </section>
37 <section>
38 <title>Installation</title>
39 <body>
40 <ul>
41 <li><uri link="#doc_chap3_sect1">What is the difference between the .iso and .tbz2 files?</uri></li>
42 <li><uri link="#doc_chap3_sect2">Why do the build .iso and .tbz2 files sometimes have different -r (revision) numbers?</uri></li>
43 <li><uri link="#doc_chap3_sect3">I'm finding things to be really unstable and I'm using "-O9 -ffast-math -fomit-frame-pointer" optimizations. What gives?</uri></li>
44 <li><uri link="#doc_chap3_sect4">What's the default root password after installation?</uri></li>
45 <li><uri link="#doc_chap3_sect5">How can I change the root (or indeed any other user's) password?</uri></li>
46 <li><uri link="#doc_chap3_sect6">How do I add a normal user?</uri></li>
47 <li><uri link="#doc_chap3_sect7">Why can't a user su to root?</uri></li>
48 <li><uri link="#doc_chap3_sect8">How do I enable devfs?</uri></li>
49 <li><uri link="#doc_chap3_sect9">How to I disable devfs?</uri></li>
50 <li><uri link="#doc_chap3_sect10">How do I get a /dev/mouse that doesn't go away when I reboot (when using devfs)?</uri></li>
51 <li><uri link="#doc_chap3_sect11">Grub can't find stage x.y?</uri></li>
52 <li><uri link="#doc_chap3_sect12">My ASUS CUV4X-D won't boot and it freezes during various stages of kernel loading and hardware detection.</uri></li>
53 <li><uri link="#doc_chap3_sect13">If I have Gentoo 1.4_rc1 can I upgrade to 1.4_rc2/rc3/final without reinstalling?</uri></li>
54 <li><uri link="#doc_chap3_sect14">My kernel doesn't boot (properly), what should I do now?</uri></li>
55 <li><uri link="#doc_chap3_sect15">My proxy requires authentication, what do I have to do?</uri></li>
56 </ul>
57 </body>
58 </section>
59 <section>
60 <title>Package Management</title>
61 <body>
62 <ul>
63 <li><uri link="#doc_chap4_sect1">In what format are the packages stored?</uri></li>
64 <li><uri link="#doc_chap4_sect2">Why write a new port system (Portage) instead of using BSD's version?</uri></li>
65 <li><uri link="#doc_chap4_sect3">How does this differ from Debian's apt or BSD's ports?</uri></li>
66 <li><uri link="#doc_chap4_sect4">How do I install and uninstall packages?</uri></li>
67 <li><uri link="#doc_chap4_sect5">How can I set a global configuration for compiling packages?</uri></li>
68 <li><uri link="#doc_chap4_sect6">What happened to /etc/make.defaults?</uri></li>
69 <li><uri link="#doc_chap4_sect7">Is there a way to upgrade all installed packages e.g. apt-get upgrade or make World?</uri></li>
70 <li><uri link="#doc_chap4_sect8">When updating a package using emerge or ebuild, how do I avoid clobbering my config files?</uri></li>
71 <li><uri link="#doc_chap4_sect9">I want to perform the ./configure step myself. Can I?</uri></li>
72 <li><uri link="#doc_chap4_sect10">What if rsync doesn't work for me?</uri></li>
73 <li><uri link="#doc_chap4_sect11">How do I use emerge from behind a firewall?</uri></li>
74 <li><uri link="#doc_chap4_sect12">Can I rsync from another operating system?</uri></li>
75 <li><uri link="#doc_chap4_sect13">I have only slow modem connection at home. Can I download sources somewhere else and add them to my system?</uri></li>
76 <li><uri link="#doc_chap4_sect14">.tar.gz sources for installed software are piling up in /usr/portage/distfiles/ using valuable space. Is it safe to delete these files?</uri></li>
77 <li><uri link="#doc_chap4_sect15">I went to emerge blackdown-jdk and blackdown-jre, and afterwards java-config --list-available-vms would only list blackdown-jre. Openoffice then refuses to emerge. What do I do?</uri></li>
78 <li><uri link="#doc_chap4_sect16">What's in /var/tmp/portage? Is it safe to delete the files and directories in /var/tmp/portage?</uri></li>
79 </ul>
80 </body>
81 </section>
82 <section>
83 <title>Usage</title>
84 <body>
85 <ul>
86 <li><uri link="#doc_chap5_sect1">I have installed openssh on my box, but can only log in as root - my normal user account doesn't work.</uri></li>
87 <li><uri link="#doc_chap5_sect2">I can start X applications as root only.</uri></li>
88 <li><uri link="#doc_chap5_sect3">How do I set up an International Keyboard Layout?</uri></li>
89 <li><uri link="#doc_chap5_sect4">DNS name resolution works for root only.</uri></li>
90 <li><uri link="#doc_chap5_sect5">Why is KDE not reading /etc/profile?</uri></li>
91 <li><uri link="#doc_chap5_sect6">Why can't my user use their own crontab?</uri></li>
92 <li><uri link="#doc_chap5_sect7">How do I get numlock to start on boot?</uri></li>
93 <li><uri link="#doc_chap5_sect8">How do I have my terminal cleared when I log out?</uri></li>
94 </ul>
95 </body>
96 </section>
97 <section>
98 <title>Maintenance</title>
99 <body>
100 <ul>
101 <li><uri link="#doc_chap6_sect1">ReiserFS and filesystem corruption issues -- how to fix'em, etc...</uri></li>
102 <li><uri link="#doc_chap6_sect2">How to I view the timestamps in /var/log/syslog.d, etc. on a pre-1.0_rc5 Gentoo system?</uri></li>
103 <li><uri link="#doc_chap6_sect3">Metalogd doesn't log in real time!</uri></li>
104 </ul>
105 </body>
106 </section>
107 <section>
108 <title>Development</title>
109 <body>
110 <ul>
111 <li><uri link="#doc_chap7_sect1">Where can I report bugs?</uri></li>
112 <li><uri link="#doc_chap7_sect2">How often are new releases made?</uri></li>
113 <li><uri link="#doc_chap7_sect3">I would like a package to be added to Portage; how would I go about this?</uri></li>
114 <li><uri link="#doc_chap7_sect4">How can I add a question or answer to this FAQ?</uri></li>
115 <li><uri link="#doc_chap7_sect5">make -f Makefile.cvs on a KDE app produces "invalid unused variable" errors. What gives?</uri></li>
116 <li><uri link="#doc_chap7_sect6">My speaker beeps like crazy while compiling Mozilla. How do I disable console beeps?</uri></li>
117 </ul>
118 </body>
119 </section>
120 <section>
121 <title>Resources</title>
122 <body>
123 <ul>
124 <li><uri link="#doc_chap8_sect1">Where can I find more about supervise used by default in Gentoo Linux 1.0_rc5 and earlier?</uri></li>
125 <li><uri link="#doc_chap8_sect2">Where can I find more information about Gentoo Linux?</uri></li>
126 <li><uri link="#doc_chap8_sect3">Can I buy a CD of Gentoo Linux?</uri></li>
127 <li><uri link="#doc_chap8_sect4">Why, when I hit reply to a post on a Gentoo mailing list, does my answer only go to the original poster and not the entire list?</uri></li>
128 <li><uri link="#doc_chap8_sect5">This FAQ hasn't answered my question. What do I do now?</uri></li>
129 </ul>
130 </body>
131 </section>
132 </chapter>
133
134
135 <chapter>
136 <title>Getting Started</title>
137
138 <section>
139 <title>How is Gentoo pronounced, and what does it mean?</title>
140 <body><p>Gentoo is a species of small fast penguin, pronounced "gen-too" (The "g" in "gentoo" is a soft "g", as in "gentle").</p></body>
141 </section>
142
143 <section>
144 <title>What makes Gentoo different?</title>
145 <body>
146 <p>
147 Gentoo Linux is a fast, modern distribution with a clean and flexible
148 design -- in this respect, Gentoo may appeal to
149 <uri link="http://www.slackware.com/">Slackware</uri>,
150 <uri link="http://www.linuxfromscratch.org/">Linux From Scratch</uri> or
151 <uri link="http://www.bsd.org/">BSD</uri> users. Unlike most Linux
152 distros, Gentoo has a package system reminiscent of BSD's ports,
153 meaning the packages are continually updated to the latest
154 versions.
155 </p>
156 </body>
157 </section>
158 </chapter>
159
160 <chapter>
161 <title>Installation</title>
162
163 <section>
164
165 <warn>REPORT all bugs to <uri>http://bugs.gentoo.org/</uri>! Do not report bugs to upstream (original)
166 authors. Report the bugs to Gentoo, and we will move them upstream if necessary.
167 </warn>
168
169 <title>What is the difference between the .iso and .tbz2 files?</title>
170 <body><p>The build <e>.tbz2</e> file is a minimal set of system files
171 that is necessary for allowing a user to bootstrap and install
172 Gentoo Linux. The build <e>.iso</e> is a complete, bootable CD image that
173 contains a system kernel, a reasonably complete set of kernel modules,
174 necessary system tools such as <c>mkfs</c> and networking support,
175 as well as the <e>.tbz2</e> minimal-system tarball. Most users will install
176 Gentoo Linux by burning the .iso file onto a CD, booting off of the CD,
177 and installing from within the minimal linux environment provided by
178 the Gentoo boot CD. It is possible, however, for users to install
179 Gentoo Linux directly from an already-existing Linux distribution.
180 Such users need only download the .tbz2 file, install the contents
181 on a spare partition (making sure to use the <c>p</c> flag when
182 untarring the tarball!), chroot, and install in the usual fashion.</p>
183 </body>
184 </section>
185
186 <section>
187 <title>Why do the build .iso and .tbz2 files sometimes have different -r (revision) numbers?</title>
188 <body><p>
189 The .tbz2 minimal-system tarball only needs to be revised when there have
190 been significant changes to the core Gentoo Linux system (such as baselayout
191 changes, or a new profile), and as such .tbz2 updates are relatively rare.
192 The .iso file tends to get updated whenever we discover that somebody has
193 hardware that won't boot from our .iso. Since new kernel modules and
194 patches are constantly being generated, this situation probably won't
195 stabilise anytime soon.
196 </p>
197 </body>
198 </section>
199
200 <section>
201 <title>I'm finding things to be really unstable and I'm using "-O9 -ffast-math
202 -fomit-frame-pointer" optimizations. What gives?</title>
203 <body>
204 <p>Don't bother using anything higher than <c>-O3</c> since it isn't support by current versions
205 of gcc. Very aggressive optimizations sometimes cause the compiler to streamline the assembly code
206 to the point where it doesn't quite do the same thing anymore. A possible setting based on <e>Loc-Dog</e> (on IRC)'s CFLAGS
207 is <c>-O3 -mcpu=i686 -march=i686 -fforce-addr -fomit-frame-pointer -funroll-loops
208 -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4</c>, which is about
209 as much as I'd want to push global optimization settings. Beyond this, it's best to use
210 ultra-high optimizations only with specific packages where you really need that extra 2%,
211 (eg graphics and various multimedia programs), and where you can easily test the package
212 to ensure that it hasn't been optimized into oblivion.</p>
213 <p>Please try first to compile with CFLAGS <c>-march= -O2</c> before reporting a bug</p>
214 </body>
215 </section>
216
217 <section>
218 <title>What's the default root password after installation?</title>
219 <body><p>The default password is blank; hit enter.</p></body>
220 </section>
221
222 <section>
223 <title>How can i change the root (or indeed any other user's) password?</title>
224 <body><p>You can use <c>passwd</c> to change the password for the user you are logged into.
225 for extra options and setting, please see <c>man passwd</c> once you've completed the install.
226 </p></body>
227 </section>
228 <section>
229 <title>How do i add a normal user?</title>
230 <body>
231 <p>The command <c>adduser gentoo</c> will add a user called gentoo. The next step is to give
232 this user a password and <c>passwd</c> will do exactly that.</p>
233 <p>Instead of <c>adduser</c> you can also use:
234 <pre># <i>useradd gentoo -m -G users,audio,wheel -s /bin/bash</i></pre>
235 This will add a user gentoo, will make possible for him to use sound-related devices (<path>/dev/sound/*</path>), will make possible for him to switch to root (using <c>su</c>) and will make <path>/bin/bash</path> his login shell.
236 </p>
237 <p>You can also install <c>superadduser</c> using <c>emerge superadduser</c> and then issue <c>superadduser gentoo</c> to add a user called gentoo. Just follow the instructions given to you by <c>superadduser</c>.</p>
238 </body>
239 </section>
240 <section>
241 <title>Why can't a user su to root?</title>
242 <body><p>For security reasons, users may only <c>su</c> to root if they belong to the
243 <e>wheel</e> group. To add a <i>username</i> to the <e>wheel</e> group, issue the following
244 command as root:</p>
245 <pre># <i>usermod -G users,wheel username</i></pre>
246 </body>
247 </section>
248 <section>
249 <title>How do I enable devfs?</title>
250 <body>
251 <p>
252 If you're using 1.0_rc5 or greater, you don't need to do anything special to get
253 devfs working; it's already active (you did make sure that devfs was built into the
254 kernel, didn't you?).
255 However, if you are using a version of Gentoo Linux <e>prior</e> to version 1.0_rc5, add
256 <c>devfs=mount</c> to your <c>GRUB</c> kernel boot options so that the line looks something
257 like <c>kernel /boot/boot/bzImage devfs=mount foo=bar</c> The kernel will then mount the
258 <path>/dev</path> <e>devfs</e> filesystem automatically at boot-time.
259 </p>
260 </body>
261 </section>
262 <section>
263 <title>How to I disable devfs?</title>
264 <body>
265 <p>Under Gentoo Linux 1.0_rc6 and later, you can disable devfs by passing the
266 <c>gentoo=nodevfs</c> to the kernel.</p>
267 </body>
268 </section>
269 <section>
270 <title>How do I get a <path>/dev/mouse </path> that
271 doesn't go away when I reboot (when using devfs)?</title>
272 <body>
273 <p>
274 If you are using 1.0_rc6 or later, then you can just use <c>ln -s</c>
275 to make the usual symbolic link from <path>/dev/mouse</path>, and
276 it will be preserved between reboots.
277 </p>
278 <p>All other users need to edit <path>/etc/devfsd.conf</path>
279 and add these lines:</p>
280 <pre>
281 REGISTER ^misc/psaux$ CFUNCTION GLOBAL symlink misc/psaux mouse
282 UNREGISTER ^misc/psaux$ CFUNCTION GLOBAL unlink mouse
283 </pre>
284 <p>If you are not using the devfs PS/2 mouse <path>/dev/misc/psaux</path> device,
285 adjust the <c>misc/psaux</c> strings above accoringly. You'll then want to
286 <c>killall -HUP devfsd</c>
287 to get devfsd to reread <path>/etc/devfsd.conf</path>.</p>
288 </body>
289 </section>
290 <section>
291 <title>Grub can't find stage x.y?</title>
292 <body><p>
293 During installation the grub boot files are copied
294 to <path>/boot/grub</path> (<path>/boot/boot/grub</path> in Gentoo Linux 1.0_rc5 and
295 earlier.) Grub automatically looks in the <path>/boot/grub</path> directory on the boot
296 partition. (We strongly recommend having a separate no-auto boot partition mounted at
297 <path>/boot</path>, since that way it is much more difficult to clobber your kernel and boot
298 info by accident.) The above error generally arises from (a) not using a separate boot
299 partition, (b) forgetting to mount the boot partition at <path>/boot</path> before either
300 unpacking the build snapshot or running
301 <c>emerge --usepkg system</c>, or (c) forgetting the
302 <c>notail</c> option when mounting a ReiserFS <path>/boot</path> partition.
303 You can get more information on grub, including how to
304 debug grub from the grub prompt, by reading the
305 <uri link="http://www-105.ibm.com/developerworks/education.nsf/linux-onlinecourse-bytitle/0F1731DC664023B7862569D0005C44AF?OpenDocument">IBM developerWorks Grub tutorial</uri>.
306 </p>
307 </body>
308 </section>
309
310 <section>
311 <title>My ASUS CUV4X-D won't boot and it freezes during various stages of kernel loading and hardware
312 detection. </title>
313 <body>
314 <p>Disable MPS 1.4 (multi-processor-system) in the BIOS or switch this
315 function to 1.1. By using this option you just switch the MPS version. The Multi-Processor-System
316 will still work properly. Make sure to boot Gentoo Linux with the following boot option, noapic. </p>
317 </body>
318 </section>
319
320 <section>
321 <title>If I have Gentoo 1.4_rc1 can I upgrade to 1.4_rc2, 1.4_final/_rc3 without reinstalling?</title>
322 <body>
323 In fact there is no difference between the 1.4 releases <b>after they&apos;ve installed</b>. Gentoo 1.4 and later are <c>glibc-2.3.x</c> based.
324 As such 1.4rc1 machine for example, that does <c>emerge sync; emerge -u world</c> is <b>exactly the same</b> as a machine with 1.4rc2 installed, after it does <c>emerge sync; emerge -u world</c>. The true differences lie in the installer.
325 </body>
326 </section>
327
328 <section>
329 <title>My kernel doesn't boot (properly), what should I do now?</title>
330 <body>
331 <p>
332 You don't need to redo every step of the installation, but only the
333 kernel-stuff and all associated steps. Suppose you have installed Gentoo
334 on <path>/dev/hda1</path> (/boot) and <path>/dev/hda3</path> (/) with
335 <path>/dev/hda2</path> being the swap space:
336 </p>
337 <pre caption = "Reconfiguring the kernel">
338 <comment>Boot from the LiveCD and wait until you receive a prompt</comment>
339 <comment>We first mount all partitions:</comment>
340 # <i>mount /dev/hda3 /mnt/gentoo</i>
341 # <i>mount /dev/hda1 /mnt/gentoo/boot</i>
342 # <i>swapon /dev/hda2</i>
343 # <i>mount -t proc none /mnt/gentoo/proc</i>
344 <comment>Then we chroot into our Gentoo environment and configure the kernel:</comment>
345 # <i>chroot /mnt/gentoo /bin/bash</i>
346 # <i>env-update &amp;&amp; source /etc/profile</i>
347 # <i>cd /usr/src/linux</i>
348 # <i>make menuconfig</i>
349 <comment>Now (de)select anything you have (de)selected wrongly at your</comment>
350 <comment>previous attempt. Then quit and compile your kernel:</comment>
351 # <i>make dep &amp;&amp; make bzImage modules modules_install</i>
352 <comment>Now copy over your bzImage file, overwriting your previous one:</comment>
353 # <i>cp arch/i386/boot/bzImage /boot</i>
354 <comment>If you use LILO, rerun lilo -- GRUB users should skip this:</comment>
355 # <i>/sbin/lilo</i>
356 <comment>Now exit the chroot and reboot.</comment>
357 # <i>exit</i>
358 # <i>umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo</i>
359 # <i>reboot</i>
360 </pre>
361 <p>
362 If on the other hand the problem lays with your bootloader configuration,
363 follow the same steps, but instead of configuring/compiling your kernel you
364 should reconfigure your bootloader (recompilation isn't necessary).
365 </p>
366 </body>
367 </section>
368 <section>
369 <title>My proxy requires authentication, what do I have to do?</title>
370 <body>
371
372 <p>
373 When you have to download something using <c>wget</c>, use the
374 following syntax to authenticate yourself:
375 </p>
376 <pre caption = "Proxy-authentication using wget">
377 # <i>wget --proxy-user=</i><comment>username</comment><i> --proxy-passwd=</i><comment>password</comment><i> &lt;url&gt;</i>
378 </pre>
379 <p>
380 To have Portage automatically use this scheme, define it in
381 <path>/etc/make.conf</path>:
382 </p>
383 <pre caption = "/etc/make.conf">
384 FETCHCOMMAND="wget --proxy-user=<comment>username</comment> --proxy-passwd=<comment>password</comment> -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
385 RESUMECOMMAND="/usr/bin/wget --proxy-user=<comment>username</comment> --proxy-passwd=<comment>password</comment> -c -t 5 --passive-ftp -P \${DISTDIR} \${URI}"
386 </pre>
387 <p>
388 Sadly, <c>rsync</c> doesn't seem to support username/password
389 authentication for proxies. See <uri link="#doc_chap4_sect10">What
390 if rsync doesn't work for me?</uri> for more information on how to
391 handle this situation.
392 </p>
393
394 </body>
395 </section>
396
397 </chapter>
398
399 <chapter>
400 <title>Package Management</title>
401 <section>
402 <title>In what format are the packages stored?</title>
403 <body><p>They exist in our portage tree as <e>ebuild</e> autobuild scripts; we are primarily
404 a ports-based distribution, meaning that we provide scripts (<c>.ebuild</c> files) and a
405 special system (Portage) so that you can build apps from sources. We generally only build
406 binaries for releases and snapshots. The <uri link="/doc/en/gentoo-howto.xml">Development HOWTO
407 </uri> covers the contents of an ebuild script in detail. For full binary ISO releases, we
408 create a full suite of binary packages in an enhanced <c>.tbz2</c> format (<c>.tar.bz2</c>
409 compatible with meta-information attached to the end of the file.)</p>
410 </body>
411 </section>
412
413 <section>
414 <title>Why write a new port system (Portage) instead of using BSD's version?</title>
415 <body>
416 <p>In one sentence, because Portage is much better in so many ways. One of the design
417 philosophies of the <c>.ebuild</c> syntax was to make it an analog of what you'd type to
418 install the program manually, thus making Portage very easy to learn and modify to your
419 needs. We also have OpenBSD-style "fake" installs, safe unmerging, system profiles,
420 package masking, a real dependency system, and lots of other good stuff.</p>
421 </body>
422 </section>
423
424 <section>
425 <title>How does this differ from Debian's apt or BSD's ports?</title>
426 <body><p>Portage features the best of apt and ports; for example, USE options, a full
427 dependency system, safe installs and uninstalls, and a true package database. Think of
428 Portage as the best of both worlds; a ports system with the sensibilities and safety of a
429 Linux package management system built-in.</p></body>
430 </section>
431
432 <section>
433 <title>How do I install and uninstall packages?</title>
434 <body>
435 <p>The <uri link="/doc/en/portage-user.xml">Portage User Guide</uri> details how to install
436 and uninstall packages, and update Portage.</p>
437 </body>
438 </section>
439
440 <section>
441 <title>How can I set a global configuration for compiling packages?</title>
442 <body><p><path>/etc/make.conf</path> should be modified to override global and
443 profile-specific default options used to compile and merge packages. The most common options
444 are as follows:</p>
445 <table>
446 <tr>
447 <th>Flag</th>
448 <th>Description</th>
449 </tr>
450 <tr>
451 <ti>CHOST</ti>
452 <ti>This sets the HOST variable for compiles, e.g. <c>i686-pc-linux-gnu</c></ti>
453 </tr>
454 <tr>
455 <ti>CFLAGS</ti>
456 <ti>The options for <c>gcc</c> when compiling programs written in C (*.c files)</ti>
457 </tr>
458 <tr>
459 <ti>CXXFLAGS</ti>
460 <ti>The options for <c>gcc</c> when compiling programs written in C++ (*.c,*.cpp etc.
461 files)</ti>
462 </tr>
463 <tr>
464 <ti>USE</ti>
465 <ti>This allows you to set what optional components you'd like compiled-in, if
466 available. For example, if you have <c>gnome</c> inside the USE string, then when
467 you compile <c>xchat</c>, it will include GNOME support. All our dependencies are
468 also USE-aware.</ti>
469 </tr>
470 <tr>
471 <ti>GENTOO_MIRRORS</ti>
472 <ti>A space separated list of URIs currently mirroring the Gentoo packages. Portage
473 will attempt download from a <c>GENTOO_MIRROR</c> first before trying the official
474 <c>SRC_URI</c>. To force Portage to skip mirrors, set this variable to "".</ti>
475 </tr>
476 </table>
477 </body>
478 </section>
479
480 <section>
481 <title>What happened to <path>/etc/make.defaults</path>?</title>
482 <body>
483 <p>As of Portage 1.5 onwards, <path>/etc/make.defaults</path> is antiquated;
484 if you have portage-1.5-r1 or above installed then you can safely delete it.
485 This file has been replaced by <path>/etc/make.profile/make.defaults</path>
486 (<path>/etc/make.profile</path> should actually be a symlink to,
487 <path>/usr/portage/profiles/default</path>),
488 which contains system profile-specific default settings. The priority order of
489 the various configuration files is as follows (highest first):
490 <ol>
491 <li>Environment variables</li>
492 <li><path>/etc/make.conf</path>, for your use</li>
493 <li><path>/etc/make.profile/make.defaults</path>, for profile-specific defaults</li>
494 <li><path>/etc/make.globals</path>, for global defaults (settings not specified in
495 any other place come from here)</li>
496 </ol></p></body>
497 </section>
498
499 <section>
500 <title>Is there a way to upgrade all installed packages
501 e.g. <e>apt-get upgrade</e> or <e>make World</e>?</title>
502 <body><p><b>YES!</b> Type <c>emerge --update system</c> (use it with <c>--pretend</c> first) to
503 update all core system packages, and use <c>emerge --update world</c> (again, use it with
504 <c>--pretend</c> first) to do a complete system upgrade of all installed packages.
505
506
507 </p></body>
508 </section>
509
510 <section>
511 <title>When updating a package using <c>emerge</c> or <c>ebuild</c>, how do I avoid
512 clobbering my config files?</title>
513 <body><p>
514 Portage now includes config file management support by default. Type
515 <c>emerge --help config</c> for more details. The (overly) simple answer is that if
516 a package installs <path>foo</path> somewhere under <path>/etc</path>, and
517 another <path>foo</path> already exists there, then the new <path>foo</path> will
518 instead be renamed to <path>._cfgxxxx_foo</path> in that directory. A useful
519 tool for examining and updating any protected config files is <c>etc-update</c>,
520 which is now part of Portage.
521 </p></body>
522 </section>
523
524 <section>
525 <title>I want to perform the <c>./configure</c> step myself. Can I?</title>
526 <body>
527 <p>
528 Yes, but it is not trivial, and the next method only works when it is a simple
529 ebuild (i.e. just <c>./configure</c> and <c>make &amp;&amp; make install</c>).
530 Be sure to read the ebuild itself to see how Gentoo handles it.
531 </p>
532
533 <p>
534 Start with unpacking the ebuild: <c>ebuild
535 /usr/portage/&lt;category&gt;/&lt;package&gt;/&lt;ebuild&gt; unpack</c>.
536 </p>
537
538 <p>
539 Next, go to <path>/var/tmp/portage/&lt;package&gt;-&lt;version&gt;/work</path>.
540 Inside it you'll find the unpacked sources. Execute the steps you need to
541 perform to configure and compile the package.
542 </p>
543
544 <p>
545 When finished, execute <c>touch
546 /var/tmp/portage/&lt;package&gt;-&lt;version&gt;/.compiled</c> to trick Portage
547 into thinking it configured and compiled the package. Then finish up with
548 <c>ebuild /usr/portage/&lt;category&gt;/&lt;package&gt;/&lt;ebuild&gt;
549 merge</c>.
550 </p>
551
552 </body>
553 </section>
554
555 <section>
556 <title>What if rsync doesn't work for me?</title>
557 <body><p>
558 If you're behind a firewall that doesn't permit
559 rsync traffic, then you can use <c>emerge-webrsync</c> which will fetch
560 and install a Portage snapshot for you through regular HTTP.
561 <c>emerge-webrsync</c> uses <c>wget</c> to download, so proxy is fully
562 supported.
563 <pre caption="Using emerge-webrsync">
564 ~# <c>emerge-webrsync</c></pre>
565 If you cannot do this either, you can manually download a snapshot
566 from <uri>http://distro.ibiblio.org/pub/linux/distributions/gentoo/snapshots/</uri>.
567 In order to install the snapshot correctly, you first need to remove
568 your current <path>/usr/portage</path> so that outdated ebuilds don't
569 stay available on your system. However, you might want to put
570 <path>/usr/portage/distfiles</path> somewhere safe if you don't want to
571 lose all your sourcecode.
572 <pre caption="Manually installing the snapshots">
573 <codenote>(First download the snapshot and place it in /usr)</codenote>
574 ~# <c>cd /usr</c>
575 ~# <c>mv /usr/portage/distfiles /usr/distfiles-temp</c>
576 ~# <c>rm -rf /usr/portage</c>
577 ~# <c>tar xvjf portage-foo.tbz2</c>
578 ~# <c>mv /usr/distfiles-temp /usr/portage/distfiles</c></pre>
579 </p></body>
580 </section>
581
582 <section>
583 <title>How do I use <i>emerge</i> from behind a firewall?</title>
584 <body><p>
585 Edit the PROXY settings in <path>/etc/make.conf</path>. If that doesn't work,
586 edit <path>/etc/wget/wgetrc</path> and edit http_proxy and ftp_proxy
587 appropriately.
588 </p></body>
589 </section>
590
591 <section>
592 <title>Can I rsync from another operating system?</title>
593 <body><p>There's a program called unison that works under both UNIX and Win32, available from
594 <uri>http://www.cis.upenn.edu/~bcpierce/unison/</uri>.</p></body>
595 </section>
596
597 <section>
598 <title>I have only slow modem connection at home. Can I download sources somewhere else and
599 add them to my system?</title>
600 <body><p>
601 Definitely. You can run <c>emerge --pretend package</c> to see what programs
602 are going to be installed. To find out the sources for those packages and where to
603 download the sources from, you can run <c>emerge -fp package</c>.
604 Download sources and bring them on any media
605 home. Put the sources into <path>/usr/portage/distfiles</path> and run
606 <c>emerge package</c> to see it picking up the sources you just brought in!
607 </p></body>
608 </section>
609
610 <section>
611 <title>.tar.gz sources for installed software are piling up in /usr/portage/distfiles/ using
612 valuable space. Is it safe to delete these files?</title>
613 <body><p>
614 Yes, you can safely delete these files. But if you are on a slow
615 connection, such as a modem, you might want to keep the archives if
616 possible; often several ebuilds will be released for the same version of
617 a specific piece of software - if you have deleted the archive and you
618 upgrade the software it will have to be downloaded from the internet
619 again.
620 </p></body>
621 </section>
622
623 <section>
624 <title>I went to emerge blackdown-jdk and blackdown-jre, and afterwards
625 <c>java-config --list-available-vms</c> would only list blackdown-jre.
626 Openoffice would then refuse to emerge. What do I do? </title>
627
628 <body>
629 <p>Solution: </p>
630 <pre caption = "Solution">
631 # <c>emerge unmerge blackdown-jre blackdown-jdk </c>
632 # <c>CONFIG_PROTECT="" emerge blackdown-jdk </c>
633 </pre>
634
635 </body>
636 </section>
637 <section>
638 <title>What's in <path>/var/tmp/portage</path>? Is it safe to delete the files and directories in <path>/var/tmp/portage</path>?</title>
639 <body>
640 During compilation, Gentoo saves the sources of the package in <path>/var/tmp/portage</path>. It is safe to clean out all contents of this directory.
641 </body>
642 </section>
643 </chapter>
644
645 <chapter>
646 <title>Usage</title>
647 <section>
648 <title>I have installed openssh on my box, but can only log in as root - my normal user
649 account doesn't work. </title>
650 <body>
651 <p>
652 This is most probably because your user account doesn't have a valid shell specified. Check
653 for your user entry in
654 <path>/etc/passwd</path> and see if it ends in /bin/bash (or any other shell). If it doesn't,
655 you must set a shell for the user. This is done using the usermod command, like this ;
656 </p>
657 <pre># <i>usermod -s /bin/bash myuser</i></pre>
658 </body>
659 </section>
660
661 <section>
662 <title>I can start X applications as root only.</title>
663 <body><p>Your <path>/tmp</path> directory has the wrong permissions (it needs the sticky bit
664 set). Type the following as root:</p>
665 <pre># <i>chmod 1777 /tmp</i></pre>
666 </body>
667 </section>
668
669 <section>
670 <title>How do I set up an International Keyboard Layout?</title>
671 <body><p>Edit the <c>KEYMAP</c> variable in <path>/etc/rc.conf</path>.
672 Then either reboot or restart the keymaps script:
673 <c>/etc/init.d/keymaps restart</c>.</p>
674 </body>
675 </section>
676
677 <section>
678 <title>DNS name resolution works for root only.</title>
679 <body><p><path>/etc/resolv.conf</path> has the wrong permissions; <c>chmod</c> it as follows:
680 </p>
681 <pre># <i>chmod 0644 /etc/resolv.conf</i></pre>
682 </body>
683 </section>
684
685 <section>
686 <title>Why is KDE not reading <path>/etc/profile</path>?</title>
687 <body><p>You need to add <c>--login</c> to the first line in <path>/opt/kde2.1/bin/startkde
688 </path>, so that it reads as follows:</p>
689 <pre>#!/bin/sh --login</pre>
690 <p>This fix has been added to recent versions of KDE.</p>
691 </body>
692 </section>
693
694 <section>
695 <title>Why can't my user use their own crontab?</title>
696 <body><p>You need to add that user to the <i>cron</i> group.
697 </p>
698 </body>
699 </section>
700
701 <section>
702 <title>How do I get numlock to start on boot?</title>
703 <body>
704 <p>
705 If you log on graphically, or want numlock to be activated when
706 you issue <c>startx</c>, then you must <c>emerge numlockx</c> and
707 add <c>/usr/X11R6/bin/numlockx</c> to
708 <path>/etc/X11/xinit/xinitrc</path> (for <c>startx</c>) or
709 <path>/etc/X11/Sessions/</path> (for any graphical login manager) such
710 as <path>/etc/X11/Sessions/Gnome</path> for GDM.
711 </p>
712 <p>
713 If you work in commandline, you only need to <c>rc-update add
714 numlock default</c> and numlock will be activated on the next
715 reboot.
716 </p>
717 </body>
718 </section>
719 <section>
720 <title>How do I have my terminal cleared when I log out?</title>
721 <body>
722 <p>
723 To have your terminal cleared, add <c>clear</c> to your
724 <path>~/.bash_logout</path> script:
725 </p>
726 <pre caption = "Clearing the terminal during logout">
727 $ <i>echo clear &gt;&gt; ~/.bash_logout</i></pre>
728 <p>
729 If you want this to happen automatically when you add a new
730 user, do the same for the <path>/etc/skel/.bash_logout</path>:
731 </p>
732 <pre caption = "Making new users their terminal clear on logout">
733 # <i>echo clear &gt;&gt; /etc/skel/.bash_logout</i></pre>
734 </body>
735 </section>
736
737
738 </chapter>
739
740 <chapter>
741 <title>Maintenance</title>
742 <section>
743 <title>ReiserFS and filesystem corruption issues -- how to fix'em, etc</title>
744 <body>
745 <p>
746 If your
747 ReiserFS partition is corrupt, try booting the Gentoo
748 Linux boot CD and run <c>reiserfsck --rebuild-tree</c> on
749 the corrupted filesystem. This should make the filesystem consistent
750 again, although you may have lost some files or directories due
751 to the corruption.
752 </p>
753 </body>
754 </section>
755 <!-- is this still relevant? -cpm -->
756 <section>
757 <title>How to I view the timestamps in /var/log/syslog.d, etc. on a pre-1.0_rc5 Gentoo
758 system?</title>
759 <body>
760 <p>To view multilog (Gentoo Linux 1.0_rc5 and earlier) timestamps, you need to pipe the
761 current log through the <c>tai64nlocal</c>command:</p>
762
763 <pre>
764 # <i>tai64nlocal &lt; /var/log/syslog.d/current | less</i>
765 </pre>
766
767 <p>Or, alternatively, if you want to "tail" the log:</p>
768
769 <pre>
770 # <i>tail -f /var/log/syslog.d/current | tai64nlocal</i>
771 </pre>
772
773 </body>
774 </section>
775 <section>
776 <title>Metalogd doesn't log in real time!</title>
777 <body>
778
779 <p>
780 Metalog flushes output to the disk in blocks, so messages aren't immediately
781 recorded into the system logs. If you are trying to debug a daemon, this
782 performance-enhancing behavior is less than helpful. When your Gentoo Linux
783 system is up and running, you can send metalog a USR1 signal to temporarily
784 turn off this message buffering (meaning that <c>tail -f
785 <path>/var/log/everything/current</path></c> will now work in real time, as
786 expected) and a USR2 signal to turn buffering back on again. If you want to
787 disable buffering permanently, you can change METALOG_OPTS="-B" to
788 METALOG_OPTS="-B -s" in <path>/etc/conf.d/metalog</path>.
789 </p>
790
791 <pre caption="Turning metalog buffering on/off">
792 <codenote>To turn the buffering off:</codenote>
793 # <i>killall -USR1 metalog</i>
794 <codenote>To turn the buffering back on:</codenote>
795 # <i>killall -USR2 metalog</i>
796 </pre>
797
798 </body>
799 </section>
800 </chapter>
801
802 <chapter>
803 <title>Development</title>
804 <section>
805 <title>Where can I report bugs?</title>
806 <body><p>For bugs within a specific program, contact the program's author. Otherwise, use our
807 Bugzilla bug tracker at <uri>http://bugs.gentoo.org</uri>. You can also visit us in
808 <c>#gentoo</c> on the <uri link="http://www.freenode.net">FreeNode</uri> IRC network.
809 </p></body>
810 </section>
811
812 <section>
813 <title>How often are new releases made?</title>
814 <body><p>New releases are announced on the <uri link="http://www.gentoo.org/main/en/lists.xml">gentoo-announce</uri>
815 mailing list<!-- TODO: approximatley every X months -->, In reality the packages themselves
816 are updated shortly after the main authors release new code. As for when new Cd images etc
817 are released, that tends to be whenever there are any major updates to the base code, or when
818 new modules get added.</p></body>
819 </section>
820
821 <section>
822 <title>I would like a package to be added to Portage; how would I go about this?</title>
823 <body><p>Head over to <uri>http://bugs.gentoo.org</uri> and submit a new bug of the type
824 "ebuild". Attach your ebuild to the bug report.</p></body>
825 </section>
826
827 <section>
828 <title>How can I add a question or answer to this FAQ?</title>
829 <body><p>Submit a new bug over at <uri>http://bugs.gentoo.org</uri> and add it to the
830 "Docs-user" product, "Gentoo Linux FAQ" component.</p></body>
831 </section>
832
833 <section>
834 <title>make -f Makefile.cvs on a KDE app produces "invalid unused variable" errors</title>
835 <body><p>
836 Export <c>WANT_AUTOMAKE_1_4=1</c> for all KDE projects before running
837 <c>make -f Makefile.cvs</c>. Also, for KDE2 apps export <c>WANT_AUTOCONF_2_1=1</c>,
838 and for KDE3 apps export <c>WANT_AUTOCONF_2_5=1</c>.
839 </p></body>
840 </section>
841
842
843 <section>
844 <title>My speaker beeps like crazy while compiling Mozilla. How do I disable console beeps?
845 </title>
846 <body>
847 <p>
848 Console beeps can be turned off using setterm, like this ;
849
850 <pre># <i>setterm -blength 0</i></pre>
851
852 If you would like to turn off the console beeps on boot
853 you need to put this command in
854 <path>/etc/conf.d/local.start</path>. However, this only
855 disables beeps for the current terminal. To disable
856 beeps for other terminals, pipe the command output to the
857 target terminal, like this ;
858
859 <pre># <i>setterm -blength 0 >/dev/vc/1</i></pre>
860
861 You need to replace /dev/vc/1 with the terminal
862 you would like to disable console beeps for.
863 </p>
864 </body>
865 </section>
866 </chapter>
867
868 <chapter>
869 <title>Resources</title>
870 <section>
871 <title>Where can I find more about supervise used by default in Gentoo Linux 1.0_rc5 and earlier?</title>
872 <body><p><!-- TODO: --><uri>http://cr.yp.to/daemontools.html</uri></p></body>
873 </section>
874
875 <section>
876 <title>Where can I find more information about Gentoo Linux?</title>
877 <body><p>The official Gentoo documentation can be found on <uri>http://www.gentoo.org</uri>; general Linux information is at <uri>http://www.tldp.org</uri>.</p></body>
878 </section>
879
880 <section>
881 <title>Can I buy a CD of Gentoo Linux?</title>
882 <body>
883
884 <p>Yes! LiveCDs for all supported architecture are available on
885 our <uri link="http://store.gentoo.org/">Gentoo Store</uri>. When you
886 purchase a CD from our store, you are also supporting our development.
887 So, please consider buying from our store if possible :-)
888 </p>
889
890 <p>
891 You can also find fresh CDs from
892 <uri link = "http://cart.cheapbytes.com/cgi-bin/cart/0070010933">Cheapbytes
893 </uri> and <uri link = "http://www.tuxcds.com/section.php?section=42">
894 tuxcds</uri> for a very good price. These people also bounce back a
895 portion of the profits to the Gentoo project, so buy them while they are hot!
896 </p>
897
898 </body>
899 </section>
900
901 <section>
902 <title>Why, when I hit reply to a post on a Gentoo mailing list, does my answer
903 only go to the original poster and not the entire list?</title>
904 <body>
905 <p>The mailing list administrators have decided to go with minimal munging
906 (altering of mail headers), which means that they have decided against
907 altering headers to have replies go to the mailing list. There are various
908 reasons for this. For example, if a subscriber has a full mailbox, the
909 entire list receives notice of this every time that something is posted.
910
911 Most GUI based mailers have a "reply to all" function. This will ensure that
912 your reply goes to the mailing list as well as the original poster. Most
913 users of text based emailers already know the methods to use, but if you
914 don't, in Pine, there is a "reply to group" option. Setting Mutt to reply to
915 the list is covered in the unofficial documentation at
916 <uri link="http://forums.gentoo.org/viewtopic.php?t=1085">forums.gentoo.org</uri>.
917
918 Some list members do not like this method, but it was very heavily
919 discussed when it went into effect, with arguments on both sides.
920 Eventually the list administrators decided to keep it this way. Discussing
921 it on the mailing list will sometimes bring a polite explanation and other
922 times a rather brusque comment to check the archives. Although the
923 administrators regret the inconvenience that it may cause some users, it is
924 felt that at present it is preferable to the alternative for several
925 reasons, many of these covered
926 <uri link="http://www.unicom.com/pw/reply-to-harmful.html">here</uri>.
927
928 (There are other eloquent arguments in favor of munging, and yes, the list
929 administrators have seen them.) </p>
930 </body>
931 </section>
932
933 <section>
934 <title>This FAQ hasn't answered my question. What do I do now?</title>
935 <body>
936 <p>A good first step is to browse through the relevant <uri link="http://www.gentoo.org/doc/en/index.xml">documentation</uri>,
937 failing that, the various Gentoo Linux mailing
938 lists listed on <uri link="http://www.google.com">Google</uri>. To search through the Gentoo mailling lists,
939 just enter "lists.gentoo.org foo" to search for "foo". If all else fails, or you just want
940 to hang out with Gentoo folks, visit us on irc: <i>#gentoo</i>
941 on <i>irc.freenode.net</i>.
942 </p>
943 </body>
944 </section>
945 </chapter>
946 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20