Simpler Gentoo Install
Posted 27 July 2004 - 12:51 AM
The main Reasons to use gentoo are:
1) Great package and dependancy managment through Portage.(why normal people use it)
2) It can be customized and compiled intirlely from source.(enter masochism)
3) Very helpful and active forums. Great for the install process if things go wrong, which is why I want to test the install from an installed distro.
What you need:
1) A fast internet conection.(Everything from Portage is downloaded.)
2) If You want to do the compiled from source install(Stage 1) You will need a fast computer of lots of time for compiles.
3)Patience. Gentoo is designed for all packages to be compiled from source. Once your system is setup this usuall works well, but again it takes time. If you don't want to deal with compiling from source, but still want good package management you might give Arch Linux a shot. I havn't used it but I've heard it's also good. It still has lots of setup and configureation for the user though, just no compiles.
That being said here's and introduction to Portage, Use and Stages.
Portage is Gentoo package managment, and main distinction from RPM based distros. Portage works with a set of scripts in the directory /usr/portage to calculate dependancies, and configuration options for the program to be installed. Some graphical front-ends exist, but I have found portage to be most usful and the shell console. It has a very simple syntax:
Poratge can also be used to upgrade all programs on you system by
emerge world. I'll stop there; anything else can be found through experimentation "emerge -h".
The Use variable in /etc/make.conf is a set of compile time option for poratge. You can use this to add option support of features into your programs. For example if you programs to have optional gnome support and not to have optional kde support set USE="gnome gtk -kde -qt" or vice versa if you like kde. This isn't vital early on, and if you use Gentoo you'll get the hang of it over time.
The stages are a set of tools needed to install gentoo, gcc, glibc, and meny others.There are three stages
Stage 1) is basicly a gcc binutils portage, and there dependancys,Gentoo calls it the toolchain.
If you do this you have to compile your entire system. This is what I have now
Stage2) this gives you a precompiled toolchain, but you still compile everthing else.
Stage three is all binary execp the kernel. there is a tool called genkernel to help with conpiling the kernel.
So I'll post the instruction portion later today. My eyes need a rest. From you current distro create a partion to install on and create the folder /mnt/gentoo. This will be the mount point for the install. I'll test installing from an installed distro before I post the instructions.I'll also think about how to be as concise as possible for that part. If you have read the Gentoo site, which will hopfully make more sense after I'm done, and have any questions I didn't answer about general concepts or ohter feedback please ask. The instructions will contain commands and comments in such a way that you could use it as a script. More will come later. Hope this helps
Posted 27 July 2004 - 02:12 AM
*Open an x-term or whaterver you shell is.
mount /dev/installpartition /mnt/gentoo
# If your cdrom is not /dev/cdrom, check /etc/fstab or /etc/mtab
#after: /mnt/cdrom/stages/stage(1 ,2 ,or 3) hit tab. I have w#ritten the guide for a stage 1 since that is what I have. It's #not so bad since you can still use your installed distro during #the install; jsut don't crash you system!!
tar -xvjpf /mnt/cdrom/stages/stage1-<subarch>-2004.2.tar.bz2
nano -w /mnt/gentoo/etc/make.conf
*make these changes:
-uncomment USE, and also change -alsa to also
-change CHOST to i686-pc-gnu-linux, if you have a pentium 2 to or greater. and read the comments above the line.
-Change the uncommented CFLAGS to reflect you archetecture i686 for p2 and up and athlon-xp if you haveone.
-uncomment makeopts"-j2" also read the comments above it in the file
# If you are doing this from within a distro I don't think is #nessecary. It also might not work on no gentoo systems. I don't #know if other distros have the same setup. This file contains #the DNS info.
# if you don't know how chroot works this step sets /mnt/gentoo #to / so everything not in /mnt/gentoo goes away. Use alt-f2 to #switch to a non-chrooted console. although if you are running #you installed distro just use your file manager.
chroot /mnt/gentoo /bin/bash
#This updates portage. This might tell you portage needs to be upgraded, ignore the #message, portage will be updated by the install.
#This takes you into partage, fetches all the needed files for #stage1, and then it compiles, and updates your profile. This #takes ~3-4 and a 2.4 gig pentium4 with 1gb of ram. If you want #to create a shell script for this part copy the lines up to "end #stage2" into a text file,lest call it 'install" and place them #into /mnt/gentoo, you will probably do this from your file #browser outside you chrooted x-term. In your x-term do these #comands: 1)cd / 2)cdmod +x install 3) source install
#Then go to work, school, sleep or watever else. This takes a #total of ~8 hours on my system. Just don't chrash your running #distro since it will break the install.
#This next part is stage2
emerge --fetchonly system
##end stage 2
##I'll post more later since it should be tomarrow-ish before that finishes. I'll check in periodicly so ask any question you have. You can also use the Gentoo forums.
Posted 27 July 2004 - 07:23 AM
## pick you own time zone
ln -sf /usr/share/zoneinfo/*** /etc/localtime
#write this for the bootloader config
ls /boot/kernel* /boot/initrd*
rc-update add hotplug default
#I don't think I can do it more effectivly than the Gentoo #Handbook for system config
#I'm assuming that you will already have grub or lilo installed. Change the examples I give to reflect verion and partion numbers. Add the appropriate example to your bootloaader config
nano -w /boot/grub/grub.conf
title=Gentoo Linux 2.4.26-r6
kernel /kernel-2.4.26-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3
nano -w /etc/lilo.conf
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3"
##And from here use the Handbook and the install section of the Gentoo Forum.
## I hope this helped, make it a little easier. Please give me feedback on this. Sorry it isn't easier but, I think it is worth the time to give Gentoo a shot. Good Luck!
Posted 27 July 2004 - 09:35 PM
Secondly, and also as an addition to the "In the Clear"-thread, I'd like to throw in some teasers for those who fancy some Gentoo-ish experience: As I said, we tested a few distros a couple of months ago on various machines. Amongst those machines were also two of our old dual-p3/500 on ASUS P2B-DS boards (1gig RAM, 4 x Seag. Barr. SCSI HDDs RAID 0+1, on DAC 960s RAID ctrl., Rage 3D gfx).
To our pleasure these machines under Gentoo felt like a "Ferrari on speed" again and handled even heavy loads with a certain "grandezza" In a nutshell: A stage 1-install of Gentoo can indeed deliver you some amazing extra power. In fact, so much extra power that we've kept those old servers as fallback machines. So if you have some old hardware and some spare time to really go for a "stage 1" install, I can only say "Do it!"
ps: Might also mention the installation time, to give you a clue All in all: ~2-3 days, including X, a full KDE, a full GNOME, Postgres, Apache, PHP, Gimp and what the smeg else Maybe a waste of time, as X has never been launched again after the tests
Posted 28 July 2004 - 12:06 AM
In my first post I mentioned that you can keep you install up to date with "emerge world" that was a bit oversimplified. Here is the "correct/most stable" way.
emerge sync : -this updates the portage tree /usr/portage
emerge -uD world : -u is update; -D checks direct and inderect dependancies when updating. Also -a (ask)or -p (pretend) are good flags if you not sure if you want to update.
I don't know how much experience you guys have with this but it killed my system the first time I tried.
Here is a guide on basic kernel confiugration. To build the kernel I do this.
make && make modules_install && make install
-then add a new entry at the bottom of you bootloader config, and keep the old entry, at least for a while.
Two notes on my memory footprint immideatly after boot.
without x running :-/+ buffers/cache: 21 990
with X running :-/+ buffers/cache: 56 555
I use x.org not xfree, and fvwm is my window manager.
I must second that it is fast.