红联Linux门户
Linux帮助

搞定gentoo Linux的上网和字体问题

发布时间:2007-08-29 19:44:06来源:红联作者:albume
折腾了一天的gentoo,终于把家里的gentoo搞定了。本来不想折腾,想装ubuntu,可惜ubuntu那张光盘不争气。在执行到分区工具时,内存就只剩不到1M(总共才256M)。大概是怕内存用完,这时跳出来一个swapout进程,于是一转眼,安装进程就死掉了,不知道是被kill掉还是被swap掉了。

于是重任就落在gentoo,这个最折腾人的发行版上。由于选择了无网络安装,安装无事。

接下去要上网了,却发现没有adsl-start之类的命令。由于家里用的是adsl,给我平添了不少麻烦。没有网络,想emerge一个都不行。好在我我万能的gentoo liveCD。该CD里几乎什么命令都有。于是运行:

adsl-setup
Welcome to the Roaring Penguin ADSL client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly...

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default nbda2079960):

INTERFACE

>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth1):

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter 'no' (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no):

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide DNS addresses',
enter 'server' (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here: server

PASSWORD

>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose 'NONE' and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 - NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2): 0

** Summary of what you entered **

Ethernet Interface: eth1
User name: nbda2079960
Activate-on-demand: No
DNS addresses: Supplied by ISP's server
Firewalling: NONE

然后保存配置。运行adsl-start,出其顺利。然后chroot到硬盘上的gentoo系统。

mount /dev/hda8 /mnt/gentoo
mount /dev/hda9 /mnt/gentoo/home
mount -t proc none /mnt/gentoo/proc
chroot /mnt/gentoo/ /bin/bash
env-update
source /etc/profile

然后编辑/etc/make.conf,加上
GENTOO_MIRRORS="ftp://ftp3.tsinghua.edu.cn/mirror/gentoo"
SYNC="rsync://ftp3.tsinghua.edu.cn/gentoo/gentoo-portage"
RSYNC_TIMEOUT="600"

推荐清华的镜像,速度很快,能达到100多k/s。趁能上网,赶紧把要用的软件统统装好。

emerge --sync
emerge fcitx qterm
emerge arphicfonts (不错的开源中文字体。)
emerge rp-pppoe (最重要的包,上网可全靠它了)
emerge ppp
emerge gnome-ppp(万一文本界面搞不定,上图形界面)

发现硬盘系统里没有adsl-start等脚本,干脆直接把这些脚本从光盘拷贝到硬盘对应目录。然而还是上不了网,ifconfig一下,发现是由于系统找不到网卡。

lsmod了一下liveCD和硬盘的模块。发现还要插入8139too这个模块。modprobe 8139too

再次运行adsl-setup,还是失败。经研究,发现输入密码时不小心输入了非ASCII码。如F1之类的按键。导致密码错误。终于成功上网。

下一步是把locale改成中文。诡异的是,单纯改环境变量,只能部分地中文化。输入法仍然不能用。请教了solaris大牛,才知道2006.1要用户手动生成locale.

在/etc/locale.gen中,加入这几行常用的locale
en_US ISO-8859-1
en_US.UTF-8 UTF-8
zh_CN GB18030
zh_CN.GB2312 GB2312
zh_CN.UTF-8 UTF-8

然后运行locale-gen生成对应locale

运行
locale -a

可查看系统支持的locale
C
en_US
en_US.utf8
POSIX
zh_CN
zh_CN.gb2312
zh_CN.utf8

最后是刷新率问题。运行xrandr,发现刷新率为76HZ,107F4显示器具体技术参数

扫描 水平扫描频率 30-71KHz,垂直扫描频率50-160Hz

于是修改/etc/X11/xorg.conf中对应水平扫描频率和垂直扫描频率。最后成功把分辨率调整到85HZ。

我现在可以骄傲地说,我没用盗版软件。
文章评论

共有 1 条评论

  1. beyondfly 于 2007-09-21 00:58:16发表:

    字体哪里搞定了???