Gentoo x86 quick installation notes
BASED ON INSTRUCTIONS FROM http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
MERGED WITH SPARTY VIDEO TUTORIAL AT http://www.youtube.com/watch?v=E_vhQg5wDSY
Download latest x86 minimal install, maybe from:
Georgia Tech
ftp://ftp.gtlib.gatech.edu/pub/gentoo/
ftp://ftp.gtlib.gatech.edu/pub/gentoo/releases/x86/current-iso/install-x86-minimal-20140415.iso
Argonne National Laboratory Public Software Mirror
http://mirror.mcs.anl.gov/pub/
(or experiment with the 64 bit version downloading ftp://ftp.gtlib.gatech.edu/pub/gentoo/releases/amd64/current-iso/install-amd64-minimal-20140619.iso)
To start the installation, burn ISO or prepare a usb drive to boot.
After booting it, type at the promt gentoo:
gentoo-nofb
If internet is ok, partition your hard drive and then make the file systems (format) each partition, turn swap on and mount the partitions.
mkswap /dev/sda2 && swapoon /dev/sda2
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 mnt/gentoo/boot
cd /mnt/gentoo
Go to Argonne National Laboratory (http) using links or links2 text based web browser
releases
x86
current-stage3
stage3-i686-*.tar.bz2 <--- download this
snapshots
portage-latest.tar.bz2 <--- download this
cd gentoo
tar xvinf stage[hit TAB] [hit ENTER]
tar xvinf /mnt/gentoo/portage[hit TAB] -C /mnt/gentoo/usr [hit ENTER]
PREPARE THE chroot
livecd usr # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount --rbind /dev /mnt/gentoo/dev
livecd / # mount --rbind /sys /mnt/gentoo/sys
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # env-update
livecd / # source /etc/profile
livecd / # export PS1="(CHROOT) $PS1"
(chroot) livecd / # ls /usr/share/zoneinfo
cp /usr/share/zoneinfo/Caribean/PuertoRico /etc/localtime #THIS IS JUST AN EXAMPLE, NOT NECESSARY THE REAL VALUES
echo "Caribean/Puerto Rico" > /etc/timezone # THIS IS JUST AN EXAMPLE, NOT NECESSARY THE REAL VALUES
eselect profile list
eselect profile set 2 <--- (select the desktop profile)
cd /etc
echo "127.0.0.1 mybox.at.myplace mybox localhost" > hosts
sed -i -e 's/hostname.*/hostname="mybox"/' conf.d/hostname
hostname mybox
hostname -f
time emerge gentoo-sources # or cd /usr/src/linux && make menuconfig && time make -j2 && make modules_install && cp arch/i386/boot/bzImage /boot/kernel
time emerge genkernel # genkernel --install --no-ramdisk-modules initramfs
time genkernel all
cd /etc
nano -w fstab # Edit your /etc/fstab and replace BOOT, ROOT and SWAP with the actual partition names. Don't forget to check that the file systems match your installation.
# EXAMPLE /ETC/FSTAB
#/dev/sda1 /boot ext2 noauto,noatime 1 2
#/dev/sda3 / ext3 noatime 0 1
#/dev/sda2 none swap sw 0 0
# THEN CONFIGURE NETWORK ACORDING TO Code Listing 2.23: Configure networking
cd init.d
ln -s net.lo net.enp0s3
cd ../conf.d
echo 'config_enp0s3="192.168.1.10 netmask 255.255.255.0 brd 192.168.1.255"' >> net
echo 'routes_enp0s3="default via 192.168.1.1"' >> net
echo 'hostname="mybox"' > hostname
rc-update add net.enp0s3 default
# Note: Emerge pcmciautils if you need support for PCMCIA cards!
passwd # SET ROOT PASSWORD
nano -w /etc/conf.d/hwclock # Edit /etc/conf.d/hwclock to set clock options AND Check the system configuration in /etc/rc.conf and /etc/conf.d/keymaps and edit any of those files if required.
emerge syslog-ng vixie-cron
rc-update add syslog-ng default
rc-update add vixie-cron default
# Code Listing 2.28: Install extra tools if required # Install the necessary file system tools (xfsprogs, reiserfsprogs or jfsutils) and networking tools (dhcpcd or ppp) if you need any.
emerge dhcpcd
cd /boot
ls # CHECK YOUR KERNELS IN /BOOT! NOT THERE? YOU WILL NEED TO START THE PROCESS AGAIN TO CONFIGURE YOUR KERNELS!
cd /
time emerge sys-boot/grub:2
grub2-install --no-floppy /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg
exit
umount -l /mnt/gentoo/dev
umount -l /mnt/gentoo/sys
umount -l /mnt/gentoo/proc
umount -l /mnt/gentoo/boot
umount -l /mnt/gentoo
reboot
# LOGIN AS ROOT AND CREATE A USER
useradd -m -G users,wheel,audio,cdrom,usb,video,portage,cron -s /bin/bash type-user-name-here
# LOGOFF AND LOGIN AS ROOT AGAIN AND CREATE A PASSWORD FOR THE USERS CREATED