This guide contains all the commands you should use to complete a stage3 installation of Gentoo. You need a connection to the Internet to download the stage3 and Portage snapshots.
Timing output follows all commands that take more than a couple of seconds to finish. Commands were timed on an AMD 2000 1.66 Ghz PC with 512 MB of RAM and two SATA disks connected to a hardware controller.
(The following specs and the timing information should help you determine a rough estimate of the time you need to complete your install) # grep bogo /proc/cpuinfo bogomips : 3337.81 # hdparm -tT /dev/sda /dev/sda: Timing cached reads: 1100 MB in 2.00 seconds = 549.97 MB/sec Timing buffered disk reads: 224 MB in 3.01 seconds = 74.36 MB/sec # grep MemTotal /proc/meminfo MemTotal: 509248 kB
Use
livecd ~ # fdisk /dev/sda(The rest of this guide uses the following partitioning scheme) livecd ~ # fdisk -l /dev/sda Disk /dev/sda: 599.9 GB, 599978409984 bytes 255 heads, 63 sectors/track, 72943 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 12 96358+ 83 Linux /dev/sda2 13 110 787185 82 Linux swap / Solaris /dev/sda3 111 72943 585031072+ 83 Linux
Use
(ext2 is all you need on the /boot partition) livecd ~ # mke2fs /dev/sda1(Let's use ext3 on the main partition) livecd ~ # mke2fs -j /dev/sda3(Create and activate swap) livecd ~ # mkswap /dev/sda2 && swapon /dev/sda2
Mount the freshly created file systems on
livecd ~ # mount /dev/sda3 /mnt/gentoo livecd ~ # mkdir /mnt/gentoo/boot livecd ~ # mount /dev/sda1 /mnt/gentoo/boot livecd ~ # cd /mnt/gentoo
Install a kernel source (usually
livecd etc # time emerge gentoo-sources real 2m51.435s user 0m58.220s sys 0m29.890s livecd etc # cd /usr/src/linux livecd linux # make menuconfig(Configure your kernel) livecd linux # time make -j2(Elapsed time depends highly on the options you selected) real 3m51.962s user 3m27.060s sys 0m24.310s livecd linux # make modules_install livecd linux # cp arch/i386/boot/bzImage /boot/kernel
Optionally build an initramfs to boot from:
# emerge genkernel # genkernel --install --no-ramdisk-modules initramfs
Exit the chrooted environment, unmount all file systems and reboot:
livecd conf.d # exit livecd / # umount -l /mnt/gentoo/dev{/shm,/pts,} livecd / # umount -l /mnt/gentoo{/proc,/boot,} livecd / # reboot(Don't forget to remove the CD)