環境構築の前段階として、/etc/make.confの設定を行う。

# nano -w /mnt/gentoo/etc/make.conf

まずはCFLAGSとCHOST、MAKEOPTSを記述。以下はこのサーバの場合。

CFLAGS="-O2 -march=prescott -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
CHOST="i686-pc-linux-gnu"

MAKEOPTS="-j3"

/etc/make.confを保存したら、GENTOO_MIRRORS変数を設定するためmirrorselectを使用する。

# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf

さらに、同じくmirrorselectを使ってrsyncミラーを選択する。

# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

これで/etc/make.confの編集はひとまず終了。既に方針があるならUSEフラグも記述しておく。

今度は、LiveCDで行ったネットワーク設定(/etc/resolv.conf)をHDDにコピーする。

# cp -L /etc/resolv.conf /mnt/gentoo/etc/

chrootのため、/procと/devをマウント。

# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev

これでchrootの準備は完了。chrootして環境を更新する。

# chroot /mnt/gentoo /bin/bash
# env-update
>> Regenerating /etc/ld.so.cache...
# source /etc/profile