Jump to content


Photo

Simpler Gentoo Install


  • Please log in to reply
8 replies to this topic

#1 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 27 July 2004 - 12:51 AM

This thread is a resonse to In The Clear. It is intended help with a first time Gentoo install. I plan to write this in several steps, so that I can get feedback, based on you setups. in this first post I'll talk a little about why I use Gentoo and what you need to enjoy using Gentoo, it's not as much masochism as you might think. Also, before I do the actual instruction section I will try to test how to do the install to a clean partition while running you current distro, which I believe can be done.

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:
emerge filename
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




#2 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 27 July 2004 - 02:12 AM

Here are the instruction for the first part of the install. So make sure you have done this. I am assumeing you have already partitioned the drive you plan to use. This guide is setup like a shell with "#" as a comment.Don't try to make a script out of this verbatim. This covers everthing before the kernel. You might want to read my comments before starting. I strongly recommend do the script as described near the end.

*Open an x-term or whaterver you shell is.
mkdir /mnt/gentoo
mkdir /mnt/cdrom
su
mount /dev/installpartition /mnt/gentoo
# If your cdrom is not /dev/cdrom, check /etc/fstab or /etc/mtab
mount /dev/cdrom

cd /mnt/gentoo
ls /mnt/cdrom/stages

#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
env-update
source /etc/profile

#This updates portage. This might tell you portage needs to be upgraded, ignore the #message, portage will be updated by the install.
emerge sync

#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.
cd /usr/portage
scripts/bootstrap.sh -f
scripts/bootstrap.sh
source /etc/profile

#This next part is stage2
emerge --fetchonly system
emerge 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.

#3 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 27 July 2004 - 07:23 AM

This should be the last piece I post.To setup the kernel for the first time I would use genkernel unless you have compiled a kernel before. For some parts of the final setup I'll think the Gentoo Handbook is the simplest possible option

## pick you own time zone
ls /usr/share/zoneinfo
ln -sf /usr/share/zoneinfo/*** /etc/localtime

Kernel
##2.4
emerge vanilla-sources
or
##2.6
emerge development-sources
emerge genkernel
genkernel all

#write this for the bootloader config
ls /boot/kernel* /boot/initrd*

emerge hotplug
rc-update add hotplug default

#I don't think I can do it more effectivly than the Gentoo #Handbook for system config
#http://www.gentoo.or...l?part=1&chap=8

#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

##Grub
nano -w /boot/grub/grub.conf

title=Gentoo Linux 2.4.26-r6
root (hd0,0)
kernel /kernel-2.4.26-gentoo-r6 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3
initrd /initrd-2.4.26-gentoo-r6

nano -w /etc/lilo.conf
image=/boot/kernel-2.4.26-gentoo-r6
label=gentoo
read-only
root=/dev/ram0
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3"
initrd=/boot/initrd-2.4.26-gentoo-r6

##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!



#4 Dapper Dan

Dapper Dan

    Pooh-Bah

  • Moderators
  • 1703 posts

Posted 27 July 2004 - 04:57 PM

This will be very useful to all who are interested in Gentoo! Thanks taeuler for all of your hard work! smile

#5 SoulNothing

SoulNothing

    enthusiast

  • Members
  • 309 posts

Posted 27 July 2004 - 05:54 PM

thanks taeuler i might try gentoo after i try a few more distros

#6 blackpage

blackpage

    member

  • Members
  • 120 posts

Posted 27 July 2004 - 09:35 PM

Firstly: Good work there, taeuler. Especially as one of biggest advantages of gentoo - the excellent manuals - can occasionally turn out to be almost a drawback as their are extraordinarily lengthy. So a straightforward quick-setup guide might indeed be what some folks are looking for.

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" smile 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!" smile

regards

ps: Might also mention the installation time, to give you a clue smile All in all: ~2-3 days, including X, a full KDE, a full GNOME, Postgres, Apache, PHP, Gimp and what the smeg else smile Maybe a waste of time, as X has never been launched again after the tests smile

#7 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 28 July 2004 - 12:06 AM

I'm glad that was helpful. I want to quikly throw in 2 more things about up[censored] which gave me trouble at first. Keep in mind I was a total newbie to Linux when I started using Gentoo.

Up[censored] Gentoo
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 up[censored]. Also -a (ask)or -p (pretend) are good flags if you not sure if you want to update.

Up[censored] Kernels
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.

mount /boot
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.

Speed/Efficiency
Two notes on my memory footprint immideatly after boot.
used free
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.



#8 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 28 July 2004 - 12:13 AM

Sorry,correction to last time.
Memory usage is 18 an 46 respectivly. Great for old and new systems alike.

#9 taeuler

taeuler

    journeyman

  • Members
  • 94 posts

Posted 29 July 2004 - 08:53 AM

I feel silly now but I just found Gentoo Quick install reference. It is found in the docs section, instead of the "install handbook" section. I'm off to sugest a change to the Gentoo Documentation group.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

IPB Skin By Virteq