Main page Log in

Gentoo

From Dionyziz

[edit] Installing Gentoo in 48 laconic steps

This is a guide for a typical Gentoo installation. In no means does this attempt to replace the Gentoo Handbook; it's only a quick reference put in place mostly for myself and my teams. If this is the first time you're installing Gentoo this will not help you and will most likely confuse you, so use the handbook instead!

  1. Download 2006.1 x86 Minimal CD, burn it, make sure your BIOS is configured to boot from CD, and boot from the CD.
  2. ping -c3 www.google.com to check if you have Internet. If not,
    1. ifconfig, to check your network configuration.
    2. ifconfig eth0 (some systems need eth1, with eth0 being wireless!)
    3. net-setup eth0
  3. fdisk /dev/hda (or /dev/sda if on SATA)
    1. p to print existing partitions and d to delete them.
    2. n, p, 1, return, +32M for the boot partition.
    3. a, 1 to make it bootable.
    4. n, p, 2, return, +512M for the swap partition.
    5. t, 2, 82 to make it linux swap.
    6. n, p, 3, return, return for the root partition.
    7. w to save.
  4. mke2fs /dev/hda1
  5. mke2fs -j -O dir_index /dev/hda3 that's not a zero there
  6. mkswap /dev/hda2
  7. swapon /dev/hda2
  8. mount /dev/hda3 /mnt/gentoo
  9. mkdir /mnt/gentoo/boot
  10. mount /dev/hda1 /mnt/gentoo/boot
  11. date, to check the date. If it's incorrect,
    1. date MMDDhhmmYYYY to set it.
  12. cd /mnt/gentoo
  13. links http://www.gentoo.org/main/en/mirrors.xml
    1. Releases -> x86 -> current -> stages -> stage3-i686-2006.1.tar.bz2
    2. Releases -> x86 -> current -> stages -> stage3-i686-2006.1.tar.bz2.DIGESTS
    3. Snapshots -> portage-latest.tar.bz2
    4. Snapshots -> portage-latest.tar.bz2.md5sum
  14. md5sum -c stage3-i686-2006.1.tar.bz2.DIGESTS portage-latest.tar.bz2.md5sum
  15. tar xvjpf stage3-*.tar.bz2
  16. tar xvjf portage-latest.tar.bz2 -C /mnt/gentoo/usr
  17. nano -w /mnt/gentoo/etc/make.conf
    1. MAKEOPTS="-j2"
    2. USE="-gtk -gnome X qt4 kde dvd alsa cdr"
    3. LINGUAS="en el"
  18. mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
  19. mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
  20. cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
  21. mount -t proc none /mnt/gentoo/proc
  22. mount -o bind /dev /mnt/gentoo/dev
  23. chroot /mnt/gentoo /bin/bash
  24. env-update
  25. . /etc/profile
  26. export PS1="[kamibu] $PS1"
  27. emerge --sync
  28. emerge portage vim gentoo-sources
  29. cp /usr/share/zoneinfo/Europe/Athens /etc/localtime
  30. cd /usr/src/linux
  31. make menuconfig (go to the handbook page for kernel options if you don't remember what you need!)
  32. make && make modules_install
  33. cp arch/i386/boot/bzImage /boot/kamibu
  34. vim /etc/fstab
    1. /dev/hda1 /boot ext2 defaults,noatime 1 2
    2. /dev/hda2 none swap sw 0 0
    3. /dev/hda3 / ext3 noatime 0 1
  35. vim /etc/conf.d/hostname
    1. HOSTNAME="fred"
  36. vim /etc/conf.d/net
    1. dns_domain_lo="fidias"
    2. config_eth0=( "dhcp" )
    3. dhcp_eth0="nodns nontp nonis"
  37. rc-update add net.eth0 default
  38. passwd
  39. emerge syslog-ng vixie-cron slocate dhcpcd grub
  40. rc-update add syslog-ng default
  41. rc-update add vixie-cron default
  42. vim /boot/grub/grub.conf
    1. default 0
    2. timeout 5
    3. title=Gentoo
    4. root (hd0,0)
    5. kernel /boot/kamibu root=/dev/hda3
  43. grep -v rootfs /proc/mounts > /etc/mtab
  44. grub-install --no-floppy /dev/hda
  45. Ctrl + D
  46. cd ..
  47. umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
  48. Ctrl + Alt + Del (don't forget to remove the CD from the drive)
©2010 dionyziz
Attribution-Share Alike 3.0