Debian 5.0.1 xfce4.2 安装经验
-----------------------------
动机:
以前用过一段时间Debian,由于其配置比较麻烦,所以挜来一般是用ubuntu的,因为它对硬件的兼容性、用户体验都比较不错,但由于本本内存不是太大,用了一段时候的xubuntu,发现越来越慢,而且启动xfce4的速度真是让人受不了,一般都在2-5分钟之间,有人说ubuntu= debian+ bug,呵呵,个人认为如果是新手的话,那ubuntu一定是最适合你的,但如果你比较熟悉linux了,那Debian是一个不错的,又考虑到ubuntu的效率问题的话,有人对Xubuntu 9.04 vs Debian 5.0.1 Xfce做过比较,在效率上面可以ubuntu比不上Debian。
本本配置:
hp6530b
CPU: P8400
显卡: X4500 GMA
网卡: WiFi link 5100AGN
硬盘: SATA 160G
-----------------------------
安装Debian的版本是:debian-501-amd64-xfce+lxde-CD-1.iso,这个你可以从www.debian.org上下载,我装的是testing版本,因为考虑到显卡和网卡的问题,这个版本相对来说驱动比较新一点。
下面说一下安装过程中遇到的问题,因为debian的安装流程官网和google上都有很多,对了,我是从光盘安装的,比较方便。
1. 更新sources.list源,这个网上有很多,你也可以用apt-spy来查最快的源,加入到sources.list中,具体apt-spy的用法google一下吧。更新好以后
sudo apt-get update
sudo apt-get upgrade
这时候一些最新的驱动都会网上去,如果你的内核还是2.6.26的话,你可以用sudo apt-caceh search linux-kernel来查找一下最新的内核,现在最新内核是2.6.30-1-amd64,你可以用sudo apt-get install ... 来进行安装,装好后重新启动加载一下内核就可以了。
2. 配置你的locale 执行 dpkg-reconfigure locales 选择你要用的locale,比如我选择了 en_US.UTF-8 zh_CN.GB2312 zh_CN.UTF-8 zh_CN.GB18030 zh_CN.GBK ,回车,选择你的系统默认locale 我选择的en_US.UTF-8 因为我觉得linux控制台没必要用中文,还要装个ZHCON,麻烦。
3. 无线网卡驱动的问题
当你的内核升到2.6.30后,应该是自带最新的驱动的,如果你还不能用无线网卡,用lshw -C network看一下无线网卡是否已经配置好,是没有打开还是驱动没有装好,如果是驱动没有装好,你可以到http://intellinuxwireless.org/下最新的Intel无线网卡驱动,如果驱动已经装好,只是无线网卡没有switch on ,那可以用sudo ifconfig wlan0 up来打来,对了,lshw这个命令要去下个安装包装一下的,google一下吧,源里面好像没有,你也可以用iwlist命令进行查看,hp6530b的无线网卡配置了我二天,找了很多方法啊。
下面是找到的一些别人碰到的问题的解决方法
http://forums11.itrc.hp.com/service/forums/bizsupport/questionanswer.do?admit=109447626+1253685021245+28353475&threadId=1248210
http://wiki.debian.org/iwlagn
http://www.linuxquestions.org/questions/linux-newbie-8/getting-the-internal-wireless-card-on-hp-6530b-laptop-to-work-on-debian-2.6.24.4-688958/
http://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/hp-elitebook-6930p-wireless-switch-not-working-694419/
4. 显卡驱动的问题
在网装好的时候,你的分辨是不能调的,你要更新一下xserver-xorg-video-intel到2.8.1后才能调整,这个在第1条做完后就可以调整了,但是我碰到一个问题是亮度不能用FnF9和FnF10来调整,找到了一个方法如下:
Screen Brightness
The brightness problem isn't solved yet (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/284319), but creating a file /usr/share/hal/fdi/information/20thirdparty/30-keymap-private.fdi with the following content enabled the Fn F9/F10 keys:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="@input.originating_device:info.linux.driver" string="atkbd">
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.vendor" prefix="Hewlett-Packard">
<match key="/org/freedesktop/Hal/devices/computer:system.hardware.product" contains="6930p">
<!-- HP Compaq 6930p -->
<append key="input.keymap.data" type="strlist">e012:brightnessdown</append> <!-- FnF9 (brightness down) -->
<append key="input.keymap.data" type="strlist">e017:brightnessup</append> <!-- FnF10 (brightness up) -->
</match>
</match>
</match>
</device>
</deviceinfo>
When you have this file, you'll see the OSD when you press Fn F9/F10. After issuing the following command, these keys will actually work:
xrandr --output LVDS --set BACKLIGHT_CONTROL nativeThis helps if you boot with A/C power. If you boot on battery, the display will remain dimmed until you reboot with A/C power.
------------------------------------
但好像也不行,后来装了一个小软件就行了
sudo apt-get install xbacklight
xrandr --output LVDS --set BACKLIGHT_CONTROL native
xbacklight -dec 10 # to Up brightness by 10
xbacklight -inc 10 # to Down brightness by 10
这个每次启动的时候都要用命令配置一下,比较麻烦,如果哪位朋友找到解决的办法就通知我下,多谢了。
5. 声卡驱动的问题
对于声卡驱动的话你安装了最新的alsa都会ok的,如果没有装你可以:
apt-get install alsa-base alsa-utils
运行 alsaconf 一路回车。
再运行alsa-mixer 设置音量,M键取消静音,ESC 键退出。
再运行 alsactl store
下载一首歌或者用 cat /dev/urandom > /dev/dsp 你就可以听到声音了。:-)
另外,你也可以从http://www.alsa-project.org/main/index.php/Main_Page来下载最新的声卡驱动,记得hp6530的模块叫是snd-hda-intel。
6. 系统的备份
这个是网上找的
Howto: Backup and restore your system!
Hi, and welcome to the Heliode guide to successful backing-up and restoring of a Linux system!
Most of you have probably used Windows before you started using Ubuntu. During that time you might have needed to backup and restore your system. For Windows you would need proprietary software for which you would have to reboot your machine and boot into a special environment in which you could perform the backing-up/restoring (programs like Norton Ghost).
During that time you might have wondered why it wasn't possible to just add the whole c:/ to a big zip-file. This is impossible because in Windows, there are lots of files you can't copy or overwrite while they are being used, and therefore you needed specialized software to handle this.
Well, I'm here to tell you that those things, just like rebooting, are Windows CrazyThings (tm). There's no need to use programs like Ghost to create backups of your Ubuntu system (or any Linux system, for that matter). In fact; using Ghost might be a very bad idea if you are using anything but ext2. Ext3, the default Ubuntu partition, is seen by Ghost as a damaged ext2 partition and does a very good job at screwing up your data.
1: Backing-up
"What should I use to backup my system then?" might you ask. Easy; the same thing you use to backup/compress everything else; TAR. Unlike Windows, Linux doesn't restrict root access to anything, so you can just throw every single file on a partition in a TAR file!
To do this, become root with
Code:
sudo su
and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)
Code:
cd /
Now, below is the full command I would use to make a backup of my system:
Code:
tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /
Now, lets explain this a little bit.
The 'tar' part is, obviously, the program we're going to use.
'cvpfz' are the options we give to tar, like 'create archive' (obviously),
'preserve permissions'(to keep the same permissions on everything the same), and 'gzip' to keep the size down.
Next, the name the archive is going to get. backup.tgz in our example.
Next comes the root of the directory we want to backup. Since we want to backup everything; /
Now come the directories we want to exclude. We don't want to backup everything since some dirs aren't very useful to include. Also make sure you don't include the file itself, or else you'll get weird results.
You might also not want to include the /mnt folder if you have other partitions mounted there or you'll end up backing those up too. Also make sure you don't have anything mounted in /media (i.e. don't have any cd's or removable media mounted). Either that or exclude /media.
EDIT : kvidell suggests below we also exclude the /dev directory. I have other evidence that says it is very unwise to do so though.
Well, if the command agrees with you, hit enter (or return, whatever) and sit back&relax. This might take a while.
Afterwards you'll have a file called backup.tgz in the root of your filessytem, which is probably pretty large. Now you can burn it to DVD or move it to another machine, whatever you like!
EDIT2:
At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something, but in most cases you can just ignore that.
Alternatively, you can use Bzip2 to compress your backup. This means higher compression but lower speed. If compression is important to you, just substitute
the 'z' in the command with 'j', and give the backup the right extension.
That would make the command look like this:
Code:
tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /
2: Restoring
Warning: Please, for goodness sake, be careful here. If you don't understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!
Well, we'll just continue with our example from the previous chapter; the file backup.tgz in the root of the partition.
Once again, make sure you are root and that you and the backup file are in the root of the filesystem.
One of the beautiful things of Linux is that This'll work even on a running system; no need to screw around with boot-cd's or anything. Of course, if you've rendered your system unbootable you might have no choice but to use a live-cd, but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I'm not giving you that command though!
Well, back on-topic.
This is the command that I would use:
Code:
tar xvpfz backup.tgz -C /
Or if you used bz2;
Code:
tar xvpfj backup.tar.bz2 -C /
WARNING: this will overwrite every single file on your partition with the one in the archive!
Just hit enter/return/your brother/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure that, before you do anything else, you re-create the directories you excluded:
Code:
mkdir proc
mkdir lost+found
mkdir mnt
mkdir sys
etc...
And when you reboot, everything should be the way it was when you made the backup!
2.1: GRUB restore
Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say, install Windows), You'll also need to reinstall GRUB.
There are several very good howto's on how to do that here on this forum, so i'm not going to reinvent the wheel. Instead, take a look here:
http://www.ubuntuforums.org/showthre...t=grub+restore
There are a couple of methods proposed. I personally recommend the second one, posted by remmelt, since that has always worked for me.
7. 常用软件的安装
如果你想用ubuntu中的新立得来装软件的话,可以装一个synaptic,用sudo apt-get install synaptic,一些linux中常用的软件你可以去linux论坛上找一下。
当然了还有一些如g++,gcc等开发工具你也可以通过新立得来安装,如果新立得中没有就去下源代码安装吧。
对了,如果你发展你在升级到grub2以后启动出错,你可以用安装盘到rescue模式进行grub的重新安装,可以是因为grub2还有bug吧。
呵呵,祝使用快乐。