IBM R40e 笔记本上安装Gentoo.2007 Linux系统。
因为Gentoo中配置xorg.conf比较复杂,最好将Fedora系统中的xorg.conf文件备份下来直接用。
系统安装参考文档:
Gentoo Linux x86 Quick Install Guide
Gentoo Installer CD 启动系统,然后查看硬件设备列表。
# lspci 00:00.0 Host bridge: ATI Technologies Inc RS200/RS200M AGP Bridge [IGP 340M] (rev 02) 00:01.0 PCI bridge: ATI Technologies Inc PCI Bridge [IGP 340M] 00:02.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03) 00:04.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02) 00:06.0 Bridge: ALi Corporation M7101 Power Management Controller [PMU] 00:07.0 ISA bridge: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+] 00:0b.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5901 100Base-TX (rev 01) 00:0c.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller 00:0f.0 IDE interface: ALi Corporation M5229 IDE (rev c4) 01:05.0 VGA compatible controller: ATI Technologies Inc Radeon IGP 330M/340M/350M
只安装KDE,使用USE参数如下:
# These settings were set by the catalyst build script that automatically # built this stage. # Please consult /etc/make.conf.example for a more detailed example. CFLAGS="-O2 -mtune=i686 -pipe" CXXFLAGS="${CFLAGS}" FEATURES="i686-pc-linux-gnu parallel-fetch ccache distcc" # This should not be changed unless you know exactly what you are doing. You # should probably be using a different stage, instead. CHOST="i686-pc-linux-gnu" GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo/" MAKEOPTS="-j4" http_proxy="http://10.62.120.200:4128" ftp_proxy="http://10.62.120.200:4128" #Gnome USE="gtk alsa -oss -arts crypt truetype freetype" #KDE USE="$USE qt4 kde qt3 immqt-bc" #Programe USE="$USE java python gcj xml postgres -mysql X509" #video USE="$USE X opengl fbcon dga directfb dri aiglx" #SYS USE="$USE cups sysfs hal dbus nptl nptlonly pnp threads pthreads bash-completion fuse lm_sensors" #INERNATIONALIZATION USE="$USE nls unicode cjk zh_TW utf8" #Net USE="$USE imap ldap net network nntp dhcp socks5 samba ssl stroke -ipv6" #Php USE="$USE apache2 bzip2 iconv" #Media USE="$USE win32codecs xvid real dvd aac flac ffmpeg imagemagick x264 mp4" #CPU USE="$USE fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse \ sse2 tm pbe up est tm2" #Other USE="$USE -cdr -dvdr" VIDEO_CARDS="fglrx" INPUT_DEVICES="keyboard mouse" ALSA_TOOLS="intel8x0"
内核中必须包括以下选项:
一、主板芯片
Device Drivers ---> <*> ATA/ATAPI/MFM/RLL support ---> <*> ALI M15x3 chipset support
二、温度检测
Device Drivers ---> <*> Hardware Monitoring support --->
三、网卡
[*] Network device support ---> [*] Netdevice multiple hardware queue support [*] Ethernet (10 or 100Mbit) ---> [*] EISA, VLB, PCI and on board controllers <*> Broadcom 4400 ethernet support <*> Intel(R) PRO/100+ support [*] Ethernet (1000 Mbit) --->
四、声卡
将声卡直接添加到内核时,ALSA工具无法正常运行,编译成模块后问题解决。
Device Drivers ---> <M> Sound card support <M> Advanced Linux Sound Architecture PCI devices ---> <M> ALi M5451 PCI Audio Controller <M> Intel/SiS/nVidia/AMD/ALi AC97 Controller <M> Intel/SiS/nVidia/AMD MC97 Modem
三、文件系统
File Systems --> DOS/FAT/NT Filesystems ---> <*> NTFS file system support [ ] NTFS debugging support (NEW) [*] NTFS write support Network File Systems ---> <*> CIFS support (advanced network filesystem for Samba, Window and other CIFS Native Language Support --> (utf8) Default NLS Option <*> NLS UTF8
四、Frame Buffer
Device Drivers > Graphics support: > <*> Support for frame buffer devices [ ] Enable Tile Blitting Support <*> VESA VGA graphics support VESA driver type (vesafb-tng) ---> (HRESxVRES@FREQ) VESA default mode < > nVidia Framebuffer Support < > nVidia Riva support < > Matrox acceleration Console display driver support ---> [*] Video mode selection support <*> Framebuffer Console support [*] Support for the Framebuffer Console Decorations
ALSA可以自动检测声卡类型,并安装相应驱动程序。
emerge alsa-utils rc-update add alsasound boot alsa-config
Gentoo用emerge工具来关系包。安装eix可以缓存
Emerge修改USE标签后,查看那些包需要重新编译
emerge -uDN world -pv --newuse (-N) --update (-u) --deep (-D)
指定包的版本号时,要加上等号(=)。
emerge =x11-libs/qt-3.3.4-r8 -pv
/etc/profile.env 这里也有环境变量
添加别名
echo "alias ll='ls -l'" >> /etc/bash/bashrc
安装并启动dbus和hald这两个包
emerge dbus hal rc-update add dbus default rc-update add hald default
然后将用户添加到plugdev组中
gpasswd -a pcnsh074 plugdev
指定GRUB启动画面的背景图片,然后设置Frame Buffer分辨率为1024×768。编辑grub.conf如下:
splashimage=(hd0,5)/grub/splash.xpm.gz kernel /boot/kernel-2.6.23-r8 root=/dev/hda7 vga=792
使用KDE作为桌面,参考以下文档:
The X Server Configuration HOWTO
Emerge安装kde-meta, xdm和kdm包,编辑/etc/conf.d/xdm文件,修改:
DISPLAYMANAGER="kdm"
然后将xdm设置为默认
rc-update add xdm default
通过X11服务器,可以将远程主机的X程序DISPLAY到本机。为了安全,默认设置不允许X服务器监听网络。
对于KDE,编辑/usr/kde/3.5/share/config/kdm/kdmrc
对于Gnome,运行gdmsetup命令,打开Security属性页,去掉”Deny TCP connections to Xserver”复选框,重新启动gdm后生效。
也可以直接编辑配置文件/etc/X11/gdm/custom.conf,在[security]段中添加:
DisallowTCP=false
sshd X11Forwarding yes
PCI工具(lspci): pciutils
PDF工具:acroread, acroread-asianfonts
dig等工具:bind-tools
Stardict
app-dicts/stardict-cdict-en-zh-gb ~* >> /etc/portage/package.keywords emerge stardict emerge stardict-cdict-en-zh-gb
Vim设置为默认编辑器
echo EDITOR=/usr/bin/vim >> /etc/env.d/99local env-update
启用PHP支持 APACHE2_OPTS=”-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5 -D PHP4”
UTF-8
dos charset = 1255 display charset = utf-8 unix charset = utf-8
安装nfs-utils包并启动portmap服务。
emerge nfs-utils rc-update add portmap default /etc/init.d/portmap start
自动挂载目录
emerge autofs rc-update add autofs default /etc/init.d/autofs start
安装参考文档:http://gentoo-wiki.com/HOWTO:_VirtualBox
在Virtual Box中添加vbox0接口
VBoxAddIF vbox0 pcnsh074
如果报-3100 (VERR_HOSTIF_INIT_FAILED)错误,可能是用户没有权限访问接口,更改vbox0权限后再试试。
tunctl -t vbox0 -u pcnsh074
还有可能是tun设备没有权限访问,检查/dev/net/tun设备权限是否是0666,如果不是,在/etc/udev/rules.d/10-local.rules文件中修改创建设备时的默认权限。
KERNEL=="tun", NAME="net/%k", GROUP="tuntap", MODE="0660", OPTIONS+="ignore_remove"
每次内核更新后,必须重新安装virtualbox-modules包:
emerge -av virtualbox-modules
检查被破坏的二进制
revdep-rebuild
将整个系统按照当前的USE重新编译。
emerge -e world
Perl和Python升级后执行
perl-cleaner all python-updater
Comments
There are currently no comments
New Comment