Learn to be Patient (Fold your hands and take a deep breath)
To install gentoo you need a great deal of patience. A system only install will take around 8-10 hours and a full desktop installation around 24 hours. On a slow PC expect more.
Boot From CD [Gentoo 2004.2]
The latest CD available is gentoo 2004.2 universal live CD. However you can boot off any other CD, even a Knoppix CD. You just need a linux enviroment to install gentoo.
Change root password, [passwd]
It is wise to change the root password as the default is scrambled. You need to do this to utilize multiple terminals by using ALT and Function key sequences.
Setting Network Interface
ifconfig eth0 xxx.xxx.xxx.xxx netmask 255.255.255.128 route add default gw 202.79.36.250
Create partition using fdisk,plan your partation
fdisk /dev/hda
Template
/dev/hda1 | /boot | 100M |
/dev/hda2 | / | 10G |
/dev/hda3 | swap | 2xRAM |
/dev/hda4 | /home | Rest |
Format your Partitions/Slices using mkreiserfs or mke2fs -j
mkreiserfs /dev/hdax
Format Swap partition and mount it
mkswap /dev/hdax swapon /dev/hdax
Mount the partitions to /mnt/gentoo
mount /dev/hdax /mnt/gentoo mkdir /mnt/gentoo/boot mkdir /mnt/gentoo/proc mount /dev/hdax /mnt/gentoo/boot
Make sure your system date is OK
date
You can also change the date using date
date MMDDhhmmYYYY
Configure DNS
- Edit resolv.conf
vi /etc/resolv.conf
search wlink.com.np nameserver 202.79.32.35 nameserver 202.79.32.34
Start the installation using Stage1
cd /mnt/gentoo tar -xvjpf /mnt/cdrom/stages/stage1*.tar.bz2 -C /mnt/gentoo
2005.0
stage1 snapshots is not available in Gentoo 2005.0 universal CD
get it from here:
Install Portage
tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 -C /mnt/gentoo/usr mkdir /mnt/gentoo/usr/portage/distfiles cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles
Edit make.conf
vi /mnt/gentoo/etc/make.conf
( sample only )
USE="mmx sse crypt ethereal tcpd" CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O3 -pipe -ffast-math -fomit-frame-pointer" CXXFLAGS="${CFLAGS}" MAKEOPTS="-j2" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo"
Entering the chroot enviroment
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf mount -t proc none /mnt/gentoo/proc chroot /mnt/gentoo env-update source /etc/profile emerge sync
Bootstrapping
cd /usr/portage
[Note:Check the TIME of the machine before bootstraps]
./scripts/bootstrap.sh -f ./scripts/bootstrap.sh
Build the System
emerge --pretend system emerge --fetchonly system emerge system
Configure the Timezone
ln -sf /usr/share/zoneinfo/Asia/Katmandu /etc/localtime
Fetch the Kernel Sources
emerge gentoo-sources
Build the Kernel
cd /usr/src/linux make menuconfig make dep && make bzImage modules modules_install cp arch/i386/boot/bzImage /boot/kernel-2.4.2x-gentoo-rx cp System.map /boot/System.map-2.4.2x-gentoo-rx cp .config /boot/config-2.4.2x-gentoo-rx
Edit fstab ( sample only )
nano /etc/fstab
Alternatively you can use vi /mnt/gentoo/etc/fstab in non-chroot shell
/dev/hdax /boot ext2 noauto,noatime 1 2 /dev/hdax none swap sw 0 0 /dev/hdax / ext3 noatime 0 1 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
Configure Networking
echo hostname > /etc/hostname echo wlink.com.np > /etc/dnsdomainname rc-update add domainname default
Configure IP Address
nano /etc/conf.d/net
iface_eth0="xxx.xxx.xxx.xxx broadcast 202.79.36.255 netmask 255.255.255.128" gateway="eth0/202.79.36.250"
Configure Network on boot
rc-update add net.eth0 default
Configure DNS
nano /etc/resolv.conf
domain wlink.com.np nameserver 202.79.32.35 nameserver 202.79.32.34 nameserver 202.79.32.33
Configure Hosts File
/etc/hosts
xxx.xxx.xxx.xxx hostname.wlink.com.np hostname
Root Password
password root
Configure rc.conf
nano /etc/rc.conf
CLOCK="local" EDITOR="/usr/bin/vim"
Installing Essential packages
emege syslog-ng emerge vixie-cron emerge reiserfsprogs
Load the services in startup
rc-update add syslog-ng default rc-update add vixie-cron default
Install the bootloader
emerge grub
Configure grub
nano /boot/grub/grub.conf
default 0 timeout 30 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2.4.2x-rx root (hd0,0) kernel /kernel-2.4.2x-gentoo-rx root=/dev/hdax
Install bootloader
cp /proc/mounts /etc/mtab grub-install --root-directory=/boot /dev/hdx
User administration
passwd root useradd -m vicky passwd vicky usermod -G wheel vicky
Reboot and Enjoy !!
exit cd umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo reboot
Remove the CD