Ubuntu 6.06,硬盤安裝,簡單優化,ati驅動及xgl安裝全過程記錄

1.下載安裝盤鏡像文件
下載ubuntu-6.06-alternate-i386.iso(我沒用desktop cd,因爲教育網內不能直連國際網,我事先在虛擬機下試驗過發現desktop cd安裝過程中去聯網檢測apt源的時間特別長。此外,據說desktop cd會直接把grub裝到mbr,而且硬盤安裝會找不到iso)。
ubuntu-6.06-alternate-i386.iso
教育網 http://ftp.sjtu.edu.cn/ubuntu-cd/
官方 http://releases.ubuntu.com/
MD5SUM:
b2e9120f06d70cc076c1852c6c04654e ubuntu-6.06-alternate-i386.iso

2.下載硬盤啓動所需要的兩個文件 (不要使用ISO文件中自帶的)
下載initrd.gz和vmlinuz
教育網 http://ftp.sjtu.edu.cn/ubuntu/dists/dapper/main/installer-i386/current/images/hd-media/
官方 http://archive.ubuntu.com/ubuntu/dists/dapper/main/installer-i386/current/images/hd-media/

3.使用grub引導硬盤安裝
把上述三個文件保存在fat32分區根目錄或者 ext3或reiserfs分區根目錄,最好不要保存在ntfs分區。
我保存在windows的D盤根目錄,linux表示爲/dev/hda5,在grub中表示爲(hd0,4)。

1)已經在使用grub引導的,不必下載直接進入3)步驟

2)使用windows的ntldr引導的
下載GRUB
http://old.ubuntu.org.cn/download/installformharddisk/grldr
將 grldr 複製到 C:/,編輯C:/BOOT.INI,加入一行:
代碼:

C:/GRLDR="GRUB"


3)重新啓動計算機,進入grub菜單,按 c 進入 grub 命令行
根據下載的三個文件存放的位置,依次輸入以下命令並回車:
代碼:

grub> kernel (hd0,4)/vmlinuz root=/dev/ram ramdisk_size=32000 devfs=mount,dall
grub> initrd (hd0,4)/initrd.gz
grub> boot


4.開始安裝
根據安裝提示,設置語言、鍵盤、時區、網絡、分區、用戶名、密碼、grub等。
我的網絡是指定ip的,所以在dhcp分配網絡時選擇了取消,手動指定了ip地址。
據說直接斷開網線安裝會快很多,實踐發現安裝中還會在檢測apt源時停頓很久。
我不想覆蓋以前安裝的Grub,正巧安裝盤嘗試安裝grub失敗了,我就沒安裝grub繼續執行下面的程序了,裝完後手動修改了原來的grub的menu.lst加上新的引導內容(我的ubuntu裝在了/dev/hda12分區)。
代碼:

title Ubuntu 6.06
   root (hd0,11)
   kernel /vmlinuz-2.6.15-23-386 root=/dev/hda11 ro quiet splash
   initrd /initrd.img-2.6.15-23-386
   boot


5.簡單優化
重新啓動
設置apt源
代碼:

deb http://ftp.sjtu.edu.cn/ubuntu/ dapper main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-updates main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-security main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu/ dapper-backports main restricted universe multiverse
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ dapper main restricted universe multiverse

升級
代碼:

sudo aptitude update
sudo aptitude upgrade

對我的k7cpu優化
代碼:
sudo aptitude install linux-k7

intel p4處理器一般使用linux-i686

打開硬盤dma模式爲dma100
代碼:
sudo hdparm -X69 -d1 -u1 -m16 -c3 /dev/hda

安裝一些需要的軟件,略。

6.安裝ati驅動
安裝fglrx驅動
代碼:

sudo aptitude update
sudo aptitude install linux-restricted-modules-$(uname -r)
sudo aptitude install xorg-driver-fglrx
sudo aticonfig --initial
sudo aticonfig --overlay-type=Xv

裝完重啓
在終端輸入fglrxinfo查看驅動信息。
我的9200顯卡是r200系列顯卡,出現錯誤信息:
代碼:

