2007-06-06 00:00 太陽能筆記型電腦
當自己在96年2月2日將隨身使用的筆記型電腦的作業系統由使用近五年的Linux(自91年4月16日起陸續使用Red Hat 7.2, 9.x, Sun Java Desktop, Cent OS 4.x)改為Solaris 10時,發現原來正在使用的是『太陽能筆記型電腦』(a Powered by Sun Notebook)。在安裝時就告訴自己:「一定要記得將安裝過程記下來,也許可以提供給想使用『太陽能筆記型電腦』的朋友參考。」
版本日期:96年7月12日
編輯工具:安裝於『太陽能筆記型電腦』上的NetBeans IDE 5.5 HTML Editor
注意事項
- 本文中所建議的作法並不保證是最正確的作法(應有更多改正的空間)。
- 敬請自行承擔可能的風險(如:不小心把硬碟上的資料刪除了...)
- 本文中的內容可能較適合對有Unix或Linux經驗的讀者。不好意思,算是限制級的(限制讀者要有Unix或Linux的經驗)。
目標環境
以下是所設定的目標及完成的情形:作業系統 - Sun Solaris Express, Developer Edition 2007-02
VMware on Solaris x86? (我在等:-(,請幫忙到VMware的網站反映 VMware Forum: Virtualization General Discussion-VMware on Solaris x86?)
Xen on Solaris x86
電腦暫停或休眠
Zone
DTrace
無線網路
目錄服務 - OpenDS and JXplorer
電子郵件 - Thunderbird
網頁瀏灠 - Firefox
文件簡報 - StarSuite/OpenOffice
字典程式 - StarDict
播放程式 - Rhymthmbox, Realplayer
開發工具 - NetBeans 5.5/6.0m9, Sun Studio Express 2007-06
個人記帳 - jGnash
列印服務 - CUPS
遠端桌面 - VNC Viewer, RDesktop, TSClient, Secure Global Desktop
封包捉取 - Wireshark
準備工作
- 真的不想裝? 別裝了,你應該會想動手自己裝吧?不過,Sun倒是也考慮到您了,您在下載Soarlis Express, Developer Edition時可以選擇下載現成已經裝好的VMware的影像檔。
- 確認可以改裝為『太陽能筆記型/個人電腦』 您可以直接安裝試試看或參考Sun的Solaris OS Hardware Compatibility List或Sun Device Detection Tool確認。
- 準備Solaris Express, Developer Edition安裝光碟片(CD/DVD) 在所有的下載檔案之中只有Solaris Express, Developer Edition安裝光碟片的ISO檔案需要事先下載並燒製成光碟片,其他的都可以在網路連線設定好了之後直接下載安裝。本文中使用的版本是Solaris Express, Developer Edition 2007-02。
- 規劃磁碟空間 在磁碟空間的規劃,可分為兩個部份:
- 備份資料 這個部份是最重要的,在您正式動手安裝之前,要記得將您在硬碟的資料做好備份。
- 調整分割區 如果您需要調整分割區的大小的話可以參考以下的資訊:
1) PC Partition Table
2) Solaris分割區內的Partition Table。
在實務上建議各位要將作業系統及資料分開在不同的分割區中,如此在作業系統重新安裝時可以不影響到原來存放的資料。同時如果要考慮到有另外的作業系統存在的話,那也必須為其他的作業系統保留所需要使用的碟區。
由於Solaris x86是在Solaris分割區之中另有自己的Partition Table(分割為不同的Slices),在此先就PC Partition Table討論。如果資料是在同一個硬碟的話,那麼只需要在同一個硬碟劃分出一個Solaris的分割區。以下的建議為與Linux共存的磁碟分割表:
| 項次 | 用途 | 大小 | 備註 |
|---|---|---|---|
| 1 | Linux SWAP/Win95 FAT32 | 2GB | Linux的SWAP或FAT32的分割區 |
| 2 | Solaris | 20GB | Solaris的作業系統及資料(其中再切出Swap、Root及資料等三個Slice) |
| 3 | Linux Native | 5GB | Linux的作業系統 |
| 4 | Linux Data | 10GB | Linux的資料 |
如果是兩個硬碟的話也許可以做如下的規劃:
第一個硬碟:
| 項次 | 用途 | 大小 | 備註 |
|---|---|---|---|
| 1 | Linux SWAP/Win95 FAT32 | 2GB | Linux的SWAP或FAT32的分割區 |
| 2 | Solaris | 40GB | Solaris的作業系統(其中再切出Swap及另外三個同大小的Slice用來裝最多三個版本的Solaris) |
| 3 | Linux Native | 5GB | Linux的作業系統(版本一) |
| 4 | Linux Native | 5GB | Linux的作業系統(版本二) |
| 項次 | 用途 | 大小 | 備註 |
|---|---|---|---|
| 1 | Solaris Data | 40GB | Solaris的資料 |
另一個您會問的問題是,那Linux的資料放在那裏呢?上個周末我將所有的Linux資料分割區全都合併到Solaris分割區了,然後使用一個外接的USB硬碟分割為FAT32讓Solaris, Linux, Mac OS X, Windows每個系統都可以存取。
接著您會問:那你裝Linux作什麼?裝Linux是用來執行VMware Server的,那外接的USB硬碟就用來放VMware的檔案。不過,說真的,我很確定不會常要用Linux開機了,因為我第一個成功用BrandZ來執行的Linux軟體就是VMware Server Console。利用它我可以用它來存取在別台機器的VMware虛擬機器。
1. 在Windows下先進行磁碟重整
2. 下載用Linux建立的系統救援光碟片:http://www.sysresccd.org/
3. 以光碟片開機然後執行GParted,GParted是類似Partition Magic的工具。
註:別說我沒提醒您,要記得將您在硬碟的資料做好備份。
設定步驟
- 分割磁碟
- 可以分割磁碟的工具有很多(包括在之前提及的系統救援光碟片中的GNU Parted),由於我在安裝Solaris之前是使用Linux因此我是使用Linux上的fdisk來進行分割。其中的工作包括在安裝Solaris前將原為Linux的分割區故意改為別種的分割區。關於fdisk的操作使用在『參考資料』一節中有其說明資料的網址。
- 如果您不是使用Linux,您可以使用SPFDisk這個工具來進行分割,在『參考資料』一節中有它的網址。
- 以下是在我的筆記型電腦上利用Solaris的工具fdisk及format所看到的PC Partition Table及Solaris Partition Table的資訊。
- 安裝Solaris Express 您如果想熟悉Solaris 10的安裝之後才在硬碟安裝的話可以參考『How to install Sun Solaris 10 inside VMware Workstation 5.5』一文中的內容。在實際安裝時的細節則可以參考『鳥哥的 Linux 私房菜 -- 安裝 Solaris 10』、『Andrew Choi(蔡健發)的Solaris 10 OS 1/06 x86 快速安裝』及『How to Quickly Install the Solaris 10 1/06 OS』中的說明。您可以在參考資料找到它們的網址。在此只針對有差異的地方做說明:
- 語言:中(正體及簡體)、日、韓三種語言,系統預設的語言設定為zh_TW.UTF-8。這個部份只是個人的習慣,有兩個原因:1) 可選中、日、韓不同的語言登入。2) 因為系統預設的語言為zh_TW.UTF-8,可以順便測試有那些軟體/工具/程式會有水土不服的情形。
- 時區:您所在的時區
- 套件:選擇『Custom Packages』,先不安裝Sun Application Server及StarOffice因為之後在安裝NetBeans及StarSuite或OpenOffice時會安裝。
- 資料目錄:因為是個人用電腦因此以/home當資料目錄而不是/export/home。
- 設定Solaris使用環境
- PATH及MANPATH 以下是.bash_profile的範例,我故意將CSW的路徑放在最後,因此系統會優先使用原有系統的程式或軟體。
- gnome Desktop 以下是我在安裝之後通常會去修改的設定:
- 字型偏好設定(啟動/偏好設定/桌面偏好設定/顯示/字型):
- 捷徑(啟動/偏好設定/桌面偏好設定/鍵盤/捷徑) 這個部份的設定則可依個人喜好來設定。
- 設定ADSL網路 以下是我使用的設定檔及相關指令:
- 範例說明:
- 編輯/etc/ppp/peers/HiNet
- 編輯/etc/ppp/pap-secrets
- 編輯/etc/ppp/pppoe.if
- 編輯/etc/ppp/options.sppptun
- 撥接
- 中斷
- 安裝pkg-get 使用下載連結中的CSW pkg-get的連結下載pkg-get的工具,使用這個工具可以讓您方便安裝其他的軟體。
- 設定Firefox
- 安裝擴充功能模組 以下是建議的擴充功能模組,由於安裝並不複雜在此只列出名稱及連結。使用Firefox點選這些連結就可以完成安裝了。
- FoxyProxy 安裝
- Download Statusbar 安裝
- DownThemAll 安裝
- FireFTP 安裝
- CrossFTP 安裝
- Live HTTP Headers 安裝
- Header Monitor 安裝
- Tabs Menu 安裝
- 常用書籤
- 設定Thunderbird
- 安裝擴充功能模組 以下是建議的擴充功能模組。可在下載檔案之後在Thunderbird選Tools/Add-ons/Install來進行安裝。
- Lightning (參考下載連結)
- MIME Edit 安裝
- 安裝StarSuite 8或OpenOffice 略
- 安裝NetBeans 5.5 略
- 安裝Sun Studio Express 略
- 提供對NTFS及EXT3檔案系統的支援 參考以下的說明安裝即可,不過有兩個限制:唯讀及檔案大小為2GB。
- 使用USB姆指碟或硬碟 format -e或rmformat可以協助您找到正確的裝置檔案。如果使用Solaris Express, Developer Edition 2007-02的話,應該可以正確的自動掛載。
- 其他軟體 以下的軟體可以使用pkg-get -i {軟體名稱}來安裝。
- cups
- wireshark
- rdesktop
- lsof
- ncftp
- xmms
- gftp
- 安裝Graphical Network Configuration Tool (inetmenu) 連到Laptop (OpenSolaris)的網站可以下載並安裝inetmenu的工具,讓您方便的更動網路設定。
# fdisk /dev/rdsk/c0d0p0
Total disk size is 7296 cylinders
Cylinder size is 16065 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Solaris 1 130 130 2
2 Active Solaris2 131 6130 6000 82
3 Linux native 6131 6712 582 8
4 Linux native 6713 7294 582 8
# fdisk /dev/rdsk/c1d0p0
Total disk size is 12161 cylinders
Cylinder size is 16065 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Active Solaris2 1 12160 12160 100
# format
AVAILABLE DISK SELECTIONS:
0. c0d0 ≤DEFAULT cyl 5998 alt 2 hd 255 sec 63> 60GB
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c1d0 ≤DEFAULT cyl 12158 alt 2 hd 255 sec 63> 100GB
/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
Specify disk (enter its number): 0
selecting c0d0: 60GB
format> partition
partition> print
Volume: 60GB
Current partition table (original):
Total disk cylinders available: 5998 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 118 - 2077 15.01GB (1960/0/0) 31487400
1 root wm 2078 - 4037 15.01GB (1960/0/0) 31487400
2 backup wu 0 - 5997 45.95GB (5998/0/0) 96357870
3 unassigned wm 4038 - 5997 15.01GB (1960/0/0) 31487400
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 swap wm 3 - 117 902.09MB (115/0/0) 1847475
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 alternates wm 1 - 2 15.69MB (2/0/0) 32130
partition> quit
format> disk
AVAILABLE DISK SELECTIONS:
0. c0d0 ≤DEFAULT cyl 5998 alt 2 hd 255 sec 63> 60GB
/pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0
1. c1d0 ≤DEFAULT cyl 12158 alt 2 hd 255 sec 63> 100GB
/pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0
Specify disk (enter its number)[0]: 1
selecting c1d0: 100GB
format> partition
partition> print
Volume: 100GB
Current partition table (original):
Total disk cylinders available: 12158 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 unassigned wm 3 - 12157 93.11GB (12155/0/0) 195270075
1 unassigned wm 0 0 (0/0/0) 0
2 backup wu 0 - 12157 93.14GB (12158/0/0) 195318270
3 unassigned wm 0 0 (0/0/0) 0
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 0 0 (0/0/0) 0
6 unassigned wm 0 0 (0/0/0) 0
7 unassigned wm 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 alternates wm 1 - 2 15.69MB (2/0/0) 32130
# more .bash_profile
...
PATH_LIST=`cat << END_OF_LIST
/usr/local/bin
/usr/local/sbin
/opt/sfw/bin
/opt/sfw/sbin
/usr/sfw/bin
/usr/sbin
/usr/bin
/usr/ucb
/usr/ccs/bin
/usr/dt/bin
/usr/openwin/bin
/opt/csw/gcc3/bin
/opt/csw/bin
/opt/csw/sbin
END_OF_LIST`
PATH=$HOME/bin
for i in $PATH_LIST
do
PATH=$PATH:$i
done
export PATH
MANPATH_LIST=`cat << END_OF_LIST
/opt/csw/share/man
/opt/csw/ssl/man
/opt/sfw/man
/usr/apache2/man
/usr/apache/man
/usr/dt/share/man
/usr/j2se/man
/usr/jdk/instances/jdk1.6.0/man
/usr/jdk/instances/jdk1.5.0/man
/usr/local/doc/ncftp/doc/man
/usr/local/man
/usr/local/ssl/man
/usr/openwin/share/man
/usr/perl5/5.8.4/man
/usr/perl5/5.8.3/man
/usr/perl5/5.6.1/man
/usr/sfw/share/man
/usr/share/man
/usr/share/webconsole/man
/usr/SUNWale/share/man
/usr/X11/share/man
END_OF_LIST`
MANPATH=$HOME/man
for i in $MANPATH_LIST
do
MANPATH=$MANPATH:$i
done
export MANPATH
...
| 設定 | 參數一 | 參數二 |
|---|---|---|
| 應用程式字型 | FZHeiTi | 10 |
| 桌面字型 | FZHeiTi | 10 |
| 視窗標題字型 | FZHeiTi | 10 |
| 終端機字型 | FZFangSongTi | 10 |
Interface: 請替換為Ethernet的網路介面,如e1000g0,可利用ifconfig -a指令確認
HiNet: 請替換為ADSL服務提供者的名稱
YourID@hinet.net: 請替換為ADSL的用戶帳號
YouPassword: 請替換為ADSL的用戶密碼
sppptun
plugin pppoe.so
connect "/usr/lib/inet/pppoec -v Interface"
user YourID@hinet.net
defaultroute
noauth
noccp
noipdefault
persist
usepeerdns
YourID@hinet.net * YourPassword
Interface
# 空白
# pppd debug updetach call HiNet
# ifconfig sppp0 down
9. Interoperability with Other Operating Systems (Solaris x86 FAQ)
您的建議
如果您對內容有任何的建議,非常歡迎您能提供給我,我會對本文做適當的修正或補充。參考資料
- Seven ways Solaris can beat Linux | InfoWorld | Column | 2007-01-22 | By Neil McAllister
- Solaris OS Hardware Compatibility List
- Cygwin
- 鳥哥的 Linux 私房菜 -- 安裝 Solaris 10
- Andrew Choi(蔡健發)的Solaris 10 OS 1/06 x86 快速安裝
- How to Quickly Install the Solaris 10 1/06 OS
- Solaris Express, Developer Edition
- virtualization.info: How to install Sun Solaris 10 inside VMware Workstation 5.5
- Partitioning with fdisk
- SPFDisk - SPecialFDisk
- Solaris 安裝日記
- Solaris 安裝日記討論區
- Solaris x86 FAQ
- Solaris and Linux: Seal Rock Research White Paper
- Solaris Express User Manuals
- Solaris 10 User Manuals
- Blastwave.org - An OpenSolaris Community Site
- JRuby (Wikipedia)
- StarSuite/StarOffice (Wikipedia)
- XPlanet
- Solaris Packages (Drydog)
- OpenSolaris
- BrandZ (OpenSolaris)
- Desktop (OpenSolaris)
- Laptop (OpenSolaris)
- Xen (OpenSolaris)
- Calendar Project - Home of Sunbird and Lightnin
- Wireshark: The World's Most Popular Network Protocol Analyzer
- Wireshark (Wikipedia)
- Adobe Flash Player
- Adobe Reader
- jGnash
- Sun Studio Express


