regexorcist Posted January 8, 2010 Share Posted January 8, 2010 Gentoo Linux installation tutorialLet me just warn you, this install is no fun, will take a long time and may cause disappointment.I managed to get it installed, but I would rather smash my finger with a hammer, then go through that again.If I can't stop you, I suggest you try a different install method than what I went through.If your determined to do it the same way I did then please read the whole tutorial before following my steps verbatim.Here are the official Gentoo install guides:http://www.gentoo.org/doc/en/handbook/handbook-x86.xmlhttp://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xmlThe Gentoo Weekly Minimal Install CD and Stages can be found at the following link:http://www.gentoo.org/main/en/where.xmlabout 104Meg, just download iso and burn to a CDBoot CD, I had to hit F12 while booting to redirect to CDThe fun starts right away as it asks you what kernel you want to boot, I went with the default "gentoo" kernel with no options... just hit <enter>Run lspci and take notice of what the default kernel detected livecd ~ # lspci Create a root password right away, just in case... livecd ~ # passwd Hopefully networking has already been configured and working, but it wasn't in my case, so I followed the directions: livecd ~ # net-setup eth0It had already detected my network card, so I said <yes> to the interface <ok> My network is wired <ok> Use DHCP it worked, I had a functioning network, which I verified by w/ livecd ~ # ifconfiglivecd ~ # ping -c 3 www.gentoo.org Now it was time to create the Partitions, I went against the fdisk example and used cfdisk livecd ~ # cfdisk del existing sda1 partition so it's all free space.Now I thought I was clever with my own partitioning scheme, but that turned out to be stupid, because I could no longer follow the install guide verbatin and had to keep adjusting things in my head. Here are my partitions: sda1 Primary Linux 83 10000.95 sda2 Primary Linux 83 8003.20 sda3 Primary Linux 82 1998.75 sda4 Boot Primary Linux 83 485.30write Now for the filesystem, I did follow their suggestion livecd ~ # mkfs -j /dev/sda1 -lots of useless info displayed about groups, blocks, fragments, superblocks, etc...-writing inode tables, creating journal, filesystem will be automatically checked every 30 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override livecd ~ # mkfs -j /dev/sda2livecd ~ # mkswap /dev/sda3livecd ~ # mkfs /dev/sda4 Now we mount the partitions, mine are again different from the install guide.If I was smart I would go back and mimic the install guide... if I was really smart, I would stop the install and play with my dogs, but I'm not smart and kept plugging on with my "different" partitions. livecd ~ # mount /dev/sda1 /mnt/gentoolivecd ~ # mkdir /mnt/gentoo/bootlivecd ~ # mount /dev/sda4 /mnt/gentoo/bootlivecd ~ # mkdir /mnt/gentoo/homelivecd ~ # mount /dev/sda2 /mnt/gentoo/homelivecd ~ # cd /mnt/gentoo date & time livecd ~ # date omg, this looked good, nothing to do here!!Download stage3 tarball livecd ~ # links http://www.gentoo.org/main/en/mirrors.xmlI down-arrowed to Michigan Tech. University (http)-choose /releases-choose /x86-choose /current-stage3stage3-i686-20091229.tar.bz2-d-ok<esc>-exit-yes livecd ~ # ls boot home lost+found stage3-i686-20091229.tar.bz2 livecd ~ # tar xvjpf stage3-i686-20091229.tar.bz2 -unpacking/installing stuff scrolls down my screen for the next 3 to 5 minutesNow I download portage (package manager tarball) livecd ~ # cd /mnt/gentoo/usr Try the same mirror as before: livecd usr # links http://www.gentoo.org/main/en/mirrors.xmlconnecting...but it never does, so I go back and pick a different mirrorGeorgia Tech. (http)-choose /snapshotsportage-latest.tar.bz2-save-ok<esc>FileExitYes livecd usr # tar xvjf portage-latest.tar.bz2 -unpacking/installing stuff scrolls by for about 10 minutes livecd usr # cd /etc Copy DNS Info livecd etc # cp -L /etc/resolve.conf /mnt/gentoo/etc/ Mount /proc and /dev filesystems livecd etc # cd /livecd / # mount -t proc proc /mnt/gentoo/proclivecd / # mount -o bind /dev /mnt/gentoo/dev Now chroot livecd / # chroot /mnt/gentoo /bin/bash livecd / # env-update>>>Regenerating /etc/ld.so.chache... livecd / # source /etc/profile I would suggest you modify the command, because I ran it verbatim like the install guide and I ended up with a ridiculous prompt: (chroot) livecd / # livecd / # export PS1="(chroot) #PS1" At this point the guide congratulates you, because you are now in your own Linux environment.Update Portage Tree (chroot) livecd / # emerge --sync -stuff scrolls by for about 30 seconds (chroot) livecd / # eselect profile list The default is good for me (chroot) livecd / # cd /usr/share/zoneinfo/US(chroot) livecd US # cp ./Eastern /etc/localtime The hosts file and hostname (chroot) livecd / # cd /etc(chroot) livecd etc # echo "127.0.0.1 gentoo.linuxbox gentoo localhost" > hosts(chroot) livecd etc # sed -i -e 's/HOSTNAME.*/HOSTNAME="gentoo"/' conf.d/hostname (chroot) livecd etc # hostnamegentoo (chroot) livecd etc # hostname -fgentoo.linuxbox Now to download the kernel sources (chroot) livecd US # emerge gentoo-sources (chroot) livecd US # cd /usr/src (chroot) livecd US # ls -llinux -> linux-2.6.31-gentoo-r6linux-2.6.31-gentoo-r6 Manual Kernel Config (chroot) livecd US # emerge pciutil -stuff scrolls by quicklyNow I use lspci and lsmod trying to record everything which didn't really help (chroot) livecd US # lspci(chroot) livecd US # lsmod Let's get working on that kernel (chroot) livecd US # cd /usr/src/linux (chroot) livecd linux # make menuconfig Now the choices, but I'm prepared... right?, I have the lspci output which was basicallyno help. I removed the laptop stuff and the AMD stuff because my proc is intel,etc... I made about 15 changes from the already selected.Now I'm getting anxious... when can I test it?Compile the new kernel (chroot) livecd linux # make && make modules_install stuff scrolls down the screen for about 15 minutes or soCopy the new image to /boot (chroot) livecd linux # cp arch/i386/boot/bzImage /boot/kerner-2.6.31-regexorcist-r6 Modules (chroot) livecd linux # find /lib/modules/2.6.31-gentoo-r6/ -type f -iname '*.0' -or -iname '*.ko' | more nothing I need to load? (chroot) livecd linux # cd /etc fstabNow I need to edit fstab, the says use nano, but I like vi/vim (chroot) livecd etc # vi fstab (nothing happens) whoops, I don't have vi/vim yet (chroot) livecd etc # emerge vim -stuff scrolls by (chroot) livecd etc # vi fstabHere are the changes I made/dev/sda4 /boot ext2 noauto,noatime 1 2/dev/sda2 / ext3 noatime 0 1/dev/sda3 none swap sw 0 0/dev/cdrom /mnt/cdrom auto users 0 0/dev/sda1 /home ext3 noatime 0 0:wq (chroot) livecd etc # cd conf.d(chroot) livecd conf.d # echo 'config-eth0=("dhcp")' >> net Change root password (chroot) livecd conf.d # passwd(chroot) livecd conf.d # cd .. (chroot) livecd etc # vi rc.confEditor="/usr/bin/vim"Xsession="Xfce4":wq (chroot) livecd etc # emerge vixie-cron(chroot) livecd etc # emerge dhcpd(chroot) livecd etc # emerge grub Edit Grub, had to determine where my boot partition was in grub talk (ha! ha!) (chroot) livecd etc # vi /boot/grub/grub.confdefault 0timeout 30title Gentoo Linux 2.6.31-rexorcist-r6root(hd0,3)kernel /boot/kernel-2.6.31-regexorcist-r6 root=/dev/sda2:wq (chroot) livecd etc # grep -v rootfs /proc/mounts > /etc/mtab(chroot) livecd etc # grub-install --no-floppy /dev/sda(chroot) livecd etc # exit Back on the CD livecd ~ # cdlivecd ~ # umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo DRUM ROLL PLEASE livecd ~ # reboot The system starts to come upGrub comes up with my new kernel name selectedThe kernel starts to load...I'm on top of the world and...stuff scrolling by and...KERNEL PANIC something about can't load shelljust stopsI quickly fall from on top of the world to subterranean dismayWhat went wrong?Kernel options?I've learned my grub.conf should have said real_root not root, but that couldn't be it.Was it me... probably, but I'll blame GentooI HATE GENTOOI had some time to reflect, so I decided to download the gentoo live DVD, boot it, make selections,emerge a few required packages like a desktop environment and I'm online in an hour.I then posted my installation success on the forum, indicating a few problems. I didn't indicate how big my "few problems" were, but if I had you wouldn't be laughing :'( at this tutorial right now.Yes, I still have a sense of humor,and I have gentoo installed Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 8, 2010 Share Posted January 8, 2010 Outstanding! Thank you for you contribution, Rick. You've been linked to the Pictutorials/Standard Tutorials pinned thread HERE. :'( Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 8, 2010 Share Posted January 8, 2010 Excellent post Rick!!!!! I would have had responded earlier but I had a late night. I think I will wait for an off day to try this but it looks like fun Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 9, 2010 Share Posted January 9, 2010 Aww... you BROKE it! Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 9, 2010 Share Posted January 9, 2010 Aww... you BROKE it! Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 9, 2010 Author Share Posted January 9, 2010 Excellent post Rick!!!!! I would have had responded earlier but I had a late night. I think I will wait for an off day to try this but it looks like fun Did you say "it looks like fun"??You did read the part about... I'd rather smash my finger with a hammer than go through that again You have been warnedIf anyone can make it work, I imagine you or Eric can.Good Luck!! Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 9, 2010 Share Posted January 9, 2010 Bah! Not me. I'm batting .000 with Gentoo. I've had one total system crash, one destroyed hard drive partition scheme, and two minor failures in my Gentoo installation history. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 9, 2010 Share Posted January 9, 2010 Yeah I enjoy things like that Well I am gonna try anyway, as soon as I get some time. Last time it took almost a day, so we will see Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 9, 2010 Author Share Posted January 9, 2010 Bah! Not me. I'm batting .000 with Gentoo. I've had one total system crash, one destroyed hard drive partition scheme, and two minor failures in my Gentoo installation history. I feel your pain, being a Gentoo victim myself Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted January 9, 2010 Share Posted January 9, 2010 Well, since this tutorial is linked in the pinned Pictutorials topic, maybe we shouldn't trash this thread much worse. Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 9, 2010 Author Share Posted January 9, 2010 Don't be fooled, Gentoo is a cold blooded killer... Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 11, 2010 Share Posted January 11, 2010 (edited) Gentoo is definitely a learning experience. Gentoo isn't for everyone, but it is for me. I've learned a lot by using it that I probably wouldn't have learned otherwise. Edited January 11, 2010 by trigggl Quote Link to comment Share on other sites More sharing options...
Eggdog Posted January 11, 2010 Share Posted January 11, 2010 and I have gentoo installedIs it my imagination, or did that archuser graphic in your sig get a lot larger & more prominent?:"> Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 11, 2010 Share Posted January 11, 2010 Is it my imagination, or did that archuser graphic in your sig get a lot larger & more prominent? :' />No it was a Frugalware graphic but I guess he likes Arch so much that he changed his signature. Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 11, 2010 Author Share Posted January 11, 2010 Gentoo is definitely a learning experience. Gentoo isn't for everyone, but it is for me. I've learned a lot by using it that I probably wouldn't have learned otherwise.Yes I previously had a Gentoo system (a while back) and now I have it again on another hard drive (removed and sitting on shelf).I really only have 3 problems (other than installation) with Gentoo...1.) Compiling everything from source w/ Portage (long delays)2.) Portage would not overwrite an existing file during an install, it would tell you about it and you have to go back and merge the difference, rename or whatever3.) Removing applications is possible, but it doesn't always go as planned at least that is my experienceAll 3 problems are related to how I use my linuxbox. I like to script in multiple languages, so I sometimes have multiple versions of a language installed like python and python3,perl and perl6, etc... and I'm always trying some new IDE which I usually install, try out and 5 minutes later remove. In addition to the IDEs, I like to try out all kinds of new applicationsand of course, most of them get removed within a day or so (usually 10 minutes later).As you can imagine, this is a Gentoo nightmare as all files and are compiled from source and I don't have the patience for that.I could install RPM on Gentoo and use binaries, but keeping track of how something was installed becomes a problem.I like the flexibility of Gentoo, editing compiler flags and such, but it just doesn't fit me. I like clean, easy, and constantly rotating applications.I'm glad Gentoo is for you, I still a little too hard for me to use. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 11, 2010 Share Posted January 11, 2010 That is why I had gave up on Gentoo when I installed it before. IMHO, it took way to long to install simple packages. I do not mind compiling but for a days, nahhh.That being said I may still try to get Gentoo up and running on one of my test machines. Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 11, 2010 Author Share Posted January 11, 2010 I did like Frugalware, which also uses pacman (pacman2 fork)but like most other distros, a lot of extra code in the config files,trying to be everything to everyone.I'll be sticking with Arch for now, but you never know what might come down the path.I like the unmodified structure of Arch, I imagine Slackware is the same (everything is where it's supposed to be).I like pacman a little better than other package managers but I could get used to most any one that handles dependencies and allows clean un-installs.I like the Debian/Ununtu repositories, they have so much more!! (I've already had to install the "Opera web browser" from source on my Arch system) Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 11, 2010 Share Posted January 11, 2010 You need to set up yaourt http://wiki.archlinux.org/index.php/Yaourt Yaourt is a frontend to pacman that fetches packages not found in the main repos. The packages come from AUR (Arch User Repository). Yet AnOther User Repository Tool. Yaourt is a community-contributed wrapper for pacman which adds seamless access to the AUR, allowing and automating package compilation and installation from your choice of the thousands of PKGBUILDs in the AUR, in addition to the many thousands of available Arch binary packages. Yaourt uses the same exact syntax as pacman, which saves you from relearning an entirely new method of system maintenance, but also adds new options. Yaourt expands the power and simplicity of pacman by adding even more useful features and provides pleasing, colorized output, interactive search mode, and much more. You will almost certainly want this. http://wiki.archlinux.org/index.php/YaourtThere are 18975 packages currently in AUR. http://aur.archlinux.org/index.php For instance the versions of Opera in AUR: $ yaourt -Ss operaaur/opera 10.10-2 (836) The Opera web browseraur/opera-adblock 2009.12.17-1 (55) Fanboy's AdBlock Filterset for Operaaur/opera-adblock-complete 2009.12.17-1 (119) Fanboy's AdBlock Filterset for Opera including Stat/Tracking Filtersaur/opera-adblock-elements 021B-1 (5) Fanboy's Element Hider for Opera, compliments 'opera-adblock'(-complete)aur/opera-b1 10.10-1 (Out of Date) (9) Opera 10.10 Beta with Opera Uniteaur/opera-beta 10.10-10 (Out of Date) (115) The Opera web browser 10 beta release, QT4aur/opera-bundled 10.10-1 (9) The Opera web browser, with QT4 runtimeaur/opera-china-qt3 9.64-1 (12) The Opera web browseraur/opera-china-qt4 9.64-1 (Out of Date) (16) The Opera web browseraur/opera-dev 10.20_4744-1 (117) The Opera web browser development and testing version - gcc4 shared Qt3 buildaur/opera-devel 10.50-4 (44) Web browser and Internet suite. Dev versionaur/opera-devel-qt4 10.20_4744-1 (377) The Opera web browser development and testing version, shared Qt4 versionaur/opera-dev-qt4 10.00_4493-2 (Out of Date) (14) The Opera web browser development and testing version - gcc4 Qt4 buildaur/opera-g4 LATEST-9 (Out of Date) (25) The Opera web browser - gcc4 and qt4 (g4)aur/opera-mini 5.0.17443-2 (18) Opera-mini (Mobile Edition)aur/opera-qt3 10.10-1 (19) The Opera web browser - Qt3 shared buildaur/opera-qt4 10.10-1 (346) The Opera web browser with Qt4aur/opera-shared-b1 10.10-1 (Out of Date) (6) Opera 10.10 Beta with Opera Unite, shared Qt4 versionaur/opera-static 9.64-1 (Out of Date) (12) The Opera web browser, statically linked to QTaur/opera-unite-devel-qt3 10.00_4440-3 (Out of Date) (19) The Opera web browser with Opera Unite (development and testing version, shared Qt3 version) Yaourt is also useful for installing git, svn, or devel versions of packages. Quote Link to comment Share on other sites More sharing options...
regexorcist Posted January 11, 2010 Author Share Posted January 11, 2010 Thanks for that Solid Gold Tip josh Installed yaourt, I like the colored text. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 12, 2010 Share Posted January 12, 2010 No problem. Also to update pacman packages and yaourt packages at the same time run as user: ╔═ comhack@Venus 10:08 PM ╚═══ ~-> yaourt -Syu --aur You have to type the root password more than one using this method but it is nicer to update everything with one command. Quote Link to comment Share on other sites More sharing options...
securitybreach Posted January 12, 2010 Share Posted January 12, 2010 Thanks for that Solid Gold Tip josh Installed yaourt, I like the colored text.Added to the tutorial. Thanks for reminding me!!!! Quote Link to comment Share on other sites More sharing options...
trigggl Posted January 14, 2010 Share Posted January 14, 2010 Gentoo definitely takes patience. However, it was the only distro I could get to load on my IBM powerpc64. Been learning ever since and I've gotten pretty good at reading everything that is a message to the user. Also, I know where the build logs go and I make sure I check them on long updates to make sure all libraries get cleaned up appropriately. I'm amazed at how well the developers of Gentoo incorporate all the necessary steps and make sure 90% of the gotchas are documented. If they're not documented they're usually pretty easy to find in a bug report. The updates actually compile pretty quickly with my Dell. Also with my slow ppc64 I cross-compile on the Dell using distcc to make the builds go faster on it. One of the main programs I was pushed into learning for running updates in Gentoo is 'Screen'. You can run the updates on a screen and then detach. The update keeps on going. Then you can reattach from somewhere else, such as work, to monitor it. You can even share a screen so that two people are looking at it from two different terminals. When you have a long update going, it's good to be able to set it and forget it, so that you don't lose everything if there is an ssh connection crash or a terminal accidentally gets closed. I can start an install from work, close it and reopen it at home.That reminds me. I haven't done an update in a while. With great power comes great responsibility. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.