I recently read Dustin Wilson’s Newbie Gentoo Review and as a ‘n00b’ who recently installed Gentoo, I found it to be a good article about Gentoo. It is a very good overview of the installation and configuration process. After reading all the comments about how most people thought or were looking for it to be a newbie walkthrough, I thought that as a ‘n00b’ who has recently installed Gentoo, I would try to write a little something about installing Gentoo for the newbie.
My command line experience, like Dustin’s, amounts to good-ole DOS back in the day.
However, having read the comments on the article, it seemed that a few people were hoping that his article would be more of a newbie walkthrough. Well, with that in mind, I have tried to create a n00b overview of the Gentoo Linux install process. I have tried to cover some of the snags I hit along the way, as well as some other parts of the install that might cause some problems for n00bs. One thing to note, that Dustin also mentioned, is the Gentoo forums. Like he said, these are probably one of the best forums out there. They are full of people, form n00bs like me with similar problems, to Gentoo vets who are always willing to lend some help to the n00bs trying to break into Gentoo. Bookmark the forums. Somewhere along the way, not matter how well prepared you are, you will need to visit them.
For starters, the Gentoo system’s default editor is nano (a modified version of pico), so you may want to take a look at nano basics to get an overview of using nano. It’s fairly straightforward, and there is a menu on the bottom of the screen with your commonly used commands. The ones we will be most concerned with are ^O (CTRL+O) for write Out and ^X (CTRL+X) for eXit.
I will be starting with Gentoo 1.4_rc2. Gentoo 1.4_rc3 is the newest release candidate at the time of this writing, but it is a very basic system and it does not provide any optimized builds for specific processor architectures. And this is one of the major “selling”-points of Gentoo. First of all, we will of course need to download the ISO images. Since this article is written for 1.4_rc2 on x86 architecture, I would recommend grabbing one of the LiveCDs for your processor architecture. This is one of the great features of Gentoo. The LiveCD images are available for specific processors. What this means is that if you start at Stage 2 or Stage 3, the “bootstrap” process has been pre-compiled on a system that uses the same processor as your system.
Like Dustin suggests, I also highly recommend printing off the installation guide. If you are going to install X or Alsa, I would also print off the Desktop Configuration and Alsa Configuration guides which you can locate from the User Docs page.
First, read the installation guide at least twice through and make sure you have at least a semi-decent idea of what is going to happen and when. I can’t stress this enough, as Dustin found out, this is imperative to getting Gentoo working without any hitches.
OK, pop the LiveCD in your CD-ROM drive and reboot. You should see a screen with the Gentoo logo on it and a boot prompt. Hit enter to begin booting the system. A bunch of messages should scroll up the screen.
While these messages are scrolling, watch for any modules (like device drivers in Windows) that failed to load. The most common ones are going to be network cards. This happened in my case. If this happens to you, you will need to manually load the module for your network card. The first thing you want to do is type
ls /lib/modules/*/kernel/drivers/net/*
to get a list of all the network card modules. Look for any of them that have a name resembling what your network card is. Once you have found one that matches, type
modprobe tulip
but replace “tulip” with the module you want to load. You should get a confirmation message that the module was loaded. If you get an error, try another module. Repeat this process for any other hardware whose modules did not load (ie. SCSI hardware, or Hardware RAID). All the modules can be found in
/lib/modules/*/kernel/drivers/
After you have loaded all your modules, you will want to make sure networking is working. Type
ifconfig -a
This should show a list of the currently configured NIC interfaces installed on the system. You should have at the least “lo” and “eth0”. The “lo” interface is the local loopback interface. The “eth0” interface is your network card. To check if it is running, look for the words “UP” and “RUNNING” in the fourth line of the eth0 interface section. If you don’t see this, try running the command
ifconfig eth0 up
This command will manually bring “up” the interface. Again, type
ifconfig -a
and look for “UP” and “RUNNING” in the output.
Once the interface is up, try pinging a website to make sure that it is actually working
ping www.osnews.com
If you get a host unknown error, you will have to manually set up your networking.
To manually set up networking, if you are running ADSL, run the
adsl-setup
script that comes on the CD, followed by the
adsl-start
script. If you are not running DSL, try running
net-setup eth0
to run the included net-setup script. If this still doesn’t work, try to manually set up the interface using ifconfig as shown in Code Listing 5.4 in the install guide. Next we need to make sure your DNS servers are set up in the
/etc/resolv.conf
file. Follow the template in code listing 5.5 in the install guide. If you are behind a proxy, follow Code Listing 5.6 in the install guide to set this up.
After completing your network setup, you should have a working internet connection. Test it to make sure it works by again running the ping command on a website.
Next we need to set up the partitions for installing Gentoo. Do this by running
cfdisk
cfdisk is a very straightforward program. I don’t think it needs any explanation for use, but make sure you use the right type for each of your partitions. Gentoo recommends creating a seperate partition for /boot. I did this on my system using the recommended size of 100 MB. Make this partition Type 83, since it will be a regular Linux filesystem (ie. ext2/3, ReiserFS, etc.). Next we need a swap partition, Type 82 (Linux Swap) and size equal to at least as much RAM as installed in your system, but up to twice the available RAM installed. Next is the partition for / (root – this is the partition where Gentoo will actually be installed). Make this as big as you want, but at least 1.5 GB if you are going to be installing any desktop environments (X with KDE, GNOME, E, etc.), and of Type 83 for a Linux filesystem.
Code Listing 6.1 in the install guide gives a command to zero a partition if it previously contained data. This is only necessary to run if you are going to make this partition a different type than it was previously. If it was unformatted, or the type you want previously, you can skip this, as the command to make the filesystem will format the partition.
First, initialize the swap with the command
mkswap /dev/hdaX
(replacing the X with the partition on which your swap is located). Next, we need to make our regular Linux filesystems on /boot and /. I used ext3 for mine and the command for this is
mke2fs -j /dev/hdaX
(replacing X with the partition for /boot). You will need to run this again for the / partition. If you want to use a different filesystem, Code Listings 6.3-6.7 give the commands for the various filesystems.
Next we will mount our new partitions so that we can access and write to them. Follow Code Listings 7.1 and 7.2 to mount your partitions, replacing hdaX with your partition number.
Now, we finally get to start installing stuff. Since we are using the LiveCD, it comes with each of the 3 stages available. I started with a Stage 2 tarball, since I did not want an extra 3 hours to compile gcc, binutils, and the other system tools. Use the command
cd /mnt/cdrom/gentoo
and
ls
to list the available stages. Now, we need to cd to the /mnt/gentoo directory (which is an alias to what will be / [root] on our system):
cd /mnt/gentoo
Now, unpack your desired stage using tar:
tar -xvjpf /mnt/cdrom/gentoo/stage?-*.tbz2
Then run
mount -o bind /proc /mnt/gentoo/proc
The proc directory contains the devices that are contained on the motherboard (ie. interfaces to the PCI bus, the processor(s), etc.). Next, we will copy our edited resolv.conf file to the new system:
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
A nice feature of the Gentoo LiveCD is that it comes with GRP (Gentoo Release Packages) files. The GRP files contain pre-built binaries of common packages like KDE, GNOME, Mozilla, OpenOffice, and X. If you don’t want to compile these packages (which I didn’t because most of these take forever and a day to compile), execute these commands:
mkdir /mnt/gentoo/GRP<br>mount -o bind /mnt/cdrom/gentoo/packages /mnt/gentoo/GRP
After executing these commands, we will be ready to “enter” our new Gentoo system.
To enter, our new Gentoo system, we need to execute the following:
chroot /mnt/gentoo /bin/bash<br>env-update<br>source /etc/profile
The first line changes the location of root to be in /mnt/gentoo. The next line regenerates the ld cache, and the last line points the system to the new paths. Now, we are inside our new Gentoo system and we can begin installing software and setting up other hardware.
The first thing we want to do now that we are inside our new Gentoo system, is update the Portage tree so we make sure we are getting the newest packages available. We need to run the following commands to sync the Portage tree, and get the latest version of Portage:
emerge sync<br>export CONFIG_PROTECT="-*"<br>export USE="-* bootstrap build"<br>emerge portage<br>unset USE
After executing these commands, we will have the latest Portage tree and the latest version of Portage. Next, we need to adjust our /etc/make.conf file which sets global options for compiling packages. Use the nano editor to do this:
nano -w /etc/make.conf
The /etc/make.conf file is well commented, so follow the instructions in the file to edit this to suit your system.
Now, we are ready to start building our system. If you opted to start at a Stage 1 system, you will need to execute these two commands to compile binutils, gcc, gettext, and glibc:
cd /usr/portage<br>scripts/bootstrap.sh
After this process completes (2-4 hours), your system will be equivalent to a Stage 2.
Now we need to merge the system packages. Type
emerge -p system
The -p flag does a “pretend” merge that lists all the packages to be installed, but does not install anything. If this scrolls off your screen, type
emerge -p system | more
so you can scroll through it at your leisure. Once you have taken a look at what the system will merge, execute the same command without the -p flag. This is going to take a long, long, long, long time. Do this before you go to sleep, before you go to work or school, or make sure you have something to keep you occupied for some hours to come (like Medal of Honor: Frontline for the PS2 ;).
Once this completes, you will have a system equivalent to a Stage 3. Now we will update the Portage tree, and update all installed packages.
emerge sync<br>emerge -up world<br>emerge -u world
First we update the tree, then we pretend to merge the packages (the -u flag specifies we want to update installed packages). Then we merge the packages.
Now, if you decided to use the GRP packages, we will install these. First, we need to enter the GRP directory and then use the grp-install shell script to install the packages:
cd /GRP<br>sh grp-install.sh package-list.txt
Replace “package-list.txt” with package you want to install. You can also specify multiple packages on the same line seperated by a space. Make sure that you are in the /GRP directory on your hard drive. The first time I did this, I did not mount the CD’s packages directory at /GRP and I tried to run the grp-install.sh script from the CD. Needless to say, this doesn’t work.
Now we need to set the time zone for the system. Browse to /usr/share/zoneinfo and find the timezone file for your locale. Use the command
pwd
to print the current working directory so you have the full path available to look at so you don’t have to remember it. Then make a symbolic link to the timezone file by executing this command:
ln -sf /usr/share/zoneinfo/path/to/file /etc/localtime
Next up, we will install our system kernel. I recommend using the gentoo-sources kernel as it has some desirable features already enabled by default. Read the first part of Section 17 in the installation guide carefully. It is full of useful information about things you will need to enable if you have certain hardware. Make doubly sure that you enable the module for your network card to be installed as a module in the kernel configuration. I forgot this and was without networking on my first reboot. So the first thing I did on my new Gentoo system was recompile the kernel. Also, make sure you go through every menu in the kernel configuration and look at every option, because if you skip over something you have, you won’t be able to just modprobe it to load it, because it wasn’t compiled in the first place. The next part of section 17 covers installing a system logger daemon and is pretty self-explanatory, so I will not cover this here. Section 18 of the installation guide is purely optional and only necessary if you have used any of these filesystems or have any of these devices.
Now we need to edit the /etc/fstab file to tell the system where /, /boot, /swap, and /mnt/cdrom are to be mounted from. The installation guide covers this well and the file itself is well commented.
Now we perform some necessary pre-reboot configuration for our system. Set the root password using the
passwd
command, set your hostname, if you know it, by editing the /etc/hostname file, and set the /etc/hosts file up with your IP, domain, and machine name.
Next, we have some final network configuration to do. Edit the /etc/modules.autoload file to load any modules you need automatically, especially your network card. In my case, I have “tulip” in the modules.autload because this is the module my NIC card uses. Now, edit the /etc/conf.d/net file to make sure that your network card will be properly configured on boot. This file is also well commented and needs no other explanation. After that we need to make sure that our network card is brought up on boot, so we execute
rc-update add net.eth0 default
This will add the eth0 interface to the default runlevel.
Now we configure some basic system settings by editing the rc.conf file
nano -w /etc/rc.conf
Follow the instructions in the file to set up the various variables, most importantly, the CLOCK and KEYMAP settings.
Section 25 deals with installing and configuring a bootloader. I feel that the installation guide does a top notch job of this. I decided to go with grub, so I followed the first section. If you choose grub, be careful with the numbering scheme grub uses for your partitions. The way I remember is whatever linux calls it, just subtract one. For example, my /boot partition is on /dev/hda6, so in grub, this would translate to (0,5) – first disk, partition six. grub counts from zero.
Next, we create bootdisks for our system, and again the installation guide covers this well, so I won’t go into this.
And finally, we are ready to reboot our system and get Gentoo-ing. Follow the code in Listing 27.1 to update any etc configuration files that need updating, exit the chrooted shell, unmount the filesystems, and reboot.
Upon reboot, you should have a lovely boot loader to load up Gentoo.
I hope this guide has given you some n00b insight into what goes on during the Gentoo install.
As Dustin stated in his Newbie review, this is not a distribution for the light-headed. This distro will take a lot of time and effort on your part, with the reward being a system that is totally optimized for your box.
Having been running Gentoo for a couple of weeks now myself, I love it. Portage is probably the best package manager of any that I have been exposed to (rpm, apt, etc.). It handles dependencies great, and is simply easy to use.
If you’ve ever wondered what goes on behind the scenes in your Linux distro, Gentoo will give you a hands on tutorial :).
About the Author:
Dave Scott is a 21-year-old student majoring in IT-Multimedia/Broadcast Graphics at ITT Technical Institute in Indianapolis. He is employed full-time as an engineer designing fire suppression systems. Dave’s first exposure to Linux was a Knoppix CD in an Operating Systems class at school, and he’s been hooked ever since, having run at various points over the last four months: Slackware, Mandrake, Debian, Gentoo, and Arch Linux.
Whoa I was first, for the first time
Is Gentoo better/easier than Debian ??
If anyone has a little spare time and a computer you are willing to have down for bit, you should try using this guide to install. I am interested in hearing how it goes.
Oh, and of course, you shouldn’t have installed Gentoo before. This needs to be noob tested.
dwilson,
OK, I’ll give it a shot. I just happen to be in the position to take you up on this, and I am actually excited about it. I am somewhat a noob, but not totally. I currently use Xandros for the simple fact that it is Debian based and does all the config work for you. It may be a bit lazy on my part, but until now it just saved me time. Now all I have is time and I’m very motivated by all the resent articles….so let’s go for it, I’m ready!!
Is Gentoo better/easier than Debian ??
It’s different. While Gentoo is at the bleeding edge, always having the latest versions of the packages available, Debian has a reputation of being a little behind but stable. Also, Gentoo in general requires you to compile everything on your own where in Debian the standard is using binary packages (note that Debian also allows you to use source packages and parts of Gentoo are available as binaries).
I tend to get better performance making my root partition reiserfs. This can be done by:
mkreiserfs /dev/hdXY where X is a letter and Y a partition number. I seriously recommend ext3 for the /boot partition though, since grub handles it better.
Karl
p.s. All that is in the install guide Good job on a shortened version though.
What about dial up users?
i agree with Karl…Reiserfs rox a whole lot. also when editing fstab if you add (to the options) “notail” reiser is even faster “noatime” also helps
Lacking some VERY important details…mostly concerning “flags” and compiling kernel options. I looked at the detailed instructions from gentoo for make.conf and went “whoa”!
Processor types are easy to determine (ppc, i386, etc), but there are other flags that are very specific. If you are not sure you could enable all options, but then it’s no longer gentoo, but a bloated distro with everything enabled. Want support for teTex? Even KNOW what teTex is? You better, because you need to set this flag when optimizing. How about liem, gdbm, pic, etc?
There’s no discussion in the documentation regarding the pros and cons of having something like .tif built in or not…will I not be able to view jpgs if it’s not checked off then I set my make.conf? Anyone? Bueler? Get my drift?
Any serious discussion on this issue? I stopped the install process at this point, and went with knoppix (hd install). Would love to try gentoo, as I have a thinkpad 600, and can use the speed increase.
Greg
You know, I really don’t know how to set up dial-up in Gentoo, and I could not find anything in the user docs. You may want to head over to http://forums.gentoo.org and search in the Networking and Security forum. I just did a quick search and came up with about 50 threads on dial-up.
From what I understand and have read about GCC optimization flags, for most modern processors (e.g. PIII and up) the optimizations you would want (at most) would be “-O3 -pipe -fomit-frame-pointer”. I also noticed that there is nothing in the GCC docs about any specific optimization flags for specific programs. I think you may be thinking USE flags. You may want to check out this article http://freshmeat.net/articles/view/730/ on freshmeat which explains the purpose behind -Ox and all the available options.
As for USE flag settings, check out the docs at http://www.gentoo.org/doc/en/use-howto.xml for a USE flag howto, and there is a link at the end of that page to a list of current USE flags. As for not being able to view jpgs if it’s not in your use setting, check out the /etc/make.globals file on your gentoo box. These are default USE flags that are enabled by default.
Your mad! installing gentoo from scratch will be hours of downloading….. even over my DSL line its a lot of download time… fresh kernel is allreaddy 50MB atleast…
The LiveCD images contain everything you need to get a working Gentoo install, including the kernel sources (albeit it will be basic and command line only, but this is why there are GRP packages available).
I have installed Gentoo over a dial-up before. It takes a long long time, but hey, before that I was using LFS (also in dial-up).
I’ve already checked out the USE flags how-to, but as I said earlier, theres’s no discussion regarding the possible outcomes of each selection.
Example, I want to use fluxbox as my WM. So I set gnome and kde as disabled. Will I not be able to use the KDE CD player? Will I not be able to use any programs that depend on the gnome libraries? If I have to enable KDE and Gnome to use these items in fluxbox, do I lose the optimization of not selecting everything and the kitchen sink?
The default file for gentoo does not have PDF file listed as enabled…can you not view pdf files now?
I guess what we need is the “Verbose walkthru of USE flags”
Greg
Generally the USE flags are on unless you add them to your USE line with a – infront. Like -kde, or something. But if you need to emerge something that requires some kde libs it will emerge the libs.
And don’t confuse USE flags with compiler optimizations for gcc. They are two different things.
If I leave everything turned on (maybe turn off things I’m certain I’m not using – like 3dfx, canna, cjk, and voodoo3), then am I safe? Will there be any performance gains/loss by leaving everything else as-is (enabled)?
This is where the install doc and the use flag how-to needs further explaination….the install docs just say “set the flags you need” but should be more like “remove the flags for equipment/services you are SURE you do not have installed, and if you do remove these flags, the outcome will be XYZ”.
Greg
Well, I’m not very experienced when it comes to USE flags, but I know that many ebuilds won’t care what your USE flags are. Just take a good look at what USE flags the bigger builds (like xfree, kde and such) take note to. Sometimes you can gain a bit by switching off some flags.
Also remember to try different switches when emerging something that you’re sure won’t need all the stuff the –pretend lists. Sometimes you can get rid of optional stuff.
But all in all, it’s probably better just setting the USE flags you know you’re going to need.
Can’t tell you if this means switching them all off, or if you can do something else, as I’m not really that much into the rules on that point.
Greg, Now I understand what you were stating, and as a Gentoo n00b, I can honestly say that I have no idea what the possible outcomes of these situations are, except to say that from what I understand of Portage, even if you have -kde -qt -gtk -gnome in your use flags, if you try to emerge a package that has a dependency on a lib that is installed with one of these, it will get compiled and installed.
For your first question about KDE CD player, no you will not be able to use it because it is installed as part of the kdemultimedia package (I believe) which in turn is dependent on a bunch of kdelibs and qt (and possibly kdebase, I’m not sure). As for the programs that depend on gnome libraries, this is the beauty of Portage, it will check dependencies for you and install all the necessary libs.
As for losing the optimization if you have to emerge kde and gnome, the only consequence is hard drive space and some download/compile time.
As for pdf files, I think the PDF USE flag just installs the pdflib library, so if you install a program to read PDFs, it should get compiled and installed as well (again, this is what I understand of how Portage works, but I am by no means a Gentoo expert).
As for a USE flags walkthrough, I also would like to see this (being still a n00b) and the ramifications of the various USE flags being turned on and off, but AFAIK there is nothing on the Gentoo site and nothing I have seen anywhere else, but perhaps if we make the suggestion in the Gentoo forums, a developer may have the time and desire to churn out a quickie.
In your make.conf, where you specify your USE flags, you’re pointed to this:
http://www.gentoo.org/doc/en/use-howto.xml
and this:
“emerge ufed”
Heh, that settles it. I’m blind or ignorant. Or both. Never noticed that. And that after using gentoo for ages.
Doh.
Thanks, Andrew
USE flags have very sane defaults. If in doubt, don’t turn everything on, nor turn anything off. Additions are relatively safe but they will increase compile times and dependencies unnecessarily. Turning some defaults off will not break your system either, but if you later find out you needed a flag, you have to recompile everything using that flag. So it is wise to leave them alone, unless you know what you are doing.
Optimization flags aren’t supposed to break your system either. ebuilds, presumably, forbid use of some flags on per-compilation basis. That is, even if you specify -O3, unless you change the ebuild itself, your -say- noatun compilation will use -O2 when -O3 is known to fail. However they are not so safe, because unlike USE flags, it is not possible to foresee the consequences of compilation flags on a new release. Someone has to fail building with their flags and file a bug report for maintainers to find out about bad the interaction. That someone may be you. -march=i686 -O2 -fomit-frame-pointer, together with overriding by ebuilds where known to be dangerous is safe %99 of the time. -march=athlon-xp -O3 -fomit-frame-pointer is probably the most heavilty tested combination. If some ebuild fails with it, you will instantly be notified by someone in the forums.
Rule of thumb, if you use gentoo, use it like everone else does as much as practically possible. Some USE and optimization flags are very well tested and you should take advantage of that. That you can tweak the hell out doesn’t mean you should. Gentoo gives you flexibility, use that with caution.
Portage usually takes care of that. If you want to use a QT,GTK app, it will download all the necessary dependencies, whether it’s the packages of GNOME/GTK, and the sorts.
Well, that’s one way to fix up dependency issues…
Hi all –
First of all, thanks for the excellent review. As the Documentation Coordinator, I am glad to see that the documentation is such a great help. If you have any questions regarding the docs, please feel free to mail me.
As far as the USE flags go, there is an updated guide in the works that will be *much* more comprehensive.
Cheers,
//zhen
Use flags determine what kind of support will be compiled for a program.
Say you have a program that has a gnome, kde, and commandline interface. If you have -gnome in your use flags, the gnome frontend will not be compiled or installed. The commandline interface will always be there. Get it?
If you want to see what flags a package is using try the -vp flags with emerge. (very useful)
Generally having less USE Flags will safe you harddrive space, compile time and bloat (You determine what is bloat by setting the use flags). So you lose some functionallity, but this is good if you don’t want that functionallity. ie, if you don’t have a 3dfx card the -tdfx is advisable.
If a flag is not specified it is off! So you may want to check the /etc/make.profile/make.defaults to check which flags you don’t want and need to add a -flag for.
Example, I want to use fluxbox as my WM. So I set gnome and kde as disabled. Will I not be able to use the KDE CD player? Will I not be able to use any programs that depend on the gnome libraries? If I have to enable KDE and Gnome to use these items in fluxbox, do I lose the optimization of not selecting everything and the kitchen sink.
I will give you a little thing about use flags.
If you don’t know what to do, leave it as is. The defaults are fine for most people. Now, you can customize if you want, but you don’t HAVE to.
If you have -gnome as a use flag, then if something has optional gnome support that can be compiled in, it won’t. This doesn’t mean you can’t use gnome, but you’ll get no special gnome treatment from anything you compile. Same for all other use flags. And, if it doesn’t work, change the use flag and compile it again… it really isn’t hard.
I’ve asked the same questions about USE flags in the Gentoo forums, and basically come to the conclusion that this is a potentially very powerful way of optimizing your system, but is also very poorly documented. One of the key features that is not explained well is what flags may apply to teh particular package that you are trying to install.
The thread is located here: http://forums.gentoo.org/viewtopic.php?t=34928&highlight=
My only comment on Dave’s review is that I would change the root password immediately after getting to a command prompt from booting the LiveCD. The initial root password is a randomly generated string that you don’t get to see. By changing it to something you know; it will be much easier to open up additional vterms if you need to do some diagnostics/web research while installing.
Changing the root password after booting the LiveCD may not be a bad idea for the very security minded, but as you are working in a virtual environment (which provides the frontend to configure and install the packages to the hard drive), there’s not much to screw with (yet) and the password will not be remembered once you reboot and actually enter the gentoo system.
I just finished my Gentoo install, am using it now, in fact! From Stage 1! 😉
What I liked was the power over the compiler and packages… Compared to RH8phoebe and Mandrake, it definitely peforms better. (Partly due to the pre-empt kernel patches and partly due to the gcc optimzations.)
Installation is very straight forward and I learned alot along the way. Which is really what I’m in it for anyway.
Yet it was a little confusing regarding the flags, masks and different init scripts… (I’ve been using Red Hat & Mandrake Linux since ~’95)
Bumps I ran into involved devfs, which I re-enabled since it seems to be required. That’s OK, just another tool to learn.
Another bump was installing it on my laptop. I ended up installing the HD in another PC and working on it there…
A FreeBSD/OpenBSD styled install or a floppy/network install would be a big step forward…
First, remember that “xmms” enables xmms support, while “-xmms” directly disables xmms support when compiling. That being said, it is possible to compile all kinds of spiffy KDE and GNOME things while using fluxbox (as I do) in Gentoo. Also, you have to pay attention to the flags that you use, because sometimes all this customization can give you some bizarre results. My first example is when I emerged SAMBA and had “ldap” in my USE line (as I intended on using an LDAP server at some point), and when I wanted to start adding SAMBA accounts, it complained that it wasn’t configured with an LDAP server and couldn’t process my request. So, I did a little search on the forum, and found out about my ldap flag. I then switched it from “ldap” to “-ldap”, and re-emerged SAMBA. Afterward, it worked fine as it compiled with the new flag arrangement and didn’t compile any LDAP support into the app. Another example is when I was using fluxbox for a while, and decided to try out KDE for a bit. I had the Qt libraries and and kde-base since I was using some KDE apps and utils in fluxbox (such as K3B and Konqueror) so I decided to run the desktop itself. Well, when I went into it I didn’t have any working sound, while I did have sound working just fine in fluxbox using ALSA with my Audigy. So, I checked out my flags and found that I had “-arts” in it, which disabled support for the KDE sound server. Later that night, before I went to bed I re-emerged kde-base and used “arts” rather than “-arts”, and when it was done sound worked in KDE.
Now, why bother with “-this” or “-that” when not listing it is the same thing? Well, it isn’t it the same thing, that’s why :-). The make.global file contains a few flags (or it can contain whatever you want, but I wouldn’t recommend altering it) of its own. If you add flags to make.conf, these are then *added* to whatever make.global has. However, if you decided to not have, say, “gnome” support in an application and didn’t enter “-gnome” in your make.conf USE line then it might *still* be compiled into your application if make.global had it in there. This is a *major* reason why you should *not* alter make.global, as it is meant to control your system reference point, and changes to make.conf can override it if you want. Now, if for some weird reason you had the “gnome” flag in make.global, and you put “-gnome” in your make.conf file, you will *not* have gnome support compiled into your app as make.conf will override make.global. Cool eh? Now, what’s even better, is that you can do a one-time flag setting in your emerge command with something like “USE = -wavelan emerge pcmcia-cs”, and this will emerge (compile and install) the current stable pcmcia-cs package without wavelan support *even if* you have a “wavelan” flag in your make.conf. I have used this in certain pcmcia-cs packages to enable monitor mode on my Orinoco NICs for my laptops so I can use Kismet and AirSnort.
HTH
The only times I have changed the root password while booted from the rc2 CD is when I install the OS over SSH. That’s right boys and girls, you can install this over SSH and help out someone who is new to this. I have installed Gentoo on other servers (in some cases a few states away) over broadband, and it works just fine. The *only* major issue is not having “screen” to maintain a session, so if your session is broken, so is your current install process, which can be very annoying with having to chroot back into your environment. But I have installed from Stage 1 over SSH about a dozen or so times and only had one bomb out (that was because my friend’s ISP had this stupid 8hr time limit on his DSL before they would disconnect him and he would have to reconnect). However, what I did do was get the environment running, start the SSH server in the new environment (but on a different port) to get the keys made, then shut it down and reset the port. Once I had the install completed, I made sure to have the passwords setup and added SSH to the service list. I then had my friend’s girlfriend take out the CD when I rebooted the system and I was up and running in the new installation. It’s pretty nice having this remote install ability.
Oh, and with my previous flags comment, I forgot to wrap up with stating that the command line USE flag overrides the make.conf USE line which overrides the make.global USE line. I hope that clears that point up.
As the person who brought up the whole discussion on Use flags and the lack of documentation, I thank you all in advance. I will start a fresh install tonight. I will try it on a Thinkpad 600, using the flags and optimizations that another gentoo user forwarded to me. They had the same ones selected that I had highlighted.
I hope to have something to report back on in the morning. Stay tuned and thanks for the help.
Now my main concern is this…my my make.conf, I plan on listing every flag I want, and -‘ing the ones I dont need. What will that do to my compile times (compared to just taking out ones I dont need – like 3dfx)?
I look forward to the updated USE flag docs from Gentoo.
GregC
Sorry if this was already posted. I would strongly suggest that anybody installing Gentoo look over the USE flags first and make a list of what you need and don’t need. This way when it comes time to modify your “make.conf” file there will be a lot less guessing.
Also make sure you comapre it to the default USE flags found in the “make.defaults” file.
http://www.gentoo.org/dyn/use-index.xml
USE flags are for setting optional settings only. For instance, xmms can be compiled with Gnome support, but it isn’t required. Therefore, if you have ‘-gnome’ in your USE statement, xmms won’t be compiled with Gnome support. However, a package that requires Gnome to compile and function will build the required pieces of Gnome regardless of what’s in your USE statement. So if you built the KDE cd player, it will build the necessary bits of KDE.
Here is a link to the current version of /usr/portage/profiles/use.desc in CVS. This lists all official USE vars with a description. It is important to note that ebuilds can use their own USE vars that are not listed here. I’ve not seen one do that yet though.
http://cvs.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-x86/profiles/use.d…
Damon
I’ve installed Gentoo on a few different systems, and with the 1.4rc2 release, I’ve had a blast. It works very well, whereas 1.2 was problematic for me on two of the same systems. I have really learned more about Linux in general because of Gentoo’s “thorough” install system. Currently I’ve got it on a PC with an AMD 761-based mobo with a Promise RAID/ATA100 chip, running three hard drives (one in a removable bay), a DVD-ROM, a CD-RW, ZIP-100 IDE, two 3Com NICs, an external Courier v.Everything modem, and onboard AC97 audio AND an SB Live! card… and it works perfectly!
BUT, and it’s a big but, not without a ton of investigative forum searching. Bookmark http://forums.gentoo.org right now.
Kernel configuration is fun (not). I thought I had enabled parallel port use, but there are two VERY different switches, and only one was on. Boot to the CD and recompile the kernel… very easy to figure out. I may write a n00b doc for that soon.
Setting up the CD-RW was a chore, but nothing some forum searching couldn’t fix. Again, a kernel recompile was necessary. http://forums.gentoo.org/viewtopic.php?t=20175
Learning about ‘etc-update’ and ‘rc-update’ is essential! ‘etc-update’ allows you to choose between different lines of different versions of configuration files for a particular package you’ve installed. ‘rc-update’ is the command you use to add a service to the default startup. Once you learn Gentoo’s way of accomplishing this you’ll look at other distros in a new light (very dim). However, I’d suggest doing an ’emerge xxdiff’ and use ‘xxdiff’ for compares instead of the ‘etc-update’ command, if you’re running XWindows.
Learn the few simple commands in ’emerge’, such as ’emerge search XXXX’ and ’emerge –pretend XXXX’…
Finally, always remember to use ’emerge sync’ BEFORE you install any packages, to make sure you’ve got the latest version. If a new Portage is available, by all means, compile that first before installing other packages!
Hopefully these tips will help some of you in your quest to install one of the most interesting distros available. Good luck, and stick with it!