[fglrx] API ERROR: could not register entrypoint for SelectTextureSGIS
[fglrx] API ERROR: could not register entrypoint for SelectTextureTransformSGIS
[fglrx] API ERROR: could not register entrypoint for ClientActiveVertexStreamATI[fglrx] API ERROR: could not register entrypoint for VertexBlendEnviATI
[fglrx] API ERROR: could not register entrypoint for VertexBlendEnvfATI
[fglrx] API ERROR: could not register entrypoint for VertexStream2sATI
......

據說是新版驅動對r200系列顯卡支持不好的問題,解決辦法是到http://forum.ubuntu.org.cn/viewtopic.php?t=16555的10樓下載libGL.so.1.2文件,http://forum.ubuntu.org.cn/download.php?id=3933,覆蓋掉/usr/lib/libGL.so.1.2。
然後順利看到類似下面的信息:
代碼:

display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 9250/9200 Series DDR Generic
OpenGL version string: 1.3.1072 (X4.3.0-8.25.18)

在終端輸入glxgears -printfps可看到已經有3d加速:
代碼:

10236 frames in 5.0 seconds = 2047.109 FPS
10199 frames in 5.0 seconds = 2039.734 FPS
10198 frames in 5.0 seconds = 2039.596 FPS
9701 frames in 5.0 seconds = 1940.146 FPS


7.安裝xgl
添加源
代碼:

sudo nano /etc/apt/sources.list

添加如下源到sources.list
代碼:

deb http://www.beerorkid.com/compiz/ dapper main
deb http://xgl.compiz.info/ dapper main
deb-src http://xgl.compiz.info/ dapper main

教育網內使用代理
代碼:
export http_proxy="http://xxx.xxx.xxx.xxx:xxxx"

獲取gpg 密匙
代碼:

wget http://www.beerorkid.com/compiz/quinn.key.asc -O - | sudo apt-key add -

安裝xgl需要的包
代碼:

sudo aptitude update
sudo aptitude install compiz xserver-xgl libgl1-mesa xserver-xorg libglitz-glx1 compiz-gnome

8.設置xgl的入口
新建一個XGL啓動腳本:
代碼:

sudo nano /usr/bin/startxgl.sh

內容是
代碼:

Xgl -fullscreen :1 -ac -accel glx:pbuffer -accel xv:pbuffer & sleep 2 && DISPLAY=:1
# Start GNOME
exec gnome-session

使腳本可執行:
代碼:

sudo chmod 755 /usr/bin/startxgl.sh

新建一個compiz啓動腳本
代碼:

sudo nano /usr/bin/startcompiz

內容是
代碼:

#!/bin/sh
killall gnome-window-decorator
wait
gnome-window-decorator & LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa
compiz --replace gconf miniwin decoration transset wobbly fade minimize cube rotate zoom scale move resize place switcher trailfocus water &

使腳本可執行:
代碼:

sudo chmod 755 /usr/bin/startcompiz

在登陸管理器裏建一個XGL會話:
代碼:

sudo nano /usr/share/xsessions/xgl.desktop

內容是
代碼:

[Desktop Entry]
Encoding=UTF-8
Name=XGl
Exec=/usr/bin/startxgl.sh
Icon=
Type=Application

打開桌面菜單-〉系統-〉首選項-〉會話
在最右邊的“啓動程序”裏添加 /usr/bin/startcompiz 這句話

之後執行
代碼:

sudo aptitude update
sudo aptitude dist-upgrade


最後,重新啓動,在登陸時選擇會話 “XGL
當它問你是否作爲默認是選“僅此次會話”
大功告成
這樣做的好處是因爲xgl不夠穩定,在不破壞正常的xorg前提下可以體驗一下xgl的3d桌面效果。

參考文獻
ubuntu6.06正式版硬盤安裝指南
http://forum.ubuntu.org.cn/viewtopic.php?t=16398
正式版ATI驅動問題!
http://forum.ubuntu.org.cn/viewtopic.php?t=16555
6.06 Gnome 在ATI X600se hm 上安裝ATI 8.25.18驅動以及 XGL
http://forum.ubuntu.org.cn/viewtopic.php?t=16623
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章