来源:
http://www.funtoo.org/wiki/Funtoo_Linux_Installation
http://www.funtoo.org/wiki/Installation_(Tutorial)
一.安装前准备
下载启动镜像SystemRescueCd:
http://sourceforge.net/projects/systemrescuecd/
下载SSH软件Putty , 使用SSH安装的好处是所有命令都可以复制粘贴..不用一个一个字母敲,很方便:
CTRL+C 复制 在PUTTY上鼠标右键粘贴
http://www.mycodes.net/130/681.htm
根据自己CPU的类型下载Stage3-latest
http://ftp.heanet.ie/mirrors/funtoo/funtoo-current/x86-64bit/
下载Portage
http://ftp.heanet.ie/mirrors/funtoo/funtoo-current/snapshots/
用镜像启动虚拟机
设置SSH密码
#passwd
查看IP
#ifconfig eth0
启动PUTTY,在主机名称里填入IP,用root登录
分区:
#cfdisk /dev/sda
我的虚拟机只分了30G
sda1为boot分区,100M,sda2为交换分区,2G,其他为根分区
#lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 30G 0 disk
├─sda1 8:1 0 94.1M 0 part
├─sda2 8:2 0 1.9G 0 part
└─sda3 8:3 0 28G 0 part
sr0 11:0 1 386M 0 rom /livemnt/boot
loop0 7:0 0 291.2M 1 loop /livemnt/squashfs
创建文件系统
#mkfs.ext2 /dev/sda1
#mkfs.ext4 /dev/sda3
#mkswap /dev/sda2
#swapon /dev/sda2
#mkdir /mnt/funtoo
挂载分区
#mount /dev/sda3 /mnt/funtoo
#mkdir /mnt/funtoo/boot
#mount /dev/sda1 /mnt/funtoo/boot
#cd /mnt/funtoo
二.开始安装
将刚才下载好的stage3-latest.tar.xz和portage-latest.tar.xz复制到PUTTY的目录
启动PUTTY的另一个工具:psftp
输入:
open root@IP
cd /mnt/funtoo
用PUT命令将stage3和portage上传到/mnt/funtoo目录下
put stage3-latest.tar.xz
put portage-latest.tar.xz
切换回putty
#tar xvJpf stage3-latest.tar.xz
chroot进新系统
# mount -t proc none /mnt/funtoo/proc
# mount --rbind /sys /mnt/funtoo/sys
# mount --rbind /dev /mnt/funtoo/dev
#cp -L /etc/resolv.conf /mnt/funtoo/etc
#env -i HOME=/root TERM=$TERM chroot . bash -l
#source /etc/profile
#export PS1="(chroot) $PS1"
安装portage
#cd /usr
#tar xvJf ../portage-latest.tar.xz
#cd /usr/portage/
#git checkout funtoo.org
同步portage
#emerge --sync
选择profile
#eselect profile list
下面是我设置的profile,仅供参考
先清空列表
#eselect profile clean
#eselect profile add 2 4 8 10 11 15 17 22 24
看看结果:
# eselect profile list
Currently available arch profiles:
[1] funtoo/1.0/linux-gnu/arch/x86-64bit
[2] funtoo/1.0/linux-gnu/arch/x86-64bit/no-multilib *
Currently available build profiles:
[3] funtoo/1.0/linux-gnu/build/stable
[4] funtoo/1.0/linux-gnu/build/current *
[5] funtoo/1.0/linux-gnu/build/experimental
Currently available flavor profiles:
[6] funtoo/1.0/linux-gnu/flavor/minimal
[7] funtoo/1.0/linux-gnu/flavor/core
[8] funtoo/1.0/linux-gnu/flavor/desktop *
[9] funtoo/1.0/linux-gnu/flavor/workstation
Currently available mix-ins profiles:
[10] funtoo/1.0/linux-gnu/mix-ins/audio *
[11] funtoo/1.0/linux-gnu/mix-ins/console-extras *
[12] funtoo/1.0/linux-gnu/mix-ins/dvd *
[13] funtoo/1.0/linux-gnu/mix-ins/gnome
[14] funtoo/1.0/linux-gnu/mix-ins/kde
[15] funtoo/1.0/linux-gnu/mix-ins/media *
[16] funtoo/1.0/linux-gnu/mix-ins/print
[17] funtoo/1.0/linux-gnu/mix-ins/python3-only *
[18] funtoo/1.0/linux-gnu/mix-ins/rhel5-compat
[19] funtoo/1.0/linux-gnu/mix-ins/server-db
[20] funtoo/1.0/linux-gnu/mix-ins/server-mail
[21] funtoo/1.0/linux-gnu/mix-ins/server-web
[22] funtoo/1.0/linux-gnu/mix-ins/X *
[23] funtoo/1.0/linux-gnu/mix-ins/xfce
[24] funtoo/1.0/linux-gnu/mix-ins/vmware-guest *
编辑/etc/make.conf
#nano /etc/make.conf
这是我的make.conf , 仅供参考
CFLAGS="-march=native -O2 -pipe -fforce-addr"
CXXFLAGS="${CFLAGS} -fpermissive -fomit-frame-pointer"
ACCEPT_KEYWORDS="~amd64"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="--quiet -j3"
LINGUAS="zh_CN"
FEATURES="mini-manifest ccache parallel-fetch"
INPUT_DEVICES="evdev"
VIDEO_CARDS="vesa vmware"
ALSA_CARDS="ens1371"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"
AUTOCLEAN="yes"
SYNC="git://github.com/funtoo/ports-2012.git"
GENTOO_MIRRORS="http://mirrors.163.com/gentoo/ http://mirrors.sohu.com/gentoo/"
USE="-hal -ipv6 -cups -gnome -kde -kdeenablefinal -qt3 \
acpi bash-completion cjk consolekit hardened python threads userlocales"
修改fstab
#nano /etc/fstab
/dev/sda1 /boot ext2 noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext4 noatime 0 1
设置主机名
#nano /etc/conf.d/hostname
hostname="主机名"
设置时钟
#nano /etc/conf.d/hwclock
注释掉UTC,加上下面一行
#clock="UTC"
clock="local"
!!!!!!注意:用date命令查看时钟,如果时间不对,必须要修改成正确时间
命令格式:date 月日时分年
安装内核
#emerge ccache