|
来自linuxeden的ayiiq180
http://www.linuxeden.com/forum/showthread.php?t=120753
不说废话,直接进入正文。
1. 由于我的网络速度很快,所以直接网络安装,下载了install-x86-minimal-2005.0.iso和最新的portage以及适合我机器的 stage3。把portage和stage3放到installCD中,然后用这个CD启动(我用的是vmware,所以直接挂载到虚拟的光驱上就ok 了)。
1. 启动后开始分区,我使用cfdisk,比较直观,分出一个/,一个swap即可。然后:
<example>
mkreiserfs /dev/hda1
mkswap /dev/hda5
swapon /dev/hda5
mount /dev/hda1 /mnt/gentoo
</example>
1. 设置网络
<example>net-setup eth0</example>
直接选择dhcp,修改一下/etc/resolv.conf,加上nameserver 211.97.64.129
1. 把stage3解压到/mnt/gentoo下,portage解压到/mnt/usr下
<example>
tar zxf stage3.tar.gz -C /mnt/gentoo/
tar zxf portage.tar.gz -C /mnt/gentoo/usr/
</example>
设置编译参数:
<example>
nano -w /mnt/gentoo/etc/make.conf
修改成为:
CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"
USE="cjk nls nptl nptlonly"
ACCEPT_KEYWORDS="~x86"
GENTOO_MIRRORS="http://mirror.gentoo.gr.jp ftp://linux.ntcu.net/dists/gentoo/"
</example>
1. 拷贝DNS信息到Gentoo系统中
<example>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</example>
1. 挂载/proc,这样chroot后也可以使用
mount -t proc none /mnt/gentoo/proc
1. Chroot到新系统中
<example>
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
</example>
以后的安装过程可以在任意地方中断并退出系统,再次chroot时只要执行以上命令即可。
1. 更新portage tree
<example>emerge sync</example>
1. 设定时区
<example>
ln -sf /usr/share/zoneinfo/PRC /etc/localtime
</example>
但这时时区仍然时UTC的,需要修改/etc/rc.conf
<example>
CLOCK="local"
date MMDDhhmmCCYY
hwclock --systohc
</example>
1. 内核设置
<example>
emerge gentoo-sources
cd /usr/src/linux
make menuconfig
make && make moudules_install
cp arch/i386/bzImage /boot/kernel-2.6.11
cp System.map /boot/.
</example>
这里编译的时候露了pcnet32的模块,也就是vmware的虚拟网卡的模块,后来就
<example>
make menuconfig选择了pcnet32模块
make modules
make moudules_install
然后在/etc/modules.autoload.d中加了pcnet32的模块名即可
</example>
1. 配置/etc/fstab文件如下:
<example>
/dev/hda1 / resierfs noatime 0 0
/dev/hda5 none swap sw 0 0
/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
</example>
1 .修改网络设置
由于我使用了dhcp,所以设置/etc/conf.d/net,把ifce_eth0="dhcp"前面的#去掉,并注释掉设置ip的行,然后
<example>
emerge dhcpcd
rc-update add net.eth0 default
</example>
1. 安装一些工具
<example>
emerge reiserfsprogs
emerge syslog-ng
rc-update add syslog-ng default
emerge coldplug && rc-update add coldplug default
emerge hotplug && rc-update add hotplug default
emerge udev
</example>
1. 安装grub,设置splash
<example>
emerge splashutils
emerge grub
splash_geninitramfs -v -g /boot/splash-800x600 -r 800x600 gentoo
rc-update add splash default
</example>
配置grub如下:
<example>
default 0
timeout 10
#######
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
#######
title Gentoo 2005.0
root(hd0,0)
kernel /boot/kernel-2.6.11 or root=/dev/hda1 video=vesafb:ywrap,pmipal,800x600-32@85 splash=silent,theme:gentoo
initrd=/boot/splash-800x600
</example>
搞定,重启,后面就是安装自己需要的东东了。**附:内核配置**
<example>
Code maturity level options ---> Prompt for development and/or incomplete code/drivers //这个需要选,也是splash必须的.
Procressor type and features ---> MTRR (Memory Type Range Register)support //这个需要选,也是splash必须的。
Device Drivers ---> Block Devices --->
<*>Loopback device support 这个也要选,splash需要的 RAM disk support splash必须的 Initial RAM disk (initrd) support
Device Drivers ---> SCSI device support --->
<*> SCSI generic support 这个需要,USB设备模拟scsi硬盘的.
<*> SCSI disk support
---> SCSI low-level drivers --->
<*>BusLogic SCSI Support
Device Drivers ---> Graphics support ---> Support for frame buffer devices VESA VGA graphics support 这个注意,下面的drivers type 要设置成(vesafb-tng),Support for the Framebuffer splash //2.6.xx的内核有这个选项才证明已经打了bootsplash补丁.
---> Console display driver support --->
--- VGA text console Video mode selection support
<*>Framebuffer Console support //splash需要
想在X下用鼠标,需要加入下面的选项
Input device support---> Provide legacy /dev/psaux device
Input device support---> MICE
<*> S/2 mouse
USB Support-->
<*>Support for Host-side USB
<*>EHCI HCD (USB2.0)Support
<*>EHCI HCD(moust inter and via) SupportUSB Mass Storage Support
<*> USB Human Interface (FULL HID) Devices
File System--><*>Resierfs support //用这个文件系统内核里可别忘了编译进去
File System--> seudo FileSystems-->
<*>/Proc File system support //这个不选出大事了.
<*>/dev File system support //这个不选splash进度条不动Virtual memary File system support //这个也是splash 必须有的.
</example> |
|