deflog

Scraps and Drops in this world

19 August 2015

Funtoo Quick Install List

by cc

Funtoo Quick Install List

  1. Boot boot from Live USB(Gentoo or SystemRescue CD)

  2. Prepare the disk
    # gdisk /dev/sda
    # mkfs.ext4 /dev/sda1
    # mkswap /dev/sda2
    # swapon /dev/sda2
    # mkfs.ext4 /dev/sda3
    
  3. Create essentail directory
    # mkdir /mnt/funtoo
    # mount /dev/sda3 /mnt/funtoo
    # mkdir /mnt/funtoo/Boot
    # mount /dev/sda1 /mnt/funtoo/Boot
    
  4. Download the stage3 file set date at first
    # date 03110024
    

download the stage file

# cd /mnt/funtoo
# wget http://build.funtoo.org/funtoo-current/x86-64bit/generic_64/stage3-late    st.tar.xz
# tar xvpf stage3-latest.tar.xz
  1. Chroot into Funtoo mount filesystem
    # mount -t proc none proc
    # mount --rbind /sys sys
    # mount --rbind /dev dev
    
# cp /etc/resolv.conf etc
# env -i HOME=/root TERM=$TERM chroot . bash -l

sync the

# emerge --sync

edit the fstab file

nano -w /etc/fstab
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  1. kernal installation
    # mkdir /etc/portage/sets
    # echo sys-kernel/gentoo-sources >> /etc/portage/sets/kernel
    # emerge -u @kernel
    

compile the kernel

# cd /usr/src/linux
# make menuconfig
# make && make modules_install
# cp -v arch/x86_64/boot/bzImage /boot/kernel-xxx-gentoo
  1. boot-loader installation
    # echo sys-boot/boot-update >> /etc/portage/sets/tiny
    # emerge -u @tiny
    # nano -w /etc/boot.conf
    # grub-install /dev/sda
    # boot-update
    
  2. add new user useradd -m -G users,wheel,audio -s /bin/zsh loong0
tags: