Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
Write an article for LinuxForums Today! Win Great Prizes!
The one thing that stymies people who want to use Gentoo more than anything else is compiling the kernel Gentoo provides a package called genkernel which makes configuring it relatively simple. For various reasons most people recommend installing it using a Debian-based Live CD such as Knoppix. There is one problem with that: getting your hands on a workable configuration file for genkernel is not straightforward, and without it you will find yourself dealing with the same defaults which make compiling a kernel from scratch so tricky. Gentoo and Slackware Live CDs have configuration files conveniently in the /proc directory and can be used to get a working kernel in about half an hour, while you surf the web or drink coffee.
To start with of course, I'm going to outline the steps to installing Gentoo, however there is absolutely no substitute for the official documentation:
I generally use two other resources installing it -- both of which are becoming dated but both of which are helpful. sLiCeR's Installing Gentoo Using Kanotix can be found here:
As I said Mr. Zoonekynd uses the Gentoo install CD. It's usually called minimal because it does not come with X-windows. You run it from the command line. You can use links or ftp to fetch the necessary files and links to read documentation. You can visit other virtual terminals using alt-f2 alt-f3 etc to accomplish other tasks. Return to your first task with alt-f1. Nevertheless most of us gotta have our graphic user interfaces. In Linux and Unix that means X-windows, This means we can surf the web for information, install the thing and trouble shoot to see that the problems are resolved all on the same screen. Most people suggest Knoppix because it is a swiss army knife, or Ubuntu because it is lying around. Being debian distributions, neither has a kernel configured to keep a copy of the configuration file for the current kernel in /proc. Since Gentoo is infinitely customizable, you don't need it, but it's helpful in installing. That's why, the last time I did it I went with Slax, a Czech distribution which is easy to set up and use. It has one drawback: it defaults to root as the user and as the saying goes "if you surf the net as root you may as well be running Windoze".
I was installing it on a Dell Lattitude CPX which boasted it was "Designed for Windows 2000". That is old technology. So I didn't go with the latest slax. I got my hands on a 1.5.8 disk I had lying around (I do have 1.6.2 which has the same or newer programs, and it booted flawlessly. I logged in as root (password toor) configured X created a user, gave him a password put him in the /etc/sudoers file and logged out, logged back in and started x by typing "startx"
The default desktop is KDE. You can download Firefox but KDE has konqueror. Its user interface makes me so grumpy I have publicly called for the arrest of the people who designed it but it's fast (Safari and Google Chrome are based on it) and it's right there. I opened a terminal, su'd tp become root (use sudo su on debian or Knoppix) and there I was.
So the first thing you want to do when installing Gentoo is read up on how you do it. Even with their live cds you will be handling almost all the steps required to configure and install it by yourself. These days they support mainly stage three installs, which means the first packages you download will be binaries but within a couple of days most of them will have been recompiled to optimize them for your system. That does make things easier.
Now partition your drive. Some people will do separate partitions for /usr /tmp or /var. I'm never sure how big to make them so I just do /boot / and if I have room /home. Of course I make a swap partition too. MAKE SURE YOUR DISK IS NOT MOUNTED. If it is, unmount it. Never run fdisk or cfdisk on a mounted disk. cfdisk gives you a menu, so that's why I use it. Create your partitions, write them to disk, and quit.
Now format them. I use ext2 for /boot and ext3 for everything else (I also use dip pens occasionally and react to technical pens with the fondness a vampire has for garlic. Use what you want). Check the /sbin directory to see what formats are supported.
Now mount and cd to your / directory. Of course you need a mount point. The documentation suggests you create a /mnt/gentoo directory for root. To be consistent that's what I will use. Create at least every directory you have created a partition for and mount them there. Check the documentation at http://www.gentoo.org/main/en/mirrors2.xml for a link to the install files. You want stage3 and portage-latest tar.bz2 files. Since I'm a New Englander I usually get them from rit or Terra Byte in Canada. Choose a site near you). Find them in directories like
../pub/gentoo/releases[x86 or amd64]/[current version]/stages/[x86...] (get the newest stage3 - file) .../pub/gentoo/snapshots/ (get the newest portage- file, usually called portage-latest*)
Untar them. The documentation suggests using tar -xvjpf stage3* and tar -xvjpf portage* -D /mnt/gentoo/usr but in fact you can ignore the j on Slax's tar. These will create the file system -- installing the relevant files on the partitions you mounted. And now it is time for the fun part. You've downloaded the file system, now we configure it. You are advised to keep your connection to the Internet. Do this by issuing a "cp -Lv /etc/resolv.conf /mnt/gentoo/etc". Now I usually do a "mount -t proc none /mnt/gentoo/proc" which if you check will essentially clone your /proc directory on Slax, and a "mount -o bind /dev /mnt/gentoo/dev"/ You can do a mount -o bind /proc /mnt/gentoo/proc. Either way, the next step is type "chroot . /bin/bash" or "chroot /mnt/gentoo /bin/bash". This puts you in a new /bash shell where you can run "source /etc/profile" and the script "env-update" which puts you in gentoo. NOW I will generally do passwd to give root a password so I don't forget. Find the make.conf.example file and copy it to make.conf. Edit it according to what the links I posted above tell you to do. You decide. Find your timezone in /usr/share/zoneinfo (I use America/New_York) and either copy or link (which I do) it to /etc/localtime. Edit /etc/conf.d/clock to reflect your time settings. And we are almost there.
Update the system list with "emerge --sync". Surf the net or get some coffee -- it's about fifteen minutes. Now emerge the following packages: genkernel, gentoo-sources grub and revdep-rebuild. This will take a long time. It recompiles them. If it stops and tells you that it can't find the compiler type "gcc-config -l". That will give you a list of available compilers. Choose one, and type, for example "gcc-config 1" or gcc-config 2 or whatever looks best and type "emerge --resume". It should continue smoothly to the end. Now for the magic trick. Since you are on a slackware-derived system, type "zcat /proc/config.gz > /usr/share/genkernel/x86 or amd64/kernel-config-2.6". That creates a new configuration file called kernel-config-2.6 which genkernel will use by default.
Now just type "genkernel all" and you should have a kernel and an initramfs file in boot in 15 minutes to an hour and a half. And it's pretty much guaranteed to boot. I lost my soundcard on the Latitude install (doesn't always happen but hey, it's an old system) but I got it back by typing "genkernel all --menuconfig" which ran menuconfig FROM THE DEFAULT OF kernel-config-2.6 which meant while I had to check them I got the defaults all correct.
There are a few more things you MUST do before you reboot. Grub uses grub.conf now in gentoo -- menu.lst exists as a symbolic link for backward compatibility. Edit grub.conf to include the kernel and initramfs files in your /boot directory (run an ls to see what they are). Create a user of course and emerge sudo if you are not stupid. Edit or create /etc/fstab to tell the computer what your partitions are, and emerge a logging service like syslog-ng. If you are on a laptop and or using pcmcia slots emerge pcmcia. The older one was called pcmcia-cs but that doesn't work anymore. Otherwise you have a bare bones system which you should emerge several other packages to make life bearable. dhcpcd will give you internet access so you can emerge them after the reboot. But I would read sLiCeR and Mr. Zoonekynd carefully and decide what you want on your system.
Anyone CAN run gentoo. Of course whether anyone SHOULD is another topic which I won't go into.
Actually most times there is no need to rebuild or reinstalled your PC windows system, what you need is a PC protector. Tuneup360 is good choice, you just need to click one big fix now button and get your computer fixed at once.
RE: Re: Easy installation written by acmz123:
Comment title: * please do not put your response text here