Gentoo quick setup (for advanced gentoo users)

  • May 8, 2016
  • Linux

This is an excerpt from gentoo handbook containing only the stuff that really matters, with no extra stuff:

Prepare your disks

Do I need to explain how? 🙂 if yes, this is not for you

Mount them

mkdir /mnt/gentoo
mount root /mnt/gentoo
mount boot /mnt/gentoo/boot

Prepare stage3

cd /mnt/gentoo
lynx http://distfiles.gentoo.org/releases/amd64/autobuilds/current-install-amd64-minimal/
tar xvjpf stage3-*.tar.bz2 --xattrs

Chroot

mirrorselect -i -o >> /mnt/gentoo/etc/portage/make.conf
mkdir /mnt/gentoo/etc/portage/repos.conf
cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf
cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
emerge-webrsync
emerge --sync

Emerge setup

eselect profile list
eselect profile set XXX
emerge --ask --update --deep --newuse @world
echo "Europe/Prague" > /etc/timezone
emerge --config sys-libs/timezone-data
emerge vim
vi /etc/locale.gen
locale-gen
eselect locale list
eselect locale set 5

Kernel

emerge sys-kernel/gentoo-sources sys-apps/pciutils 
cd /usr/src/linux 
# Build as you like
emerge sys-kernel/linux-firmware

Initramfs

Pick one

# Genkernel
emerge sys-kernel/genkernel
genkernel --install initramfs

# Dracut
emerge dracut
cd /boot
dracut

Filesystems

Just edit /etc/fstab

/dev/sda2   /boot        ext2    defaults,noatime     0 2
/dev/sda3   none         swap    sw                   0 0
/dev/sda4   /            ext4    noatime              0 1

Networking

emerge net-misc/dhcpcd ntpd net-misc/netifrc

cd /etc/init.d
ln -s net.lo net.eth0
rc-update add net.eth0 default

Grub

emerge --ask sys-boot/grub:2
grub2-install /dev/sda
grub2-mkconfig -o /boot/grub/grub.cfg

 




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *