【轉貼】【教學】2片磁片的x-window 轉到hd上



贊助商連結


purk
2005-06-30, 09:54 PM
首先要有一個已經安裝好的linux
將要安裝的分割區先mount 起來
假設是在 /mnt/new 好了

以下的步驟都需要以root來進行

第一步要作的就是將2dskx-1.0.tgz解開
tar zxvf 2dskx-1.0.tgz
解開後會有一目錄 dist

接著要解開2dskxwin.img
先建一個暫時目錄 temp or ~!@#$%$#^
mount -o loop 3dskxwin.img temp
將temp目錄中的Image.gz and vmlinuz copy出來
then
gzip -d Image.gz it will be Image
接著先umount temp
then
mount -o loop Image temp
然後將temp目錄里的東西都copy到要安裝的分割區中
copy vmlinuz 到要安裝的分割區里,我是放到boot裡
然後解開 usr.bz2
tar jxvfp usr.bz2
把 x11.bz2 也解開
接著把modules.tgz 解到 /lib/modules 裡

然後要修改 /etc/fstab
將 / and swap 都修改一下,讓他對應到正確的裝置
然後是最重要的檔案 /etc/rc.d/rc.sysinit
將下面幾行給 comment掉

#/bin/bzip2 -dcf /usr.bz2 | tar xf -
#rm -f /usr.bz2
#echo "Please insert disk 2 in floppy and press enter"
#read ans
#mount /dev/fd0 /mnt
#cd /usr
#bzip2 -d -c /mnt/x11.bz2 | tar xf -
#/usr/X11R6/bin/makelinks.sh
#/bin/gzip -dcf /etc/uk.map.gz | /sbin/loadkmap

如果有需要可以順便修改其他的 rc.??? 和 rc.start 裡的東西

最後一步就是安裝 lilo 來啟動 linux
先寫好 lilo.conf

disk = /dev/hdb
bios=0x80
boot = /dev/hdb5
root = /dev/hdb5
prompt
install = /mnt/new/boot/boot.b
map = /mnt/new/boot/map
lba32
delay = 50
image = /mnt/new/boot/vmlinuz
root = /dev/hdb5
label = 2disk

存成一個檔案,修改一下,確定裝置對應無誤後
執行 lilo -C lilo.conf -v -v -v
如果沒有錯誤就可以開機試試看了

如果開機進去了
先去/usr/X11R6/bin 執行 makelinks.sh
然後就打 xwin 選擇滑鼠和顯示模式就可以進去 X

基本上就這樣而已,如果有問題的話再一起討論吧