 |
» |
|
|
 |
本節說明如何自開機磁碟取得 Linux 安裝 (Boot) 影像檔,然後取得欲自網路伺服器安裝的 Linux 套件。 此程序假設已在網路伺服器上自 ISO 影像檔建立 Linux 安裝目錄結構樹。若需相關資訊,請參閱《Red Hat Enterprise Linux 4; Installation Guide for x86, Itanium, AMD64, and Intel Extended Memory Technology 64 (Intel EM64T)》。使用 NFS 匯出此目錄結構樹,或確認 VM 主機系統可藉由其他方式存取此結構樹 (例如利用 FTP)。 從伺服器上的 Linux 安裝結構樹複製 boot.iso 檔案至 VM 主機上的 /var/opt/hpvm/images/linux/boot.iso。例如,在 VM 主機上輸入下列命令: # cd /var/opt/hpvm/ISO-images/linux
# ftp yourserver.abc.com
ftp> cd /dist/pbfd/ftp/dist/redhat/release/rhel4/as/U4/ia64
ftp> cd images
ftp> get boot.iso
ftp> quit
|
在此程序中,此檔案會在從機中備份一個虛擬 DVD。自此 DVD 使從機開機,並自此 DVD 中載入安裝程式。askmethod 選項用於搭配 linux 命令,以指定安裝結構數的位置。安裝程式會自透過網路從伺服器取得的套件,將 Linux 安裝在從機上。 以開機磁碟與在 VM 主機上利用 boot.iso 檔案備份的虛擬 DVD 建立虛擬機器。亦需要網路裝置。將作業系統類型指定為 linux。例如: # hpvmcreate -P linux3 -B manual -O LINUX -c 1 -r 2G \
-a disk:scsi::lv:/dev/vg00/rguest1 \
-a dvd:scsi::file:/ISO-images/Linux/boot.iso \
-a network:lan::vswitch:switch1 |
在 VM 主機系統上啟動虛擬機器: # hpvmstart -P linux3
(C) Copyright 2000 - 2007
Hewlett-Packard Development Company, L.P.
Opening minor device and creating guest machine container
Creation of VM, minor device 1
Allocating guest memory: 1024MB2,048MB
allocating low RAM (0-80000000, 2,048MB)
/opt/hpvm/lbin/hpvmapp
(/var/opt/hpvm/uuids/eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next):
Allocated 2147483648 bytes at 0x6000000100000000
allocating firmware RAM (ffaa0000-ffab5000, 84KB)
/opt/hpvm/lbin/hpvmapp
(/var/opt/hpvm/uuids/eaccd6e4-b004-11db-bd1f-00306ef4693e/vmm_config.next):
Allocated 86016 bytes at 0x6000000180000000
Loading boot image
Image initial IP=102000 GP=62E000
Initialize guest memory mapping tables
Starting event polling thread
Starting thread initialization
Daemonizing....
hpvmstart:Successful start initiation of guest 'linux2' |
在 VM 主機上使用 hpvmconsole 命令連線至從機。 或者,離開 EFI shell 並選取 Boot from a file。選取 Removable Media Boot 選項。按下 Enter 鍵,從機自 DVD 裝置開機。 使從機開機。 有兩種方式可使從機開機: 自 EFI shell 開機: 跳至 EFI shell。例如: fs0 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig5D1D1134-C809-11DB-9AEB-000000000000)
fs1 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)/HD(Part2,Sig5DB58D88-C809-11DB-9AEB-000000000000)
fs2 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0)
|
EFI 列出具有偵測為 fs{n} 之檔案系統的裝置。在上一個範例中,fs0 和 fs1 是磁碟上較舊的檔案系統。fs2 檔案系統對應於可開機的 Linux ISO 影像檔/虛擬 DVD,可藉由 CD 辨識。 輸入下列命令,使第一個 DVD 安裝作業開機 (由裝置對映表中的 /CDROM 指出): shell > fsn:
fsn > bootia64
|
其中 n 對應於虛擬 DVD。
下列範例顯示如何自 fs0 開機: # hpvmconsole -P linux1
- - - - - - - - - - Prior Console Output - - - - - - - - - -
Device mapping table
fs0 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0)
blk0 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun0,Lun0)
blk1 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)
blk2 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)/CDROM(Entry0)
blk3 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun2,Lun0)
blk4 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun3,Lun0)
blk5 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun4,Lun0)
blk6 :Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun5,Lun0)
Shell> fs0:
fs0:> bootia64 |
欲自檔案功能表開機: 離開 EFI shell。 選取 Boot from a file。 選取 Removable Media Boot 選項。按下 Enter 鍵, 從機自媒體開機。
以 linux 命令指定 console=ttyS0 和 askmethod 選項。例如: ELILO boot:linux console=ttyS0 askmethod
|
 |  |  |  |  | 附註: askmethod 選項會使 Linux 安裝程式顯示一個畫面,讓您指定欲自哪一個網路伺服器取得 Linux 套件,以及存取網路伺服器的方法 (FTP 或 NFS)。 |  |  |  |  |
安裝程序繼續進行: Uncompressing Linux... done
Loading initrd initrd.img...done
Linux version 2.6.9-42.EL (bhcompile@altix2.build.redhat.com)
(gcc version 3.4.6 20060404 (Red Hat 3.4.6-2))
#1 SMP Wed Jul 12 23:25:09 EDT 2007
.
.
.
Welcome to Red Hat Enterprise Linux |
開機程式會顯示一些畫面,讓您指定從機的網路參數 (IP 位址、網路遮罩、閘道器、DNS)、伺服器的網路名稱,以及伺服器上安裝結構樹的目錄路徑。請按照表 6-3 的說明回應上述畫面。 表 6-3 Linux 從機網路安裝畫面 | 畫面標題 | 回應 |
|---|
| 語言選擇 | 選取您的語言並輸入 OK。 | | 選取安裝方法 | NFS 或 FTP,並輸入 OK。 | | eth0 的網路配置 | 鍵入從機的 IP 位址和網路遮罩。輸入 OK。 | | 要求伺服器參數 | 輸入伺服器名稱、安裝結構樹的路徑,以及 FTP 參數 (若有的話)。 |
按照前幾節的說明完成安裝程序。 若需使用網路安裝網路伺服器的相關資訊,請參閱下列 Red Hat 網站中的相關文件:http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/rhel-ig-x8664-multi-en-4/
|