主要参考:
http://www.gentoo.org/doc/zh_cn/handbook/handbook-amd64.xml?part=1&chap=6
1. prepare network connection
using ultra iso write gentoo-mini*.iso to flash disk
boot using flash disk
# emacs /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
network={
ssid=”your ssid”
psk=”your password phrase”
priority=5
}
# emacs /etc/conf.d/net
modules=( "wpa_supplicant" ) wpa_supplicant_eth0="-Dmadwifi"
# wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
# dhcpcd wlan0
2. prepare disk
根据具体情况修改
# fdisk /dev/sda
p 查看当前状态
d 删除分区
n 建立新分区
x 专家模式 f 修复分区顺序
w 提交更改
# mke2fs -j /dev/sda1
# mkfs.ext4 /dev/sda3
# mkswap /dev/sda2
# swapon /dev/sda2
# mount /dev/sda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/sda1 /mnt/gentoo/boot
3. download & unzip
# cd /mnt/gentoo
http://mirrors.kernel.org/gentoo/releases/amd64/autobuilds/current-stage3/
http://mirrors.kernel.org/gentoo/releases/snapshots/current/
#
links
http://www.gentoo.org/main/en/mirrors.xml
download stage3-amd64-<release>.tar.bz2 and portage-latest.tar.bz2
# md5sum -c stage3-amd64-<release>.tar.bz2.DIGESTS
# tar xvjpf stage3-*.tar.bz2
#
md5sum -c portage-latest.tar.bz2.md5sum
# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr
# emacs /mnt/gentoo/etc/make.conf
CFLAGS=”-march=core2 -O2 -pipe”
CXXFLAGS=”-march=core2 -O2 -pipe”
# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
# cp -L /etc/resolv.conf /mnt/gentoo/etc/
# mount -t proc none /mnt/gentoo/proc # mount -o bind /dev /mnt/gentoo/dev
# chroot /mnt/gentoo /bin/bash # env-update >> Regenerating /etc/ld.so.cache... # source /etc/profile # export PS1="(chroot) $PS1"
# emerge --sync# eselect profile list# eselect profile set 6 (no-multilib)
# nano -w /etc/make.conf
# nano -w /etc/locale.gen
zh_CN.GBK GBK
zh_CN GB2312
zh_CN.GB18030 GB18030
zh_CN.UTF-8 UTF-8#
locale-gen
# cp /usr/share/zoneinfo/Asia/Chongqing /etc/localtime
# emerge gentoo-sources//genkernel
# emerge genkernel
# zcat /proc/config.gz > /usr/share/genkernel/arch/x86_64/kernel-config
# genkernel all
#ls /boot/kernel* /boot/initramfs*
the rest just using gentoo doc