现在的位置: 首页 > 综合 > 正文

Gentoo安装笔记(part4)

2013年10月13日 ⁄ 综合 ⁄ 共 1127字 ⁄ 字号 评论关闭

此安装笔记是按照gentoo中文手册上实际操作记下来的,使用的是宿主机Ubuntu9.04+Virtualbox3.04,在Virtualbox3.04中按默认属性建立了一个Gentoo虚拟机。使用gentoo-minimal映像文件安装。

----------------------------------------------------------------------------------------------------------------------------------------------------------

查看可用的USE标记
#less /usr/portage/profiles/use.desc
第二步:修改USE
切换到gentoo后,默认是没有vi可用的。
#nano /etc/make.conf
USE="-gtk -gnome qt3 qt4 kde dvd alsa cdr"
第三步:设置glibc,locales
#nano /etc/locale.gen
取消你想要语言前的注释(#)即可
    6)配置内核
第一:设置时区
#cp /usr/share/zoneinfo/GMT /etc/localtime
第二:下载内核
#emerge gentoo-sources    这个就是针对x86架构的内核
可以看到选择的是sys-kernel/gentoo-sources-2.6.30-r4(好新!)emerge会到我们设置的GENTOO_MIRRORS站点去下载。
#ls /usr/src    可以看到你刚才下载的内核,以及一个链接文件linux
第三步:配置内核
a)使用genkernel生成一个通用的内核,但是这不是我们想要的,我们需要一个优化的内核
b)手动配置
#cd /usr/src/linux
#make menuconfig
#make && make modules_install
大约20分钟后,编译完成,会提示
Kernel:arch/x86/boot/bzImage is ready (#1)
大小大约3.6M
$cp arch/x86/boot/bzImage /boot/Gentoo-2.6.30-r4-ownfirst。
第四步:配置内核模块
#find /lib/modules -type f -iname "*.o" -or -iname "*.ko" |less
上面命令查看可用的模块。将要自动加载的模块名称写入
/etc/modules.autoload.d/kernel-2.6文件中。略去后最名和路径,例如,要自动加载模块/lib/modules/2.6.30-gentoo-r4/kernel/fs/ntfs/ntfs.ko则加入一行ntfs即可。

抱歉!评论已关闭.