by qbnut

Installation From a Stage 3 Tarball

This only covers getting the system up-and-running as quickly as possible, from an already built stage 3 tarball (Stargate was done like this, for speeds sake – with more time, I would have done it from a Stage 1 again).
For most, this is fine, but for those who want the full lowdown on going from a Stage 1 (as I did with Chevron) , go to
http://www.gentoo.org/doc/en/gentoo-install-x86.xml

Note:
This is not a Linux newbie tutorial. This assumes you already know to some extent what you are doing with Linux, and what basic commands like vi, mount, etc do. Throughout this tutorial, I give no explanations as to why something is done the way it is. I assume you can figure it out. If not, and you really need guiding through installation, try the above link to the tutorial on the Gentoo.org site.

Boot Disk

Partitioning / Formatting

  • cfdisk /dev/hda
  • 1x /boot (~ 30MB) (/dev/hdaX)
  • 1x Swap (~ 2x Available RAM) (/dev/hdaY)
  • 1x / (~ Rest of disk) (/dev/hdaZ)
  • Add extras for /usr and /home, if desired
  • mke2fs -j /dev/hdaX | mkreiserfs /dev/hdaX | mkfs.xfs /dev/hdaX
  • mke2fs -j /dev/hdaZ | mkreiserfs /dev/hdaZ | mkfs.xfs /dev/hdaZ
  • mkswap /dev/hdaY

Init Disk Bits

  • swapon /dev/hdaY
  • mkdir /mnt/gentoo (not required if Gentoo version > 1.4rc3)
  • mount /dev/hdaZ /mnt/gentoo
  • mkdir /mnt/gentoo/boot
  • mount /dev/hdaX /mnt/gentoo/boot

Untar System

  • cd /mnt/gentoo
  • wget http://distro.ibiblio.org/pub/linux/distributions/gentoo/releases/1.4_rc3/x86/x86/stages/stage3-x86-1.4_rc3.tar.bz2
  • tar -xvjpf stage3-x86-1.4_rc3.tar.bz2
  • mount -t proc proc /mnt/gentoo/proc
  • nano /mnt/gentoo/etc/resolv.conf
  • chroot /mnt/gentoo /bin/bash
  • env-update
  • source /etc/profile

Update to latest emerge tree

  • nano /etc/make.conf to set optimizations for ebuilds
  • emerge sync | emerge rsync
  • emerge -u system

Time Zone (Important!)

  • ln -sf /usr/share/zoneinfo/GMT0 /etc/localtime

Build Kernel

  • Emerge your choice of kernel here. I suggest “Vanilla” sources. Choose from ONE of the following:

    • emerge vanilla-sources
    • emerge gentoo-sources
    • emerge xfs-sources
    • emerge openmosix-sources
    • emerge usermode-sources

  • cd /usr/src/linux/
  • make menuconfig
  • Turn on:
    • EXT3 Support & Second Extended File System support
    • /proc file system support
    • /dev filesystem support (and “Automatically mount this at boot” option)
    • DESELECT /dev/pts support
  • make bzImage modules modules_install
  • cd /usr/src/linux/arch/i386/boot
  • mount /dev/hdaX /boot (if not done already)
  • cp bzImage /boot/bzImage (or whatever your naming scheme is :) )

System Logger

  • emerge sysklogd | emerge syslog-ng | emerge metalog | emerge msyslog
  • rc-update add YOUR-CHOSEN-LOGGER default

Cron

  • emerge dcron | emerge vcron | emerge fcron
  • rc-update add YOUR-CHOSEN-CRON default
  • crontab /etc/crontab | crontab -e

LILO

  • emerge lilo
  • nano /etc/lilo.conf
  • lilo

Last Bits ‘n’ Bobs

  • nano /etc/fstab (check it’s AOK)
  • passwd root (essential!)
  • echo myhost.mydom.com > /etc/hostname (again, don’t forget this!)
  • nano /etc/hosts
  • nano /etc/modules.autoload (to autoload drivers at bootup time)
  • nano /etc/rc.conf (edit KEYMAP and CLOCK entries)
  • nano /etc/conf.d/net (to set NIC parameters)

(For 1 NIC:)

  • rc-update add net.eth0 default

(For 2 NICS:)

  • cp /etc/conf.d/net.eth0 /etc/conf.d/net.eth1
  • nano /etc/conf.d/net.eth1
  • rc-update add net.eth0 default
  • rc-update add net.eth1 default

Reboot

  • umount /mnt/gentoo/boot
  • umount /mnt/gentoo
  • swapoff /dev/hdaY
  • reboot

Done :)

Leave a reply

required

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>