在Vmware上安装FUNTOO简易安装手册

来源:

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"


#echo "Asia/Shanghai" > /etc/timezone
#ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime


!!!!!!注意:用date命令查看时钟,如果时间不对,必须要修改成正确时间

命令格式:date 月日时分年


设置locale
#echo "zh_CN.UTF-8 UTF-8" >> /etc/locale.gen
#echo "LANG=\"en_US.UTF-8\"" > /etc/env.d/02locales

#locale-gen
 * Generating 2 locales (this might take a while) with 1 jobs
 *  (1/2) Generating en_US.UTF-8 ... [ ok ]
 *  (2/2) Generating zh_CN.UTF-8 ... [ ok ]
 * Generation complete

#env-update && source /etc/profile


安装内核

#emerge ccache

#emerge -av gentoo-sources
#cd /usr/src/linux
配置内核

编译内核
#make && make modules_install

#cp arch/x86_64/boot/bzImage /boot/kernel-3.8.2-gentoo

安装GRUB2:
#emerge -avt boot-update
#nano /etc/boot.conf
boot {
        generate grub
        default "Funtoo Linux"
        timeout 3
}
display {
        gfxmode 1440x900
}

default {
        scan /boot
        params video=vesafb root=auto rootfstype=auto
}

"Funtoo Linux" {
        kernel kernel[-v]
}


#grub-install --no-floppy /dev/sda
Installation finished. No error reported.

#boot-update

安装日志工具
#emerge -av syslog-ng
#rc-update add syslog-ng default
DHCP , 网卡
#rc-update add dhcpcd default


设置root密码
#passwd

#useradd -m -G audio,cdrom,cdrw,floppy,usb,users,video,wheel -s /bin/bash<user_name>
#passwd<user_name>

重启
#exit
#cd
#umount -l /mnt/funtoo/dev{/shm,/pts,}
#umount -l /mnt/funtoo{/boot,/proc,/sys,}
#reboot

转载于:https://my.oschina.net/u/1023866/blog/119396

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值