My Gentoo Installation

October 31st, 2007

I’ve downloaded Gentoo 2007.0 Live CD and burned it. My target PC is a P4 2.8GHz with Intel 865G chipset, which uses built-in VGA. There are two disks available and I plan to use LVM2 to make a good use for them. Boot into LiveCD and let the party begin. I’ve also have another computer handy to type this note and to refer following references.

LiveCD tricks
After booting into LiveCD, press Ctrl-Alt-F1 to enter root console. Type passwd to change root password (we’ll need it). Press Alt-F7 to switch back to the X window. Open an X terminal and su to root.

Disk partitioning and mounting
Update: if you don’t want such trouble, Sabayon installs a pre-packaged Gentoo on LVM for you.  However, you need to Google it and see if you like it.

Update: My LVM structure is updated to the simple one: throw everything into LVM except swap and boot.  Dedicate swap partition has minor performance advantage, and you definitely don’t want to mess up with sensitive GRUB.

Here’re the steps

  • use fdisk to create
    • /dev/hda1 (bootable, type 83, /boot)
    • /dev/hda2 (swap, type 82)
    • /dev/hda3 (type 8e, LVM)
    • /dev/hdb1 (type 8e LVM)
  • make file system
    • mke2fs /dev/hda1
    • mkswap /dev/hda2
  • finish section 2 in Gentoo LVM2 Installation to setup your LVM2. Stop before mounting, we’ll mount later.
  • swapon /dev/hda2
  • Mount the file system. Be extremely careful about the order of mounting. They must be mounted in the order of directory structure.

Distro Installation
I’ve opted to use LiveCD command line installer to do a network-less install in order to speed things up (select Advance Mode, Networkless). Bypass the disk partition and mounting part (we’ve already done it) and let it install. LiveCD will install a genkernel and GRUB. DO NOT REBOOT AFTER INSTALLATION. We need to chroot to the target partition and install some critical things that we need for LVM2.

  • (optional) mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
  • edit /mnt/gentoo/etc/make.conf, add FEATURES=”parallel-fetch”, tune the mirrors if needed
  • cp -L /etc/resolv.conf /mnt/gentoo/etc
  • check if proc and dev are mounted, if not
    • mount -t proc none /mnt/gentoo/proc
    • mount -o bind /dev /mnt/gentoo/dev
  • chroot /mnt/gentoo /bin/bash
  • env-update
  • source /etc/profile
  • export PS1=”(chroot) $PS1
  • emerge lvm2 and edit /etc/fstab to make sure logical volumes are properly mounted
  • you can also emerge some useful packages before reboot, e.g. vim, eix, gentoolkit, ncftp, screen
  • before reboot, manually umount logical volumes and vgchange -a n

Post-install configuration
The rest are quite simple if the reboot is sucessful *grin*. Do whatever the manual suggests and then starts from the poor 80×25 text console.

Unix | Comments Jump to the top of this page

Comments are closed.

Chef Peon's Melange

Archives

Meta

Social Links