Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
Installation Guide
for Red Hat Enterprise Linux 5.0
版 5.0
摘要
序論
注意
/usr/share/doc/redhat-release-notes-5<variant>/
directory after installation, where <variant> is Server
, Client
, or Desktop
.
1. 電腦架構的相關資訊
2. 還有更多
2.1. 提供您寶貴的意見
http://bugzilla.redhat.com/bugzilla/
) against the component Installation_Guide
(Product: Red Hat Enterprise Linux
, Version: 5.0
).
3. 其它可用的手冊
注意
/usr/share/doc/redhat-release-notes-5<variant>/
directory after installation, where <variant> is Server
, Client
, or Desktop
.
部 I. x86、AMD64 和 Intel® 64 和 Itanium 安裝與啟動
章 1. Itanium 系統的特定資訊
1.1. Itanium 系統的安裝概要
- 開機進入 EFI(Extensible Firmware Interface)Shell。
- 如果您無法從 CD-ROM 開機,請從 Red Hat Enterprise Linux 提供的開機映像檔建立一片 LS-120 磁碟片。
- 使用 EFI Shell 以及 ELILO 開機管理程式,載入並執行核心,並啟動 Red Hat Enterprise Linux 安裝程式。
1.2. Itanium 系統 — EFI Shell
edit
, type
, cp
, rm
與 mkdir
,如要取得工具與其它指令的清單,請在 EFI Shell 提示 符號下輸入 help
。
http://developer.intel.com/technology/efi/index.htm
1.2.1. Itanium 系統 — EFI 裝置名稱
map
指令可以被使用來列出 EFI 所能辨識的所有裝置與檔案系統, 當您的 Itanium 系統開機進入 EFI Shell 後,它將會以下列的順序偵測您的系統:
- LS-120 磁碟機(如果其中有媒體存在的話)
- 在主要 IDE 介面的 IDE 硬碟
- 在次要 IDE 介面的 IDE 硬碟
- 在 SCSI 介面的 SCSI 硬碟
- 在 IDE 介面的光碟機
- 在 SCSI 介面的光碟機
map
map
指令的輸出將會如下所示:
Device mapping table fs0 : VenHw(Unknown Device:00)/HD(Part1,Sig00000000) fs1 : VenHw(Unknown Device:80)/HD(Part1,Sig00000000) fs2 : VenHw(Unknown Device:FF)/CDROM(Entry1)/HD(Part1,Sig00000000) blk0 : VenHw(Unknown Device:00) blk1 : VenHw(Unknown Device:00)/HD(Part1,Sig00000000) blk2 : VenHw(Unknown Device:80) blk3 : VenHw(Unknown Device:80)/HD(Part1,Sig00000000) blk4 : VenHw(Unknown Device:80)/HD(Part2,Sig00000000) blk5 : VenHw(Unknown Device:80)/HD(Part3,Sig00000000) blk6 : VenHw(Unknown Device:80)/HD(Part3,Sig00000000)/HD(Part1,Sig725F7772) blk7 : VenHw(Unknown Device:FF) blk8 : VenHw(Unknown Device:FF)/CDROM(Entry1) blk9 : VenHw(Unknown Device:FF)/CDROM(Entry1)/HD(Part1,Sig00000000)
fs
開頭的列出項目為 EFI 能夠讀取的 FAT16 檔案系統。所有以 blk
開頭的列出項目為 EFI 能夠辨識的區塊裝置。這些檔案系統與區塊裝置都是以它們被偵測的順序來列出的,因此,fs0
為 LS-120 上的系統分割區,fs1
為硬碟上的系統分割區,而 fs2
為光碟上的系統分割區。
1.2.2. Itanium 系統 — EFI 系統分割區
/boot/efi/
。這個分割區將包含 已安裝的 Linux 核心以及 ELILO 設定檔案 (elilo.conf
)。elilo.conf
檔案含有您用來啟動系統的核心清單。
章 2. 開始使用的步驟
2.1. 選擇要升級或安裝
2.2. 您的硬體相容嗎?
http://hardware.redhat.com/hcl/
2.3. 您有足夠的磁碟空間嗎?
/
和 swap
)給 Red Hat Enterprise Linux 使用。而 Itanium 系統需要三個分割區(/
、/boot/efi/
和 swap
)。
- 有足夠的「未分割[1]」硬碟空間,以安裝 Red Hat Enterprise Linux,或
- 有一或多個可以刪除的分割區,以釋放出足夠的硬碟空間來安裝 Red Hat Enterprise Linux。
2.4. 您可以使用 DVD/CD-ROM 光碟機安裝嗎?
2.4.1. 其它的開機方式
- 使用 DVD/CD-ROM 光碟機開機
- If you can boot using the DVD/CD-ROM drive, you can create your own CD-ROM to boot the installation program. This may be useful, for example, if you are performing an installation over a network or from a hard drive. Refer to 節 2.4.2, “建立一片安裝程式的開機光碟” for further instructions.
- USB pen drive
- If you cannot boot from the DVD/CD-ROM drive, but you can boot using a USB device, such as a USB pen drive, the following alternative boot method is available:欲使用 USB 隨身碟啟動,請使用
dd
指令,複製 DVD 或 CD-ROM #1/images/
目錄中的diskboot.img
映像檔。範例如下:dd if=diskboot.img of=/dev/sda
要使用這種開機方法,您的 BIOS 必須支援從 USB 裝置開機。
2.4.2. 建立一片安裝程式的開機光碟
isolinux/
directory from the Red Hat Enterprise Linux DVD or CD #1 into a temporary directory (referred to here as <path-to-workspace>
) using the following command:
cp -r <path-to-cd>/isolinux/
<path-to-workspace>
<path-to-workspace>
directory you have created:
cd <path-to-workspace>
chmod u+w isolinux/*
mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot \ -boot-load-size 4 -boot-info-table -R -J -v -T isolinux/
注意
file.iso
and located in <path-to-workspace>
) to a CD-ROM as you normally would.
2.5. 準備網路安裝
注意
注意
boot:
提示符號下(Itanium 系統的使用者,請在前面加上 elilo
指令),輸入以下指令:
linux mediacheck
注意
/location/of/disk/space
。該目錄將通過 FTP、NFS、或 HTTP 公開,並將指定為 /export/directory。例如,/location/of/disk/space
可能為您所創立稱為 /var/isos
的目錄。/export/directory
也許是用來 HTTP 安裝的 /var/www/html/rhel5
。
- 請使用以下指令從安裝磁碟中建立 iso 映像檔:
- 使用 DVD 啟動
dd if=/dev/dvd of=/location/of/disk/space/RHEL5.iso
dvd 是指 DVD 光碟機裝置。 - 使用 CD-ROM 光碟機啟動:
dd if=/dev/cdrom of=/location/of/disk/space/diskX.iso
cdrom 是指 CD光碟機裝置,而X 是您所要複製光碟的編號,從 1 開始代表第一張光碟。
2.5.1. 準備 FTP 和 HTTP 安裝
- 使用 DVD 啟動
mount -o loop /location/of/disk/space/RHEL5.iso /export/directory/
在這個情況下 /export/directory 這個目錄將通過 FTP 或 HTTP 被分享。 - 使用 CD-ROM 光碟機啟動:
mount -o loop /location/of/disk/space/diskX.iso /export/directory/diskX/
將上列指令應用在每一個 CD-ROM iso 映像檔上,範例:mount -o loop /var/isos/disk1.iso /var/www/html/rhel5-install/disk1/
/export/directory
這個目錄能通過 FTP 或 HTTP 被分享,並檢驗客戶存取。您可以檢查該目錄是否能夠從伺服器上,以及在您欲安裝的同一子網路之另一部電腦上被存取。
2.5.2. 準備 NFS 安裝
- 使用 DVD 啟動
mv /location/of/disk/space/RHEL5.iso /export/directory/
- 使用 CD-ROM 光碟機啟動:
mv /location/of/disk/space/disk*.iso /export/directory/
/export/directory
目錄已通過 NFS 然後 /etc/exports
.這個分錄輸出。
/export/directory client.ip.address(ro,no_root_squash)
/export/directory *(ro,no_root_squash)
/sbin/service nfs start
指令)。如果 NFS 正在執行中,請重新載入設定檔案(在 Red Hat Enterprise Linux 系統上,請使用 /sbin/service nfs reload
)。
2.6. 準備硬碟安裝
注意
- 使用光碟片 — 從每張安裝光碟建立 ISO 映像檔。在 Linux 系統上,置入光碟並輸入下列指令:
dd if=/dev/cdrom of=/tmp/file-name.iso
dd if=/dev/cdrom of=/tmp/file-name.iso
- 使用 ISO 映像檔 — 將這些映像檔轉換到欲進行安裝的系統。在您進行安裝前請先檢驗 ISO 映像檔的完整性,將可使您避免可能發生的一些問題。您可以使用
md5sum
程式來進行檢驗(許多作業系統中都含有md5sum
程式)。在存放這些 ISO 映像檔的同一部 Linux 機器中應該有一個md5sum
程式。
注意
boot:
提示符號下(Itanium 系統的使用者,請在前面加上 elilo
指令),輸入以下指令:
linux mediacheck
updates.img
檔案,它是用來安裝 anaconda
程式更新的。如果您想知道更多安裝 Red Hat Enterprise Linux 的方法,以及如何使用安裝程式更新的功能,請參照 anaconda
RPM 套件中的 install-methods.txt
檔案。
章 3. System Specifications List
- hard drive(s): type, label, size; e.g. IDE hda=40 GB
- partitions: map of partitions and mount points; e.g.
/dev/hda1=/home
,/dev/hda2=/
(fill this in once you know where they will reside) - memory: amount of RAM installed on your system; e.g. 512 MB, 1 GB
- CD-ROM: interface type; e.g. SCSI, IDE (ATAPI)
- SCSI adapter: if present, make and model number; e.g. BusLogic SCSI Adapter, Adaptec 2940UW
- network card: if present, make and model number; e.g. Tulip, 3COM 3C590
- mouse: type, protocol, and number of buttons; e.g. generic 3 button PS/2 mouse, MouseMan 2 button serial mouse
- monitor: make, model, and manufacturer specifications; e.g. Optiquest Q53, ViewSonic G773
- video card: make, model number and size of VRAM; e.g. Creative Labs Graphics Blaster 3D, 8MB
- sound card: make, chipset and model number; e.g. S3 SonicVibes, Sound Blaster 32/64 AWE
- IP, DHCP, and BOOTP addresses
- netmask
- gateway IP address
- one or more name server IP addresses (DNS)
- domain name: the name given to your organization; e.g.
example.com
- hostname: the name of your computer; your personal choice of names; e.g.
cookie
,southpark
章 4. 在 Intel® 和 AMD 系統上進行安裝
- Becoming familiar with the installation program's user interface
- 開始安裝程式
- 選擇一個安裝方式
- 安裝中的設定步驟(語言、鍵盤、滑鼠、磁碟分割等等。)
- 完成安裝程式
4.1. 圖形化安裝程式的使用者介面
注意
boot:
prompt:
linux text
注意
elilo linux text
4.1.1. 使用虛擬主控台注意事項
表格 4.1. 主控台、按鍵組合與內容
主控台 | 按鍵組合 | 內容 |
---|---|---|
1 | ctrl+alt+f1 | 安裝對話 |
2 | ctrl+alt+f2 | shell 提示符號 |
3 | ctrl+alt+f3 | 安裝紀錄(來自安裝程式的訊息) |
4 | ctrl+alt+f4 | 系統相關的訊息 |
5 | ctrl+alt+f5 | 其它訊息 |
6 | ctrl+alt+f6 | X 圖形顯示 |
4.2. 文字模式安裝程式使用者介面
注意
圖形 4.1. Installation Program Widgets as seen in Boot Loader Configuration
圖形 4.2. Installation Program Widgets as seen in Disk Druid
- 視窗 — 視窗(在這本手冊上通常表示為 對話視窗)會出現在整個安裝過程的畫面上。有時候,一個視窗會重疊在另一個上面;在這些情況下,您只能與最上面的那個視窗產生互動。當您完成在那個視窗的動作後,它將會消失,讓您可以繼續在其下的視窗中工作。
- 選取方塊 — 選取方塊讓您可以選擇或取消選擇一個特色。選取方塊會以一個星號(表示已選取)或一個空白(表示未選取)來顯示。當游標停留在一個選取方塊時,按下 空白鍵 以選取一個未選取的項目,或取消選取一個已經選取的項目。
- 文字輸入行 — 文字輸入行是讓您可以輸入安裝程式需要訊息的地方。當游標停留在一個文字輸入行時,您可以輸入亦或編輯在該行的資訊。
- 文字元件 — 文字元件是用來顯示文字的一個畫面區域。有時候,文字元件也許會包含其它的元件,例如選取方塊。如果一個文字元件包含了超過它所能容納空間的資料,會出現一個捲軸;如果您放置游標在該文字元件上,之後您可以使用 向上 與 向下 方向鍵來捲動所有在其中的資訊。您目前的位置會以 # 字元出現在捲軸上,當您捲動捲軸時它會上下移動。
- Scroll Bar — Scroll bars appear on the side or bottom of a window to control which part of a list or document is currently in the window's frame. The scroll bar makes it easy to move to any part of a file.
- 按鈕元件 — 按鈕元件是主要用來與安裝程式互動的方法。藉由使用 Tab 與 Enter 鍵操縱這些按鈕,讓您可以前進到安裝過程的畫面。當按鈕為反白時,表示可以被選取。
- 游標 — 雖然不是一個 widget,但是游標用來選取(對應)一特定 widget。當游標在 widget 之間移動時可使得 widget 改變顏色,或者游標本身可能顯示為置於或鄰近於 widget。
4.2.1. 使用鍵盤來操縱
警告
4.3. 開始安裝程式
注意
4.3.1. 在 x86、AMD64 和Intel® 64 系統上啟動安裝程式。
- Red Hat Enterprise Linux DVD/CD-ROM 光碟 — 您的電腦支援可開機的光碟機,而且您想執行網路或硬碟的安裝。
- 開機光碟 — 您的機器支援可開機的光碟機,而且您想執行網路或硬碟的安裝。
- USB 隨身碟 — 您的機器支援從 USB 裝置開機。
- PXE boot via network — Your machine supports booting from the network. This is an advanced installation path. Refer to 章 31, PXE 網路安裝 for additional information on this method.
注意
boot:
提示符號的畫面。 這個畫面包含了許多種不同開機選項的資訊。 每一種開機選項也有相關聯的輔助說明畫面。 如要進入該輔助說明畫面,請按下畫面底端所列出的功能鍵。
- 一旦您看到
boot:
提示符號,如果您沒有立即採取任何動作,安裝 程式將自動開始。 如要停用這個功能,請按下其中一種輔助說明畫面的功能鍵。 - 如果您按下一個輔助說明畫面的功能鍵,從開機媒體讀取輔助說明畫面時將會有些許延遲。
4.3.2. 在 Itanium 系統上啟動安裝程式
4.3.2.1. 從 DVD/CD-ROM 光碟啟動安裝程式
- 移除除了 Red Hat Enterprise Linux CD-ROM #1 的所有媒體。
- 請在 Boot Option 的選單選擇 EFI Shell。
- At the
Shell>
prompt, change to the file system on the CD-ROM. For example, in the above samplemap
output, the system partition on the CD-ROM isfs1
. To change to thefs1
file system, typefs1:
at the prompt. - 請輸入
elilo linux
以啟動安裝程式。 - Go to 章 4, 在 Intel® 和 AMD 系統上進行安裝 to begin the installation.
4.3.2.2. 從 LS-120 磁碟片啟動安裝程式
dd if=boot.img of=/dev/hda bs=180k
/dev/hda
。
- 請放入您從開機映像檔案
boot.img
建立的 LS-120 磁碟片,假如 您正要執行本機光碟機的安裝,不過是從 LS-120 磁碟片開機,也請放入 Red Hat Enterprise Linux CD # 1。如果您要執行硬碟 NFS、FTP 或 HTTP 安裝,您並不需要光碟片。 - 請在 Boot Option 的選單選擇 EFI Shell。
- At the
Shell>
prompt, change the device to the LS-120 drive by typing the commandfs0:
, using the examplemap
output above. - 請輸入
elilo linux
以啟動安裝程式。 - Go to 章 4, 在 Intel® 和 AMD 系統上進行安裝 to begin the installation.
4.3.3. 額外的開機選項
elilo linux option
注意
linux text
- ISO images have an md5sum embedded in them. To test the checksum integrity of an ISO image, at the installation boot prompt, type:
linux mediacheck
安裝程式會要您放入要測試的 CD 或 ISO 映像檔,然後選取確定以執行校驗值的檢驗操作。這個校驗值的操作可用在任何 Red Hat Enterprise Linux 的 CD,而且沒有特定的操作順序(例如,您不一定要先檢驗CD-ROM #1 )。強烈建議您在任何從下載的 ISO 映像檔建立的 Red Hat Enterprise Linux 光碟上執行這項操作。這個程序可運用在 CD、DVD、硬碟 ISO、以及 NFS ISO 等安裝方式。 - Also in the
images/
directory is theboot.iso
file. This file is an ISO image than can be used to boot the installation program. To use theboot.iso
, your computer must be able to boot from its CD-ROM drive, and its BIOS settings must be configured to do so. You must then burn theboot.iso
file onto a recordable/rewriteable CD-ROM. linux console=<device>
如要使用文字模式安裝,請輸入:linux text console=<device>
In the above command, <device> should be the device you are using (such as ttyS0 or ttyS1). For example,linux text console=ttyS0
.Text mode installations using a serial terminal work best when the terminal supports UTF-8. Under UNIX and Linux, Kermit supports UTF-8. For Windows, Kermit '95 works well. Non-UTF-8 capable terminals works as long as only English is used during the installation process. An enhanced serial display can be used by passing theutf8
command as a boot-time option to the installation program. For example:linux console=ttyS0 utf8
4.3.3.1. 核心選項
linux updates
linux text updates
rhupdates/
放置在伺服器中,則不需要使用這個指令。
4.4. 選擇一個安裝方式
- DVD/CD-ROM 安裝
- If you have a DVD/CD-ROM drive and the Red Hat Enterprise Linux CD-ROMs or DVD you can use this method. Refer to 節 4.5, “從 DVD/CD-ROM 安裝”, for DVD/CD-ROM installation instructions.
- 硬碟
- If you have copied the Red Hat Enterprise Linux ISO images to a local hard drive, you can use this method. You need a boot CD-ROM (use the
linux askmethod
boot option). Refer to 節 4.6, “從硬碟安裝”, for hard drive installation instructions. - NFS
- If you are installing from an NFS server using ISO images or a mirror image of Red Hat Enterprise Linux, you can use this method. You need a boot CD-ROM (use the
linux askmethod
boot option). Refer to 節 4.8, “經由 NFS 安裝” for network installation instructions. Note that NFS installations may also be performed in GUI mode. - FTP
- If you are installing directly from an FTP server, use this method. You need a boot CD-ROM (use the
linux askmethod
boot option). Refer to 節 4.9, “經由 FTP 安裝”, for FTP installation instructions. - HTTP
- If you are installing directly from an HTTP (Web) server, use this method. You need a boot CD-ROM (use the
linux askmethod
boot option). Refer to 節 4.10, “經由 HTTP 安裝”, for HTTP installation instructions.
4.5. 從 DVD/CD-ROM 安裝
注意
4.5.1. 如果找不到 IDE CD-ROM 的話,該怎麼辦?
boot:
提示符號輸入 linux hdX=cdrom
。將 X
改為下列其中一字母,依介面所連接的單位而定,以及它的設定為 master 或 slave(亦稱主和副):
a
— 第一個 IDE 控制卡、masterb
— 第一個 IDE 控制卡、slavec
— 第二個 IDE 控制卡、masterd
— 第二個 IDE 控制卡、slave
4.6. 從硬碟安裝
圖形 4.3. 硬碟安裝中的選擇分割區對話視窗
/
. If the ISO images are located in a subdirectory of a mounted partition, enter the name of the directory holding the ISO images within that partition. For example, if the partition on which the ISO images is normally mounted as /home/
, and the images are in /home/new/
, you would enter /new/
.
4.7. 執行網路安裝
圖形 4.4. TCP/IP 設定
4.8. 經由 NFS 安裝
example.com
網域中名為 eastcoast
的主機進行安裝的話,請在 NFS 伺服器 欄位中輸入 eastcoast.example.com
。
/export/directory/
.
RedHat
目錄的路徑。(如果您不知道這個目錄的路徑,請向您的系統管理員詢問。)舉例來說,如果您的 NFS 伺服器包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch,例如 i386, ia64, ppc 或 s390)。如果所指定的數值都正確的話,將會出現一個訊息指出 Red Hat Enterprise Linux 的安裝程式正在執行中。
圖形 4.5. NFS 設定對話視窗
4.9. 經由 FTP 安裝
圖形 4.6. FTP 設定對話視窗
variant/
所在的安裝目錄名稱。舉例來說,如果該 FTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
4.10. 經由 HTTP 安裝
variant/
所在的安裝目錄名稱。 舉例來說,如果該 HTTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390x)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
圖形 4.7. HTTP 設定對話視窗
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
4.11. 歡迎使用 Red Hat Enterprise Linux
4.12. 選擇語言
圖形 4.8. 選擇語言
4.13. 鍵盤設定
圖形 4.9. 鍵盤設定
注意
system-config-keyboard
指令以開始 鍵盤設定工具。如果您不是管理員則會要求您輸入管理提示碼才能繼續。
4.14. 輸入安裝號碼
圖形 4.10. Installation Number
4.15. 磁碟分割設定
警告
/var/spool/up2date/
。 如果您選擇手動分割磁碟,並且另外建立一個 /var/
分割區,請確定該分割區容量夠大(3.0 GB 以上)以容納下載的更新套件。
圖形 4.11. 磁碟分割設定
警告
4.16. 進階儲存選項
圖形 4.12. 進階儲存選項
圖形 4.13. 設定 ISCSI 參數
4.17. 建立預設配置
- 移除系統上所有選取的分割區並建立預設配置 — 使用這選項移除硬碟上所有分割區(包括其它作業系統建立的分割區,例如由 微軟視窗 所建立的 VFAT 或 NTFS 分割區)。
警告
如果您選取這個選項,在所選取硬碟上的所有資料都會被安裝程式移除。 如果在要安裝 Red Hat Enterprise Linux 的硬碟上有您想要保留的資料,請不要選擇這個選項。 - 移除系統上的 Linux 分割區並建立預設配置 — 使用這選項移除所有之前建立的 Linux 分割區。這選項不會移除硬碟上的其它分割區(例如 VFAT 或 FAT32 分割區)。
- 在可磁碟的可用空間上建立預設配置 — 如果您的硬碟上有足夠的剩餘空間,選擇這個選項以保留您目前的資料與分割區。
圖形 4.14. 建立預設配置
警告
注意
/boot/
分割區建立在 RAID 陣列之外,例如在另一顆硬碟上。該硬碟必須為一個內置式硬碟。
/boot/
分割區。
/boot/
分割區。
4.18. 磁碟分割您的系統
注意
注意
/boot/efi/
partition of approximately 100 MB and of type FAT (VFAT), a swap partition of at least 512 MB, and an appropriately-sized root (/
) partition.
圖形 4.15. 在 x86、 AMD64 和 Intel® 64 系統上使用 Disk Druid 執行磁碟分割
4.18.1. 硬碟的圖形顯示
4.18.2. Disk Druid's Buttons
- 新增:用來要求新增一個分割區。當選取時,會出現一個對話視窗,並包含必須要填入資訊的欄位(例如,掛載點與分割區大小)。
- 編輯:用來更改目前在 分割區 部份選取之分割區的屬性。選取 編輯 將會開啟一個對話視窗。可以編輯部份或全部的欄位,依照於分割區的資訊是否已經被寫入到磁碟。您也可以編輯出現在圖形中的剩餘空間,從那些空間來建立一個新的分割區。您可以選取剩餘空間然後選擇 編輯 按鈕,或雙點選這些剩餘空間以編輯它。
- 要建立一個 RAID 裝置,您必須先建立(或使用既有的)軟體 RAID 分割區。在您已經建立兩個或更多的軟體 RAID 分割區之後,請點選 RAID 來結合軟體 RAID 分割區成為一個 RAID 裝置。
- 刪除:使用來移除 在 目前磁碟分割區 選取的分割區。您將會被要求確認任何分割區的刪除。
- 還原:使用來回復 Disk Druid 到它原先的狀態。如果您 還原 這個分割區,所有已做的變更都將會遺失。
- RAID:使用來提供多餘資料(redundancy)給任何或所有磁碟分割區。除非您有使用 RAID 的經驗,否則不建議您使用。 更多相關 RAID 的資訊,請參照 Red Hat Enterprise Linux Deployment Guide。要建立一個 RAID 裝置,您必須先建立軟體 RAID 分割區。一旦您已經建立兩個或更多的軟體 RAID 分割區,選擇 RAID,來連接軟體 RAID 分割區到一個 RAID 裝置。
- LVM:讓您可以建立一個 LVM 邏輯磁區。LVM(Logical Volume Manager)的功能是用來呈現其所包含的實體儲存空間(例如一個硬碟)的一個簡單的邏輯檢視。LVM 管理個別的實體磁碟 — 或更明白的就是說在它們其內所含的個別分割區。除非您有使用 LVM 的經驗,否則不建議您使用。 更多相關 LVM 的資訊,請參照 Red Hat Enterprise Linux System Administration Guide。請注意,您只能在圖形安裝程式內設定 LVM。要建立一個 LVM 邏輯磁區,您必須先建立實體磁區(LVM)類型的分割區。在您建立好一個或更多的實體磁區(LVM)分割區之後,請選擇 LVM 來建立一個 LVM 的邏輯磁區。
4.18.3. 分割區的欄位
- Device: This field displays the partition's device name.
- Mount Point/RAID/Volume: A mount point is the location within the directory hierarchy at which a volume exists; the volume is "mounted" at this location. This field indicates where the partition is mounted. If a partition exists, but is not set, then you need to define its mount point. Double-click on the partition or click the Edit button.
- Type: This field shows the partition's file system type (for example, ext2, ext3, or vfat).
- 格式化:這個欄位表示是否要格式化建立好的分割區。
- Size (MB): This field shows the partition's size (in MB).
- 開始:這個欄位顯示這個分割區在您的硬碟上起始的磁柱。
- 結束:這個欄位顯示這個分割區在您的硬碟上結束的磁柱。
4.18.4. 建議的磁碟分割摘要
4.18.4.1. Itanium 系統
- 一個
/boot/efi/
分割區(至少 100 MB)— 掛載在/boot/efi/
的分割區含有所有已安裝的核心、initrd 映像檔,以及 ELILO 設定檔案。警告
您必須建立一個至少 100 MB 且為 VFAT 類型的/boot/efi/
分割區,以當作第一個主要分割區。 - swap 分割區(至少 256 MB) — swap 分割區是用來當作虛擬記憶體的。換句話說,當系統記憶體不足,電腦需要空間處理現有工作時,就會把非執行中的資料寫到 swap 分割區去。如果您不確定 swap 分割區的容量,請建立兩倍於搭載於電腦記憶體容量。必須為 swap 類別。建立適當 swap 大小,有以下幾種考量(以重要性來排列):
- 在這台電腦上執行的應用程式。
- 這台電腦的實際記憶體容量。
- 作業系統版本。
swap 空間應該是實際記憶體的兩倍大,但實體記憶體以 2 GB 為上限;如果實體記憶體超過 2 GB,那麼 swap 空間的計算方式為:2 GB 以下的實體記憶體加倍,加上剩下超過 2 GB 的實體記憶體大小。但無論如何,swap 都不該小於 32 MB。因此,如果:M = 記憶體容量(以 GB 為單位)、並且 S = swap 容量(以GB為單位),則If M < 2 S = M *2 Else S = M + 2
依據這公式,有 2 GB 記憶體電腦的 swap 大小應該是 4 GB(2x2 = 4);而擁有 3 GB 記憶體大小的電腦,swap 大小則是 5 GB(2x2 + (3-2)x1)。如果您之後打算增加記憶體,那麼設置較大的 swap 空間,是比較具有計畫的作法。對於使用大量記憶體(超過 32 GB)的系統來說,您可以使用較小的 swap 分割區(大約實際記憶體的同等大小,或更少)。 - A root partition (3.0 GB - 5.0 GB) — this is where "
/
" (the root directory) is located. In this setup, all files (except those stored in/boot/efi
) are on the root partition.一個 3.0 GB 的 root 分割區相當於最小安裝;而 5.0GB 的 root 分割區將允許您安裝全部的套件群組。
4.18.4.2. x86、AMD64 和 Intel® 64 系統
- swap 分割區(至少 256 MB) — swap 分割區是用來當作虛擬記憶體的。換句話說,當系統記憶體不足,電腦需要空間處理現有工作時,就會把非執行中的資料寫到 swap 分割區去。如果您不確定 swap 分割區的容量,請建立兩倍於搭載於電腦記憶體容量。必須為 swap 類別。建立適當 swap 大小,有以下幾種考量(以重要性來排列):
- 在這台電腦上執行的應用程式。
- 這台電腦的實際記憶體容量。
- 作業系統版本。
swap 空間應該是實際記憶體的兩倍大,但實體記憶體以 2 GB 為上限;如果實體記憶體超過 2 GB,那麼 swap 空間的計算方式為:2 GB 以下的實體記憶體加倍,加上剩下超過 2 GB 的實體記憶體大小。但無論如何,swap 都不該小於 32 MB。因此,如果:M = 記憶體容量(以 GB 為單位)、並且 S = swap 容量(以GB為單位),則If M < 2 S = M *2 Else S = M + 2
依據這公式,有 2 GB 記憶體電腦的 swap 大小應該是 4 GB(2x2 = 4);而擁有 3 GB 記憶體大小的電腦,swap 大小則是 5 GB(2x2 + (3-2)x1)。如果您之後打算增加記憶體,那麼設置較大的 swap 空間,是比較具有計畫的作法。對於使用大量記憶體(超過 32 GB)的系統來說,您可以使用較小的 swap 分割區(大約實際記憶體的同等大小,或更少)。 /boot/
分割區(100 MB) — 這個分割區掛載於/boot/
,並包含了執行系統核心(讓您的系統啟動 Red Hat Enterprise Linux)與啟動程式進行中所需的檔案。由於條件限制,必須建立一個原有的 ext3 分割區來保存這些檔案。對於大部分的使用者,100 MB 開機分割區即足夠。注意
如果您的硬碟大於 1024 磁柱的空間(而且您的系統是兩年多前製造的),您想要/
(root)分割區使用硬碟上所有剩餘的空間,您也許想要建立一個/boot/
分割區。注意
如果您擁有一張 RAID 控制卡,請注意某些 BIOS 並不支援從 RAID 控制卡開機,在這種情況下,必須建立/boot/
分割區在 RAID 陣列之外,例如在另一顆硬碟上。- A
root
partition (3.0 GB - 5.0 GB) — this is where "/
" (the root directory) is located. In this setup, all files (except those stored in/boot
) are on the root partition.一個 3.0 GB 的 root 分割區相當於最小安裝;而 5.0GB 的 root 分割區將允許您安裝全部的套件群組。
4.18.5. 新增分割區
注意
圖形 4.16. 建立一個新的分割區
- Mount Point: Enter the partition's mount point. For example, if this partition should be the root partition, enter
/
; enter/boot
for the/boot
partition, and so on. You can also use the pull-down menu to choose the correct mount point for your partition. For a swap partition the mount point should not be set - setting the filesystem type to swap is sufficient. - File System Type: Using the pull-down menu, select the appropriate file system type for this partition. For more information on file system types, refer to 節 4.18.5.1, “檔案系統的類型”.
- Allowable Drives: This field contains a list of the hard disks installed on your system. If a hard disk's box is highlighted, then a desired partition can be created on that hard disk. If the box is not checked, then the partition will never be created on that hard disk. By using different checkbox settings, you can have Disk Druid place partitions where you need them, or let Disk Druid decide where partitions should go.
- 大小(MB):輸入分割區的大小(以 MB 為單位)。請注意,這個欄位最小為 100 MB;除非變更它,否則只會建立 100 MB 的分割區。
- Additional Size Options: Choose whether to keep this partition at a fixed size, to allow it to "grow" (fill up the available hard drive space) to a certain point, or to allow it to grow to fill any remaining hard drive space available.如果您選擇 填滿分割區直到 (MB),您必須在這個選項右邊的欄位中提供大小的限制。 這將使得您可以保留某些硬碟上的剩餘空間以便將來使用。
- Force to be a primary partition: Select whether the partition you are creating should be one of the first four partitions on the hard drive. If unselected, the partition is created as a logical partition. Refer to 節 25.1.3, “分割區中的分割區 - 延伸分割區的概論”, for more information.
- 確定:一旦您對設定已經滿意,而且希望要建立這個分割區,請選擇 確定。
- 取消:如果您不想建立這個分割區,請選擇取消。
4.18.5.1. 檔案系統的類型
- ext2 — 一個 ext2 的檔案系統支援標準的 Unix 檔案類型(一般檔案、目錄、符號連結等等)。它提供了支援長檔名的能力,可到 255 個字元。
- ext3 — ext3 檔案系統是以 ext2 檔案系統為基礎,並且有一個最大的優點 — 日誌檔案系統(journaling)。使用日誌式的檔案系統,將減少在系統當機後因為已不再需要做
fsck
,所以可以降低回復檔案系統的時間。[2] 檔案系統。因此安裝程式將會預設選取 ext3 檔案系統,並且強烈建議您使用它。 - 實體磁區 (LVM) — 建立一個或更多的實體磁區(LVM)分割區,使您可以建立一個 LVM 的邏輯磁區。當您使用實體硬碟時,LVM 可以增進系統效能。更多 LVM 相關資訊,請參照Red Hat Enterprise Linux Deployment Guide。
- 軟體 RAID — 建立兩個或以上的軟體 RAID 分割區可以讓您建立一個 RAID 裝置。更多 RAID 裝置的相關資訊,請參考在 Red Hat Enterprise Linux Deployment Guide 中的 RAID(磁碟陣列) 章節。
- swap — Swap 分割區是用來支援虛擬記憶體。換句話說,當實體記憶體不足以儲存系統正在處理的資料時,資料將寫入一個 swap 分割區。更多相關資訊請參照 Red Hat Enterprise Linux Deployment Guide。
- vfat — VFAT 檔案系統是一種 Linux 的檔案系統,它相容於在 FAT 檔案系統上微軟視窗的長檔名。在 Itanuim 系統上,這個檔案系統必須在
/boot/efi
分割區上執行。
4.18.6. 編輯分割區
注意
4.18.7. 刪除一個分割區
4.19. x86, AMD64, 和 Intel® 64 的開機管理程式設定
圖形 4.17. 開機管理程式設定
警告
Red Hat Enterprise Linux
(for GRUB). Other partitions may also have boot labels. To add or change the boot label for other partitions that have been detected by the installation program, click once on the partition to select it. Once selected, you can change the boot label by clicking the Edit button.
注意
4.19.1. 進階開機管理程式設定
- The master boot record (MBR) — This is the recommended place to install a boot loader, unless the MBR already starts another operating system loader, such as System Commander. The MBR is a special area on your hard drive that is automatically loaded by your computer's BIOS, and is the earliest point at which the boot loader can take control of the boot process. If you install it in the MBR, when your machine boots, GRUB presents a boot prompt. You can then boot Red Hat Enterprise Linux or any other operating system that you have configured the boot loader to boot.
圖形 4.18. 安裝開機管理程式
注意
/boot/
分割區同一顆磁碟上的 MBR。
/boot/
分割區上的 1024 磁柱限制。 如果您有一個系統可支援 LBA32 延伸以啟動在 1024 磁柱以外的作業系統,而且您想將 /boot/
分割區放置在 1024 磁柱以外,您應該要選擇這個選項。
注意
/boot
Linux 分割區以用來啟動 Linux,至於其它的 Linux 分割 區則可以配置在 1024 磁柱之後。
parted
程式中,1024 磁柱等於 528MB,如需更多資訊,請參考:
http://www.pcguide.com/ref/hdd/bios/sizeMB504-c.html
4.19.2. 救援模式
- 使用 CD-ROM 光碟來啟動 x86, AMD64, 或 Intel® 64 系統。在安裝開機提示符號輸入
linux rescue
Itanium使用者應輸入elilo linux rescue
以進入救援模式。
4.19.3. 可供選擇的開機管理程式
- LOADLIN
- 您可以從 MS-DOS 載入 Linux。很不幸的,您需要一份 Linux 的核心(以及一個初始的 RAM 磁碟,如果您有 SCSI 介面卡的話)在一個 MS-DOS 的分割區上。實現這個的唯一方式就是使用其它方法(例如,從開機磁碟片)來啟動您的 Red Hat Enterprise Linux 系統,然後再將核心複製到一個 MS-DOS 分割區。LOADLIN 可在以下位址取得以及其它的映射站台。
- SYSLINUX
- SYSLINUX 是一種 MS-DOS 的程式,它非常類似 LOADLIN。它也可在以下位址取得以及其它的映射站台。
- Commercial boot loaders
- 您可以使用商用的開機管理程式載入 Linux。例如,System Commander 與 Partition Magic 都可用來啟動 Linux (仍然需要安裝 GRUB 在您的 Linux root 分割區上)。
注意
4.19.4. SMP 主機板與 GRUB
4.20. 網路設定
圖形 4.19. 網路設定
圖形 4.20. 編輯網路裝置
注意
注意
localhost
。
注意
system-config-network
指令以開始 網路管理工具。如果您不是 root 身份登入則會要求您輸入root 密碼才能繼續。
4.21. 時區設定
- 藉由滑鼠點選互動式地圖,在城市間切換(以黃點標示)。紅色的X表示您目前的選擇。
- 您也可以捲動螢幕下方的選單,選擇您的時區。請用滑鼠點選您的所在位置。
注意
system-config-date
指令,以啟動時間與日期設定工具。如果您不是 root 身份登入,系統將會要求您輸入root 的密碼。
timeconfig
指令。
4.22. 設定 Root 密碼
注意
圖形 4.21. Root 密碼
su -
指令以轉換成 root。這些基本的原則將會減少因打字錯誤或不當的指令造成系統毀損的機會。
注意
su -
指令後按下 Enter 鍵。然後輸入 root 的密碼,再按下 Enter 鍵即可。
注意
注意
system-config-rootpassword
指令以啟動 Root Password Tool。如果您不是 root,系統將會提示您輸入 root 的密碼以繼續。
4.23. 選取套件群組
注意
圖形 4.22. 選取套件群組
圖形 4.23. 套件群組的細節
4.24. 準備安裝
4.24.1. 準備安裝
/root/install.log
找到一份完整的安裝紀錄。
警告
4.25. 安裝套件
4.26. 安裝完成
- 按下 Enter — 將啟動預設的開機紀錄。
- 選取一個開機標籤,再按下 Enter — 將使得開機管理程式啟動對應到該開機標籤的作業系統。
- Do nothing — after the boot loader's timeout period, (by default, five seconds) the boot loader automatically boots the default boot entry.
login:
的提示符號或圖形介面的登入畫面(如果您有安裝 X 視窗系統而且選擇預設開機進入圖形模式的話)。
4.27. Itanium 系統 — 啟動您的機器以及後安裝的設定
elilo
elilo
後,將會載入 /boot/efi/elilo.conf
設定檔案中所列出的預設核心。(檔案中所列出的第一個核心為預設的。)
elilo
之後輸入 /boot/efi/elilo.conf
檔案中所列出核心的標籤名稱。 例如,當您要載入名稱為 linux
的核心,請輸入:
elilo linux
/boot/efi/elilo.conf
檔案:
- At the
Shell>
prompt, change devices to the system partition (mounted as/boot/efi
in Linux). For example, iffs0
is the system boot partition, typefs0:
at the EFI Shell prompt. - Type
ls
at thefs0:\>
to make sure you are in the correct partition. - 然後輸入:
Shell>
type elilo.conf
這個指令顯示出設定檔案的內容,每一個區段都含有以label
開頭的一行,後面接著該核心的標籤名稱。 這裡的標籤名稱就是您用來啟動不同核心 在elilo
之後所輸入的。
4.27.1. 後安裝的開機管理程式選項
single
以進入單機使用者模式,或者是 mem=1024M
以強制 Red Hat Enterprise Linux 使用 1024MB 的記憶體。 如要傳送選項到開機管理程式,請在 EFI Shell 提示符號輸入 下列資訊(請以您想要開機之核心的標籤名稱取代 linux
, 以 您想要傳送到核心的開機選項取代 option
):
elilo linux option
4.27.2. 自動啟動 Red Hat Enterprise Linux
elilo
以及任何的開機選項。然而如果您希望設定您的系統以自動開機進入 Red Hat Enterprise Linux,您需要設定 EFI 開機管理程式。
- 啟動 Itanium 系統,然後在 EFI 開機管理程式 選單中選擇 開機選項維護選單。
- 從主選單中選擇 新增一個開機選項。
- 選取在 Linux 中掛載為
/boot/efi/
的系統分割區。 - 選取
elilo.efi
檔案。 - 在
輸入新的描述:
提示符號下,輸入Red Hat Enterprise Linux Red Hat Enterprise Linux 5
或者是您想要出現在 EFI 開機管理程式 選單的任何名稱。 - 在
輸入開機選項資料類型
的提示符號下,輸入N
表示 無開機選項(當您不想要傳送選項到 ELILO 開機管理程式時)。這個選項對大部分的情況幾乎都可使用,如果您想要傳送選項到開機管理程式,您也可以在/boot/efi/elilo.conf
設定檔案中設定它。 - 在
儲存變更到 NVRAM
提示符號回答Yes
, 您將會被帶回到 EFI 開機維護管理程式 的選單。 - 再來,如果您想要使得 Red Hat Enterprise Linux 5 選單項目為預設的, 在一系列的開機選項出現後,請以方向鍵選取 Red Hat Enterprise Linux 5, 再按下 u 按鍵來將它移動到清單的最頂部。 您可以藉由選取一個項目後, 再按下 d 按鍵來將它移動到清單的最底部。 在更改完開機順序後, 請選擇 儲存變更到 NVRAM,再選擇 離開 以回到主選單。
- Optionally, you can change the boot timeout value by choosing Set Auto Boot TimeOut => Set Timeout Value from the Main Menu.
- 選取 離開 以回到 EFI 開機管理程式。
4.27.2.1. 使用一個啟動程式碼
startup.nsh
的啟動程式碼,而且最後的指令必須是 elilo
以開機進入 Linux。
startup.nsh
程式碼必須位於 /boot/efi
分割區中(/boot/efi/startup.nsh
), 而且必須含有下列的文字:
echo -off your set of commands elilo
elilo
.
Shell>
prompt, change devices to the system partition (mounted as /boot/efi
in Linux). For example, if fs0
is the system boot partition, type fs0:
at the EFI Shell prompt. Type ls
to make sure you are in the correct partition. Then type edit startup.nsh
. Type the contents of the file and save it.
startup.nsh
檔案,並且使用 它來啟動系統。 如要停止 EFI 載入該檔案,請輸入 Ctrl+c。 這將會停止這個載入過程,並且帶您回到 EFI shell 提示符號。
fsck
應用程式是用來檢查檔案系統上元資料(metadata)的完整性並且可能會修復一個或多個 Linux 檔案系統。
章 5. 移除 Red Hat Enterprise Linux
注意
fdisk
公用程式,加上一個未公開的參數/mbr
,建立一份全新的主開機紀錄(MBR)。這參數只會重新寫入一份DOS分割區的主開機紀錄(MBR)。這指令看起來應該如下所示:
fdisk /mbr
fdisk
,您將會遇到 "分割區仍存在,不過它們確實已經不存在" 的問題。要移除非 DOS 分割區最好的 方法是使用不僅能辨識 DOS 分割區的工具程式。
linux rescue
。這指令會開啟救援模式。
list-harddrives
。這指令將會列出電腦上所有安裝程式能辨識的硬碟機,以及它們的大小(單位為MB - 百萬位元組)。
警告
parted
磁碟分割工具,請使用下列指令啟動 parted
,這裡的 /dev/hda 是您要移除分割區的裝置:
parted /dev/hda
print
指令來檢視目前的磁碟分割表以取得要移除之分割區的次碼(minor number):
列印
print
command also displays the partition's type (such as linux-swap, ext2, ext3, and so on). Knowing the type of the partition helps you in determining whether to remove the partition.
rm
指令來移除分割區。例如要移除次碼為 3 的分割區,請輸入:
rm 3
重要
print
指令以確認它已經從磁碟分割表中移除。
quit
以離開 parted
程式。
parted
程式後,請在開機提示符號輸入 exit
以離開救援模式並且重新啟動您的系統而不繼續安裝程式。 系統將會自動重新開機。 如果系統沒有自動重新開機,您可以同時按下 Control+Alt+Delete . 來重新啟動您的系統。
章 6. Intel® 或 AMD 系統安裝的故障排除
6.1. 您無法啟動 Red Hat Enterprise Linux
6.1.1. 您無法使用 RAID 控制卡開機嗎?
GRUB:
)與閃爍的游標。如果是這個情況,您必須要重新劃分您的分割區。
/boot
分割區,例如另一顆硬碟上。當 RAID 卡發生問題時,必須要使用一個內部的硬碟來建立分割區。
/boot/
分割區所在的硬碟上。
6.1.2. 您的系統顯示 Signal 11 的錯誤嗎?
boot:
提示符號下(Itanium 系統的用戶,請在指令前加入 elilo
),輸入以下指令:
linux mediacheck
http://www.bitwizard.nl/sig11/
6.2. 開始安裝的問題
6.2.1. 開機進入圖形安裝的問題
resolution=
boot option. This option may be most helpful for laptop users. Another solution to try is the driver=
option to specify the driver that should be loaded for your video card. If this works, it should be reported as a bug as the installer has failed to autodetect your videocard. Refer to 章 8, 其它的 Intel® 和 AMD 系統開機選項 for more information on boot options.
注意
nofb
的開機選項。這個指令也許對某些螢幕讀取硬體的存取性 來說是必要的。
6.3. 安裝中的問題
6.3.1. 無法找到安裝 Red Hat Enterprise Linux 的裝置
之錯誤訊息
無法找到安裝 Red Hat Enterprise Linux 的裝置
,很有可能是安裝程式無法辨認 SCSI 控制控制器。
6.3.2. 缺少軟碟機的情況下儲存 traceback 訊息
scp
錯誤訊息到一部遠端的系統。
/tmp/anacdump.txt
的檔案中。當方塊出現時,鍵入 Ctrl+Alt+F2
切換至一個新的 tty(虛擬主控台),並且scp
訊息寫入 /tmp/anacdump.txt
至一個已知的遠端工作系統。
6.3.3. 磁碟分割表的問題
6.3.4. 使用剩餘的空間
swap
和一個 /
(root)分割區,且您已經選取 root 分割區來使用剩餘的空間,不過它並沒有填滿整個硬碟。
/
(root)分割區使用硬碟上的所有剩餘空間,您必須建立一個 /boot
分割區。
6.3.5. 其它建立分割區的問題
- 一個
/
(root)分割區 - A <swap> partition of type swap
注意
6.3.6. 對於 Itanium 系統使用者的其它磁碟分割問題
- 一個 VFAT 類型的
/boot/efi/
分割區 - 一個
/
(root)分割區 - A <swap> partition of type swap
注意
6.3.7. 您有發現 Python 的錯誤嗎?
/tmp/
目錄之後發生。 這個錯誤看起來會類似:
Traceback (innermost last): File "/var/tmp/anaconda-7.1//usr/lib/anaconda/iw/progress_gui.py", line 20, in run rc = self.todo.doInstall () File "/var/tmp/anaconda-7.1//usr/lib/anaconda/todo.py", line 1468, in doInstall self.fstab.savePartitions () File "fstab.py", line 221, in savePartitions sys.exit(0) SystemExit: 0 Local variables in innermost frame: self: <fstab.GuiFstab instance at 8446fe0> sys: <module 'sys' (built-in)> ToDo object: (itodo ToDo p1 (dp2 S'method' p3 (iimage CdromInstallMethod p4 (dp5 S'progressWindow' p6 <failed>
/tmp/
的符號連結連到其它位置或在建立後已被更改。 這些符號連結或已更改的連結在安裝過程中無效,所以安裝程式無法寫入資訊而導致失敗。
http://www.redhat.com/support/errata/
http://rhlinux.redhat.com/anaconda/
http://bugzilla.redhat.com/bugzilla/
http://www.redhat.com/apps/activate/
6.4. 安裝後的問題
6.4.1. 在 x86 系統上有問題使用圖形化的 GRUB 畫面嗎?
/boot/grub/grub.conf
檔案。
grub.conf
檔案中,在 splashimage
那一行的最前面,加上 #
,讓整行成為註解。
b
啟動系統。
grub.conf
檔,而您所做的變更即會生效。
grub.conf
檔案中以重新啟動圖形化的開機畫面。
6.4.2. 開機進入圖形環境
startx
指令來開啟 X 視窗系統圖形化介面。
/etc/inittab
檔案,您只需更改執行層級部份的相對號碼即可。完成更改後,請重新啟動您的電腦,下次您登入時,您將可以看到圖形介面的登入畫面。
su
指令以轉換為 root。
gedit /etc/inittab
以使用 gedit 來編輯這個檔案。/etc/inittab
這個檔案將會被開啟,在第一個畫面中您將會看到類似如下的部份:
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
# id:3:initdefault:
id:3:initdefault:
這一行中的 3
為 5
。
警告
3
改為 5
)。
id:5:initdefault:
6.4.3. X 視窗系統(GUI)有問題
6.4.4. 關於 X 伺服器當掉,以及非 root 使用者的問題
df -h
df
指令可以讓您看出,哪個分割區的空間已滿。要了解更多 df
指令的詳情,以及所有選項的一覽表(例如本例的 -h
選項),請參照 df
的 man page。您只要在 shell 提示符號下,鍵入 man df
指令即可。
/home/
與 /tmp/
分割區很容易因為一般使用者的超量使用,而被塞滿。您可以刪除一些舊的檔案,以清出空間;之後再以先前不成功的使用者啟動 X 看看。
6.4.5. 當您試著要登入時的問題
linux single
的方式開機您的系統。
elilo
的開機指令。
e
以進入編輯模式。您將會看見在設定檔中您所 選取的開機標籤項目。
kernel
開頭的那行,並按下 e
以編輯該開機紀錄。
kernel
這一行的最後,加上:
single
b
以開機。
#
提示符號,您需要輸入 passwd root
,然後您便可以輸入新的 root 密碼。 再來,您可以輸入 shutdown -r now
,您的系統將會以您新的密碼重新啟動。
su -
and enter your root password when prompted. Then, type passwd <username>
. This allows you to enter a new password for the specified user account.
http://hardware.redhat.com/hcl/
6.4.6. 系統找不到您的記憶體嗎?
cat /proc/meminfo
指令來檢查。
/boot/grub/grub.conf
檔案中加入下列這一行:
mem=xxM
/boot/grub/grub.conf
檔案中,上述的例子看起來會類似以下所示:
# NOTICE: You have a /boot partition. This means that # all kernel paths are relative to /boot/ default=0 timeout=30 splashimage=(hd0,0)/grub/splash.xpm.gz title Red Hat Enterprise Linux (2.6.9-5.EL) root (hd0,0) kernel /vmlinuz-2.6.9-5.EL ro root=/dev/hda3 mem=128M
grub.conf
檔案中所做的變更將會立即生效。
e
以進入編輯模式。您將會看到您所選取的開機識別標籤設定檔中一系列的項目。
kernel
開頭的那一行並輸入 e
以編輯開機紀錄項。
kernel
那一行的最後,增加
mem=xxM
b
以開機。
elilo
的開機指令。
6.4.7. 您的印表機無法運作
system-config-printer
指令以開始 印表機設定工具。如果您不是已 root 身份登入則會要求您輸入 root 密碼才能繼續。
6.4.8. 音效設定的問題
system-config-soundcard
指令)工具。
system-config-soundcard
指令來開啟 音效卡設定工具。如果您不是以 root 身份登入,您將會收到輸入 root 密碼的提示。
6.4.9. Apache 為基礎的 httpd
服務與 Sendmail 在開機時中斷服務
httpd
或 Sendmail 服務中斷的情形,請確定在 /etc/hosts
檔案中有下列這一行:
127.0.0.1 localhost.localdomain localhost
章 7. Intel® 和 AMD 系統的驅動程式媒體
7.1. 為什麼我需要驅動程式媒體?
- 如果您需要從區塊裝置執行安裝
- 如果您要執行來自一個 PCMCIA 裝置的安裝
- 如果您在執行安裝程式請於安裝起始提示符號輸入
linux dd
(Itanium 使用者應輸入elilo linux dd
) - 如果您在一部沒有任何 PCI 裝置的電腦上執行安裝程式
7.2. 那到底甚麼是驅動程式媒體?
注意
7.3. 我該如何取得驅動程式媒體?
images/drvnet.img
— 網路卡驅動程式和 images/drvblock.img
— SCSI 控制卡的驅動程式)包含了許多一般以及極少用到的驅動程式。
注意
linux dd
開機指令,而是使用 linux dd=url
指令,這裡的 url 可以一個要使用的 HTTP、FTP 或 NFS 位址來取代。
7.3.1. 從映像檔建立驅動程式磁碟片
- 請放入一片空白且已格式化過的磁碟片(或 Itanium 系統使用者所需的 LS-120 磁碟片)在 第一個軟碟(或 LS-120)磁碟機。
- 在含有該驅動程式磁碟片映像檔的同一目錄下,例如
drvnet.img
,以 root 身份鍵入dd if=drvnet.img of=/dev/fd0
。
注意
driverdisk.img
至 USB 隨身碟。例如:
dd if=driverdisk.img of=/dev/sda
7.4. 安裝過程中使用驅動程式映像檔
boot:
prompt, enter linux dd
if using an x86 or x86-64 system. Refer to 節 4.3.1, “在 x86、AMD64 和Intel® 64 系統上啟動安裝程式。” for details on booting the installation program. For Itanium systems, at the Shell>
prompt, type elilo linux dd
. Refer to 節 4.3.2, “在 Itanium 系統上啟動安裝程式” for details on booting the installation program.
章 8. 其它的 Intel® 和 AMD 系統開機選項
boot:
提示符號輸入您想要的指令。
開機時的指令參數
askmethod
- 在從 Red Hat Enterprise Linux CD-ROM 光碟機開機後,這個指令要求您指定安裝方式。
apic
- 此項 x86 開機指令可避免在 Intel 440GX 晶片組的 BIOS 經常遇到的程式錯誤,而它只會由安裝程式的核心所執行。
apm=allow_ints
- 此項 x86 開機指令會改變系統中止服務的處理方式(這對某些筆記型電腦也許是必要的)。
apm=off
- 這個 x86 開機指令會停用進階電源管理(APM)。用於有些AMP不正常,容易造成當機的BIOS。
apm=power_off
- 這個 x86 指令將預設 Red Hat Enterprise Linux 管理系統電源(電源關閉)管理。適用於系統電原理非為預設的 SMP 系統。
apm=realmode_power_off
- 在x86-based 系統上,有些 BIOS 會在關機時出現錯誤造成當機。這個指令的更改方式如同從 微軟視窗 NT 更改為 微軟視窗 95 的方式。
dd
- 這個引數將會在安裝程式中提示您使用驅動程式磁碟片。
dd=url
- 這個參數將會在安裝程式中提示您使用位於指定 HTTP、FTP 或 NFS 網路位址的驅動程式映像檔。
display=ip:0
- 這個指令將允許遠端顯示的傳送。在這個指令中,要以您想要顯示的系統之 IP 位址取代 IP。在您想要顯示的系統上,您必須執行指令
xhost +remotehostname
,這裡的 remotehostname 就是您執行顯示來源的主機名稱。使用xhost +remotehostname
指令將會限制存取遠端的顯示終端機,而不允許沒有特定授權的任何人或系統做遠端存取。 driverdisk
- 這個指令執行與
dd
指令相同的功能,而且也會提示您在 Red Hat Enterprise Linux 安裝過程中使用驅動程式磁碟片; ide=nodma
- 這個指令停用所有 IDE 裝置上的 DMA,這適用於當您有 IDE 相關的問題時。
linux upgradeany
- 這個指令放寬部份對
/etc/redhat-release
檔案的檢查,如果/etc/redhat-release
檔案的預設值已更改,當您要升級為 Red Hat Enterprise Linux 5時,或許會無法偵測到 Red Hat Enterprise Linux 安裝。您可以在無法偵測到既有的 Red Hat Enterprise Linux 安裝時使用這個選項。 mediacheck
- 這個指令提供測試安裝來源(如果是以 ISO 安裝的方式)之完整選項。這個指令可以使用在 CD、DVD、硬碟 ISO 與 NFS ISO 等的安裝方式。在安裝前,請驗證 ISO 影像檔是否完整,能避免安裝過程中經常遇到的問題。
mem=xxxm
- 這個指令將會可置換核心偵測系統所得到的記憶體容量。這在有些只能偵測到 16MB 記憶體的舊系統,以及有些顯示卡與主機共享記憶體的新系統上很有用。當執行這個指令時,請以記憶體容量的百萬位元組取代 xxx。
nmi_watchdog=1
- 這個指令啟用內建的核心停頓偵測器。該指令可以藉由執行週期循環的無遮罩中斷(NMA)來排除強制的核心鎖定錯誤。核心可以監控任何 CPU 的鎖定,並視需要列印出除錯的訊息。
noapic
- 這個 x86 開機指令命令核心不要使用 APIC 晶片。這個指令適用於某些有不良 APIC(例如陞技 Abit BP6)或 BIOS 有問題的主機板。使用 NVIDIA nForce3 晶片組的主機板(例如華碩 ASUS SK8N)在開機偵測 IDE、或顯示其它中斷傳送時會當機。
noht
- 這個 x86 開機指令停用超執行緒(hyperthreading)。
-
nofb
- 這個指令停用碼框緩衝器( frame buffer )的支援,並且允許安裝程式在文字模式下執行,這個指令 對於存取某些螢幕讀取硬體也許是必要的。
nomce
- 這個 x86 開機指令停用在 CPU 執行的自我診斷檢查。核心預設啟用 CPU 的自我診斷(稱為 Machine Check Exception)。在有些舊的 Compaq Pentium 系統也許需要這個選項,因為它們並不支援適當的處理器錯誤檢查。至於一些其它的筆記型電腦(特別是那些使用 Radeon IGP 晶片組的),也需要這個選項。
nonet
- 這個指令停用網路硬體偵測
nopass
- 這個指令停用傳送鍵盤與滑鼠的資訊到安裝程式的第二階段。這適用於當執行網路安裝時在第二階段測試鍵盤與滑鼠的設定畫面。
nopcmcia
- 這個指令忽略系統中的所有 PCMCIA 控制卡。
noprobe
- 這個指令停用硬體偵測,而由使用者提供硬體資訊。
noshell
- 這個指令停用在安裝過程中虛擬主控台 2 的 shell 應用。
nostorage
- 這個指令停止搜尋 SCSI 和 RAID 儲存硬體。
nousb
- 這個指令停用安裝過程中載入 USB 支援。這個指令適用於安裝程式在安裝過程初期容易當機的情形。
nousbstorage
- this command disables the loading of the usbstorage module in the installation program's loader. It may help with device ordering on SCSI systems.
numa=off
- Red Hat Enterprise Linux 在 AMD64 結構上支援非均勻記憶體存取(NUMA)。雖然所有的中央處理器能夠在沒有 numa 支援下存取所有的記憶體。numa 支援展現在最新的核心上,使得記憶體分配有助於中央處理器,因此能夠將 CPU 記憶體的內部阻塞降到最低。這項技術能在某些應用程式上提供重大性能改進。回復到初始無 numa 狀態,請在 boot 選項中指定。
reboot=b
- 這個 x86, AMD64, 以及Intel® EM64T 指令會更改核心重新啟動系統的方式。如果在系統關機時發生核心當機,這個指令會使系統能夠成功的重新開機。
rescue
- this command runs rescue mode. Refer to 章 26, 基本的系統回復 for more information about rescue mode.
resolution=
- 指定安裝程式要執行的顯示模式。可輸入任何標準的解析度,例如
640x480
、800x600
、1024x768
等等。 serial
- 這個指令會開啟串列主控台的支援功能。
text
- 這個指令停用圖形安裝程式,並強制安裝程式在文字模式下執行。
updates
- 這個指令會提示您置入含有 anaconda安裝程式的更新(錯誤修正)軟碟片。如果您是執行網路安裝,並且已將更新映像檔內容放置在伺服器上的
rhupdates/
中,您則不需要使用這個指令。 updates=
- 這個指令讓您指定一個可取得 anaconda 安裝程式的更新(錯誤修復)的URL。
vnc
- 這個指令允許您從 VNC 伺服器上進行安裝。
vncpassword=
- 這個指令用來設定連線到 VNC 伺服器的密碼。
章 9. GRUB 開機管理程式
9.1. 開機管理程式與系統架構
表格 9.1. 系統架構的開機管理程式
系統架構 | 開機管理程式 |
---|---|
AMD® AMD64 | GRUB |
IBM® eServer™ System i™ | OS/400® |
IBM® eServer™ System p™ | YABOOT |
IBM® System z® | z/IPL |
IBM® System z® | z/IPL |
Intel® Itanium™ | ELILO |
x86 | GRUB |
9.2. GRUB
9.2.1. GRUB以及 x86 開機程序
- The Stage 1 or primary boot loader is read into memory by the BIOS from the MBR[4]. The primary boot loader exists on less than 512 bytes of disk space within the MBR and is capable of loading either the Stage 1.5 or Stage 2 boot loader.
- 如果有必要,1.5 階段開機管理程式會由 1 階段開機管理程式寫入記憶體中 某些硬體會需要經過緩衝階段到第 2 階段開機管理程式。尤其是當硬碟
/boot/
分割區大於 1024 磁柱,或當使用 LBA 模式時。您可以在/boot/
分割區或者一小部分於 MBR 與一小部份於/boot/
分割區。 - 第 2 階段或次開機管理程式寫入記憶體 次開機管理程式顯示在 GRUB 目錄與指令環境。這個介面允許使用者選擇要啟動哪個核心或作業系統,將參數傳至核心,或檢查系統參數。
- 次開機管理程式會將作業系統或核心以及
/boot/sysroot/
的內容寫入記憶體。在 GRUB 決定要啟始哪個作業程式或核心後,它會載入並將電腦控制權轉移給作業系統。
警告
9.2.2. GRUB 的功能
- 在 x86 主機上 GRUB 提供了全指令式的前置作業系統環境。 這個功能讓使用者在使用特殊選項載入作業程式時或擷取系統資訊時能有最大空間。數年來,許多非 x86 主機架構利用前置作業系統環境讓系統能夠從命列列上啟動。
- GRUB supports Logical Block Addressing (LBA) mode. LBA places the addressing conversion used to find files in the hard drive's firmware, and is used on many IDE and all SCSI hard devices. Before LBA, boot loaders could encounter the 1024-cylinder BIOS limitation, where the BIOS could not find a file after the 1024 cylinder head of the disk. LBA support allows GRUB to boot operating systems from partitions beyond the 1024-cylinder limit, so long as the system BIOS supports LBA mode. Most modern BIOS revisions support LBA mode.
- GRUB can read ext2 partitions. This functionality allows GRUB to access its configuration file,
/boot/grub/grub.conf
, every time the system boots, eliminating the need for the user to write a new version of the first stage boot loader to the MBR when configuration changes are made. The only time a user needs to reinstall GRUB on the MBR is if the physical location of the/boot/
partition is moved on the disk. For details on installing GRUB to the MBR, refer to 節 9.3, “安裝 GRUB ”.
9.3. 安裝 GRUB
/sbin/grub-install <location>
, where <location> is the location that the GRUB Stage 1 boot loader should be installed. For example, the following command installs GRUB to the MBR of the master IDE device on the primary IDE bus:
/sbin/grub-install /dev/hda
重要
9.4. GRUB 專業用語
9.4.1. 裝置名稱
(<type-of-device><bios-device-number>,<partition-number>)
hd
for a hard disk or fd
for a 3.5 diskette. A lesser used device type is also available called nd
for a network disk. Instructions on configuring GRUB to boot over the network are available online at http://www.gnu.org/software/grub/manual/.
0
and a secondary IDE hard drive is numbered 1
. This syntax is roughly equivalent to that used for devices by the kernel. For example, the a
in hda
for the kernel is analogous to the 0
in hd0
for GRUB, the b
in hdb
is analogous to the 1
in hd1
, and so on.
0
. However, BSD partitions are specified using letters, with a
corresponding to 0
, b
corresponding to 1
, and so on.
注意
0
開始而非 1
。新使用者最常犯的錯誤就是將這裡弄錯。
(hd0)
然後次硬碟為 (hd1)
。以此類推 GRUB 會認定主硬碟上得主分割區為 (hd0,0)
,次硬碟上的第三分割區為 (hd1,2)
。
- 不論是 IDE 或是 SCSI,所有硬碟都以
hd
開頭。fd
是指 3.5 磁碟。 - 指定一個裝置的所有分割區,請不要填入逗號與分割區編號。但命令 GRUB 來為特定磁碟設定 MBR 是很重要的。例如,
(hd0)
指定 MBR 在主裝置上,(hd3)
指定 MBR 在第四裝置上。 - 如果系統上有多個磁碟裝置,知道 BIOS 中的磁碟開機順序是很重要的。如果系統僅用 IDE 或 SCSI 裝置並不複雜,但如果多種不同裝置類型,則選擇搭載開機分割區的磁碟類型為先就變得十分重要。
9.4.2. 檔案名稱與區塊表
(<device-type><device-number>,<partition-number>)</path/to/file>
hd
, fd
, or nd
. Replace <device-number> with the integer for the device. Replace </path/to/file> with an absolute path relative to the top-level of the device.
0+50,100+25,200+1
(hd0,0)+1
chainloader
指令:
chainloader +1
9.4.3. Root 檔案系統與 GRUB
/grub/
目錄中的映像檔 (hd0,0)/grub/splash.xpm.gz
於(hd0,0)
分割區(系統的 /boot/
分割區)的最高層級(或是 root)。
kernel
指令。在 Linux 核心啟動後,它會設定為 Linux 使用者所熟悉的 root 檔案系統。原始的 GRUB root 檔案系統與他的掛載則會被忽略,他們僅會在啟動核心檔案時出現。
9.5. GRUB 介面
注意
- Menu Interface
- 此為當 GRUB 由安裝程式設定的預設介面。一個作業系統或預先設定核心的選單會以列表模式顯示,並依照名稱排序。使用方向鍵選擇作業系統或是核心版本並按下 Enter 鍵來啟動。如果您的畫面沒有顯示任何東西,在等待時間過後 GRUB 會載入預設選項。按 e 鍵來進入編輯介面,或者 c 鍵來載入指令列介面。Refer to 節 9.7, “GRUB選單設定檔案” for more information on configuring this interface.
- Menu Entry Editor Interface
- 請在開機管理程式選單上按 e 鍵來進入選單項目編輯器。該項目的 GRUB 指令會在此顯示,此外 使用者也許會在啟動作業系統前,經由新增指令列(o在目前的指令裂下新增指令列,O為插入指令列)、編輯(e)或者刪除(d)指令列更改這些指令列 。在完成更改後,b鍵執行指令並啟動作業系統。Esc 鍵放棄所有更改並重新載入標準選單介面。c 鍵載入指令列介面。
注意
For information about changing runlevels using the GRUB menu entry editor, refer to 節 9.8, “Changing Runlevels at Boot Time”. - Command Line Interface
- 指令列介面是最基礎的 GRUB 介面,但也是功能最完整的介面。在指令列下只要輸入正確的 GRUB 命列並按下 Enter 鍵就能執行該項指令。介面也有像 shell 模式的功能,包括了 Tab 鍵自動完成,以及 Ctrl 組合鍵,例如 Ctrl+a 來移動至列首、Ctrl+e 移動至列尾。另外方向鍵、Home、End 與 Delete 也能如在
bash
shell 下一樣使用。Refer to 節 9.6, “GRUB 指令” for a list of common commands.
9.5.1. 介面載入順序
9.6. GRUB 指令
boot
— 啟動作業系統或最後載入的連續載入器。chainloader </path/to/file>
— Loads the specified file as a chain loader. If the file is located on the first sector of the specified partition, use the blocklist notation,+1
, instead of the file name.下列為範例chainloader
指令:chainloader +1
displaymem
— 依據 BIOS 的資訊,顯示目前使用中的記憶體。這適用於在開機前決定系統需要多少記憶體。initrd </path/to/initrd>
— Enables users to specify an initial RAM disk to use when booting. Aninitrd
is necessary when the kernel needs certain modules in order to boot properly, such as when the root partition is formatted with the ext3 file system.下列為一initrd
指令範例:initrd /initrd-2.6.8-1.523.img
install <stage-1> <install-disk> <stage-2>
— Installs GRUB to the system MBR.p
config-file<stage-1>
— Signifies a device, partition, and file where the first boot loader image can be found, such as(hd0,0)/grub/stage1
.<install-disk>
— Specifies the disk where the stage 1 boot loader should be installed, such as(hd0)
.<stage-2>
— Passes the stage 2 boot loader location to the stage 1 boot loader, such as(hd0,0)/grub/stage2
.p
<config-file>
— This option tells theinstall
command to look for the menu configuration file specified by<config-file>
, such as(hd0,0)/grub/grub.conf
.
警告
install
指令覆蓋任何已經存在 MBR 的資訊。kernel </path/to/kernel> <option-1> <option-N>
... — Specifies the kernel file to load when booting the operating system. Replace </path/to/kernel> with an absolute path from the partition specified by the root command. Replace <option-1> with options for the Linux kernel, such asroot=/dev/VolGroup00/LogVol00
to specify the device on which the root partition for the system is located. Multiple options can be passed to the kernel in a space separated list.下列為kernel
指令範例:kernel /vmlinuz-2.6.8-1.523 ro root=/dev/VolGroup00/LogVol00
上個範例中的選項指定位於hda5
分割區的 Linux root 檔案系統。root (<device-type><device-number>,<partition>)
— Configures the root partition for GRUB, such as(hd0,0)
, and mounts the partition.下列為root
指令範例:root (hd0,0)
rootnoverify (<device-type><device-number>,<partition>)
— Configures the root partition for GRUB, just like theroot
command, but does not mount the partition.
help --all
來瀏覽其它可用的指令。有關於 GRUB 指令,請參照網上文件 http://www.gnu.org/software/grub/manual/。
9.7. GRUB選單設定檔案
/boot/grub/grub.conf
), which is used to create the list of operating systems to boot in GRUB's menu interface, essentially allows the user to select a pre-set group of commands to execute. The commands given in 節 9.6, “GRUB 指令” can be used, as well as some special commands that are only available in the configuration file.
9.7.1. 設定檔結構
/boot/grub/grub.conf
。這個指令將選單介面的通用參數放置於檔案的上端,接著為每個作業核心的小節或選單上列出的作業系統。
default=0 timeout=10 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.18-2.el5PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.18-2.el5PAE ro root=LABEL=/1 rhgb quiet initrd /boot/initrd-2.6.18-2.el5PAE.img # section to load Windows title Windows rootnoverify (hd0,0) chainloader +1
注意
title
行。在上個範例中,如於將 微軟視窗
扇區設為預設,將 default=0
更改為 default=1
。
9.7.2. 設定檔指令
chainloader </path/to/file>
— Loads the specified file as a chain loader. Replace </path/to/file> with the absolute path to the chain loader. If the file is located on the first sector of the specified partition, use the blocklist notation,+1
.color <normal-color> <selected-color>
— Allows specific colors to be used in the menu, where two colors are configured as the foreground and background. Use simple color names such asred/black
. For example:color red/black green/blue
default=<integer>
— Replace <integer> with the default entry title number to be loaded if the menu interface times out.fallback=<integer>
— Replace <integer> with the entry title number to try if the first attempt fails.hiddenmenu
— 使 GRUB 選單介面不會顯示,在timeout
時間過期時載入default
項目。使用者可以按 Esc 鍵來瀏覽標準 GRUB 選單。initrd </path/to/initrd>
— Enables users to specify an initial RAM disk to use when booting. Replace </path/to/initrd> with the absolute path to the initial RAM disk.kernel </path/to/kernel> <option-1> <option-N>
— Specifies the kernel file to load when booting the operating system. Replace </path/to/kernel> with an absolute path from the partition specified by the root directive. Multiple options can be passed to the kernel when it is loaded.password=<password>
— Prevents a user who does not know the password from editing the entries for this menu option.Optionally, it is possible to specify an alternate menu configuration file after thepassword=<password>
directive. In this case, GRUB restarts the second stage boot loader and uses the specified alternate configuration file to build the menu. If an alternate menu configuration file is left out of the command, a user who knows the password is allowed to edit the current configuration file.更多相關 GRUB 安全性的資訊請參照 Red Hat Enterprise Linux Deployment Guide 中的 工作站安全性 一章。root (<device-type><device-number>,<partition>)
— Configures the root partition for GRUB, such as(hd0,0)
, and mounts the partition.rootnoverify (<device-type><device-number>,<partition>)
— Configures the root partition for GRUB, just like theroot
command, but does not mount the partition.timeout=<integer>
— Specifies the interval, in seconds, that GRUB waits before loading the entry designated in thedefault
command.splashimage=<path-to-image>
— Specifies the location of the splash screen image to be used when GRUB boots.title group-title
— 指定一個用來載入核心或作業系統的特定指令群組的標題。
#
)。
9.8. Changing Runlevels at Boot Time
- 當 GRUB 選單通過畫面顯示時,請在三秒內按下任何鍵進入 GRUB 選單。
- 按 a 鍵附加
kernel
指令。 - Add
<space><runlevel>
at the end of the boot options line to boot to the desired runlevel. For example, the following entry would initiate a boot process into runlevel 3:grub append> ro root=/dev/VolGroup00/LogVol00 rhgb quiet 3
9.9. 其它的資源
9.9.1. 已安裝的說明文件
/usr/share/doc/grub-<version-number>/
— This directory contains good information about using and configuring GRUB, where <version-number> corresponds to the version of the GRUB package installed.info grub
— GRUB 資訊頁包含了有關 GRUB 與其使用方法的教學,使用者參考手冊、程式員參考手冊以及常見問題文件。
9.9.2. 很有用的網站
- http://www.gnu.org/software/grub/ — GNU GRUB 的首頁。這個網站包含了 GRUB 發展以及常見問題的資訊。
- http://kbase.redhat.com/faq/FAQ_43_4053.shtm — 啟動除了 Linux 之外作業系統之細節
- http://www.linuxgazette.com/issue64/kohli.html — 一篇有關於在系統上設定 GRUB 的入門探討,包括綜述 GRUB 命列列的選項。
9.9.3. 相關書籍
- Red Hat Enterprise Linux Deployment Guide; Red Hat, Inc. — 工作站安全性 一章以簡單的方始解釋如何確保 GRUB 開機管理程式的安全性。
章 10. 關於 Itanium 與 Linux 的額外資源
- http://www.intel.com/products/processor/itanium2/ — Intel 網站關於 Itanium 2 Processor
- http://developer.intel.com/technology/efi/index.htm?iid=sr+efi — 關於延伸任體介面(EFI)的 Intel 網站
- http://www.itanium.com/business/bss/products/server/itanium2/index.htm — 英特爾(Intel)的 Itanium 2 處理器網站
部 II. IBM POWER 主機架構 – 安裝與開機
章 11. 開始使用的步驟
11.1. 選擇要升級或安裝
11.2. BM eServer System p 與 System i 的準備工作
11.3. 您有足夠的磁碟空間嗎?
- 有足夠的「未分割[5]」硬碟空間,以安裝 Red Hat Enterprise Linux,或
- 有一或多個可以刪除的分割區,以釋放出足夠的硬碟空間來安裝 Red Hat Enterprise Linux。
11.4. 您可以使用 CD-ROM 或 DVD 光碟機安裝嗎?
11.5. 準備網路安裝
注意
注意
yaboot:
提示符號下輸入以下指令:
linux mediacheck
注意
/location/of/disk/space
。該目錄將通過 FTP、NFS、或 HTTP 公開,並將指定為 /export/directory。例如,/location/of/disk/space
可能為您所創立稱為 /var/isos
的目錄。/export/directory
也許是用來 HTTP 安裝的 /var/www/html/rhel5
。
- 請使用以下指令從安裝磁碟中建立 iso 映像檔:
- 使用 DVD 啟動
dd if=/dev/dvd of=/location/of/disk/space/RHEL5.iso
dvd 是指 DVD 光碟機裝置。 - 使用 CD-ROM 光碟機啟動:
dd if=/dev/cdrom of=/location/of/disk/space/diskX.iso
cdrom 是指 CD光碟機裝置,而X 是您所要複製光碟的編號,從 1 開始代表第一張光碟。
11.5.1. 準備 FTP 和 HTTP 安裝
- 使用 DVD 啟動
mount -o loop /location/of/disk/space/RHEL5.iso /export/directory/
在這個情況下 /export/directory 這個目錄將通過 FTP 或 HTTP 被分享。 - 使用 CD-ROM 光碟機啟動:
mount -o loop /location/of/disk/space/diskX.iso /export/directory/diskX/
將上列指令應用在每一個 CD-ROM iso 映像檔上,範例:mount -o loop /var/isos/disk1.iso /var/www/html/rhel5-install/disk1/
/export/directory
這個目錄能通過 FTP 或 HTTP 被分享,並檢驗客戶存取。您可以檢查該目錄是否能夠從伺服器上,以及在您欲安裝的同一子網路之另一部電腦上被存取。
11.5.2. 準備 NFS 安裝
- 使用 DVD 啟動
mv /location/of/disk/space/RHEL5.iso /export/directory/
- 使用 CD-ROM 光碟機啟動:
mv /location/of/disk/space/disk*.iso /export/directory/
/export/directory
目錄已通過 NFS 然後 /etc/exports
.這個分錄輸出。
/export/directory client.ip.address(ro,no_root_squash)
/export/directory *(ro,no_root_squash)
/sbin/service nfs start
指令)。如果 NFS 正在執行中,請重新載入設定檔案(在 Red Hat Enterprise Linux 系統上,請使用 /sbin/service nfs reload
)。
11.6. 準備硬碟安裝
注意
- 使用光碟片 — 從每張安裝光碟建立 ISO 映像檔。在 Linux 系統上,置入光碟並輸入下列指令:
dd if=/dev/cdrom of=/tmp/file-name.iso
dd if=/dev/cdrom of=/tmp/file-name.iso
- 使用 ISO 映像檔 — 將這些映像檔轉換到欲進行安裝的系統。在您進行安裝前請先檢驗 ISO 映像檔的完整性,將可使您避免可能發生的一些問題。您可以使用
md5sum
程式來進行檢驗(許多作業系統中都含有md5sum
程式)。在存放這些 ISO 映像檔的同一部 Linux 機器中應該有一個md5sum
程式。
updates.img
檔案,它是用來安裝 anaconda
程式更新的。如果您想知道更多安裝 Red Hat Enterprise Linux 的方法,以及如何使用安裝程式更新的功能,請參照 anaconda
RPM 套件中的 install-methods.txt
檔案。
章 12. 安裝於 IBM System i 與 IBM System p 系統
- Becoming familiar with the installation program's user interface
- 開始安裝程式
- 選擇一個安裝方式
- 安裝中的設定步驟(語言、鍵盤、滑鼠、磁碟分割等等。)
- 完成安裝程式
12.1. 圖形化安裝程式的使用者介面
注意
yaboot:
prompt:
linux text
12.2. 啟動 IBM System i 或 IBM System 安裝程式
圖形 12.1. SMS 主控台
boot:
提示符號,請按下 Enter 或等待時間逾時,以啟動安裝程式。
images/netboot/ppc64.img
file on CD #1.
12.3. Linux 虛擬主控台注意事項
表格 12.1. 主控台、按鍵組合與內容
主控台 | 按鍵組合 | 內容 |
---|---|---|
1 | ctrl+alt+f1 | 安裝對話 |
2 | ctrl+alt+f2 | shell 提示符號 |
3 | ctrl+alt+f3 | 安裝紀錄(來自安裝程式的訊息) |
4 | ctrl+alt+f4 | 系統相關的訊息 |
5 | ctrl+alt+f5 | 其它訊息 |
6 | ctrl+alt+f6 | X 圖形顯示 |
12.4. 使用 HMC vterm
12.5. 文字模式安裝程式使用者介面
注意
圖形 12.2. Installation Program Widgets as seen in Boot Loader Configuration
圖形 12.3. Installation Program Widgets as seen in Disk Druid
- 視窗 — 視窗(在這本手冊上通常表示為 對話視窗)會出現在整個安裝過程的畫面上。有時候,一個視窗會重疊在另一個上面;在這些情況下,您只能與最上面的那個視窗產生互動。當您完成在那個視窗的動作後,它將會消失,讓您可以繼續在其下的視窗中工作。
- 選取方塊 — 選取方塊讓您可以選擇或取消選擇一個特色。選取方塊會以一個星號(表示已選取)或一個空白(表示未選取)來顯示。當游標停留在一個選取方塊時,按下 空白鍵 以選取一個未選取的項目,或取消選取一個已經選取的項目。
- 文字輸入行 — 文字輸入行是讓您可以輸入安裝程式需要訊息的地方。當游標停留在一個文字輸入行時,您可以輸入亦或編輯在該行的資訊。
- 文字元件 — 文字元件是用來顯示文字的一個畫面區域。有時候,文字元件也許會包含其它的元件,例如選取方塊。如果一個文字元件包含了超過它所能容納空間的資料,會出現一個捲軸;如果您放置游標在該文字元件上,之後您可以使用 向上 與 向下 方向鍵來捲動所有在其中的資訊。您目前的位置會以 # 字元出現在捲軸上,當您捲動捲軸時它會上下移動。
- Scroll Bar — Scroll bars appear on the side or bottom of a window to control which part of a list or document is currently in the window's frame. The scroll bar makes it easy to move to any part of a file.
- 按鈕元件 — 按鈕元件是主要用來與安裝程式互動的方法。藉由使用 Tab 與 Enter 鍵操縱這些按鈕,讓您可以前進到安裝過程的畫面。當按鈕為反白時,表示可以被選取。
- Cursor — Although not a widget, the cursor is used to select (and interact with) a particular widget. As the cursor is moved from widget to widget, it may cause the widget to change color, or the cursor itself may only appear positioned in or next to the widget. In 圖形 12.2, “Installation Program Widgets as seen in Boot Loader Configuration”, the cursor is positioned on the OK button. 圖形 12.3, “Installation Program Widgets as seen in Disk Druid”, shows the cursor on the Edit button.
12.5.1. 使用鍵盤來操縱
警告
12.6. 開始安裝
12.6.1. 從 DVD/CD-ROM 安裝
12.6.1.1. 如果找不到 IDE CD-ROM 的話,該怎麼辦?
boot:
提示符號輸入 linux hdX=cdrom
。將 X
改為下列其中一字母,依介面所連接的單位而定,以及它的設定為 master 或 slave(亦稱主和副):
a
— 第一個 IDE 控制卡、masterb
— 第一個 IDE 控制卡、slavec
— 第二個 IDE 控制卡、masterd
— 第二個 IDE 控制卡、slave
12.7. 從硬碟安裝
圖形 12.4. 硬碟安裝中的選擇分割區對話視窗
/
. If the ISO images are located in a subdirectory of a mounted partition, enter the name of the directory holding the ISO images within that partition. For example, if the partition on which the ISO images is normally mounted as /home/
, and the images are in /home/new/
, you would enter /new/
.
12.8. 執行網路安裝
圖形 12.5. TCP/IP 設定
12.9. 經由 NFS 安裝
example.com
網域中名為 eastcoast
的主機進行安裝的話,請在 NFS 伺服器 欄位中輸入 eastcoast.example.com
。
/export/directory/
which contains the variant/
directory.
RedHat
目錄的路徑。(如果您不知道這個目錄的路徑,請向您的系統管理員詢問。)舉例來說,如果您的 NFS 伺服器包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch,例如 i386, ia64, ppc 或 s390)。如果所指定的數值都正確的話,將會出現一個訊息指出 Red Hat Enterprise Linux 的安裝程式正在執行中。
圖形 12.6. NFS 設定對話視窗
12.10. 經由 FTP 安裝
圖形 12.7. FTP 設定對話視窗
variant/
所在的安裝目錄名稱。舉例來說,如果該 FTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
12.11. 經由 HTTP 安裝
variant/
所在的安裝目錄名稱。 舉例來說,如果該 HTTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390x)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
圖形 12.8. HTTP 設定對話視窗
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
12.12. 歡迎使用 Red Hat Enterprise Linux
12.13. 選擇語言
圖形 12.9. 選擇語言
12.14. 鍵盤設定
圖形 12.10. 鍵盤設定
注意
system-config-keyboard
指令以開始 鍵盤設定工具。如果您不是管理員則會要求您輸入管理提示碼才能繼續。
12.15. 輸入安裝號碼
圖形 12.11. Installation Number
12.16. 磁碟分割設定
警告
/var/spool/up2date/
。 如果您選擇手動分割磁碟,並且另外建立一個 /var/
分割區,請確定該分割區容量夠大(3.0 GB 以上)以容納下載的更新套件。
圖形 12.12. 磁碟分割設定
警告
12.17. 進階儲存選項
圖形 12.13. 進階儲存選項
圖形 12.14. 設定 ISCSI 參數
12.18. 建立預設配置
- 移除系統上所有選取的分割區並建立預設配置 — 使用這選項移除硬碟上所有分割區(包括其它作業系統建立的分割區,例如由 微軟視窗 所建立的 VFAT 或 NTFS 分割區)。
警告
如果您選取這個選項,在所選取硬碟上的所有資料都會被安裝程式移除。 如果在要安裝 Red Hat Enterprise Linux 的硬碟上有您想要保留的資料,請不要選擇這個選項。 - 移除系統上的 Linux 分割區並建立預設配置 — 使用這選項移除所有之前建立的 Linux 分割區。這選項不會移除硬碟上的其它分割區(例如 VFAT 或 FAT32 分割區)。
- 在可磁碟的可用空間上建立預設配置 — 如果您的硬碟上有足夠的剩餘空間,選擇這個選項以保留您目前的資料與分割區。
圖形 12.15. 建立預設配置
警告
注意
/boot/
分割區建立在 RAID 陣列之外,例如在另一顆硬碟上。該硬碟必須為一個內置式硬碟。
/boot/
分割區。
/boot/
分割區。
12.19. 磁碟分割您的系統
注意
注意
/
) partition, a /boot/
partition, PPC PReP boot partition, and a swap partition equal to twice the amount of RAM you have on the system.
圖形 12.16. 在 IBM System p 和 System i 統上使用 Disk Druid 做磁碟分割
12.19.1. 硬碟的圖形顯示
12.19.2. Disk Druid's Buttons
- 新增:用來要求新增一個分割區。當選取時,會出現一個對話視窗,並包含必須要填入資訊的欄位(例如,掛載點與分割區大小)。
- 編輯:用來更改目前在 分割區 部份選取之分割區的屬性。選取 編輯 將會開啟一個對話視窗。可以編輯部份或全部的欄位,依照於分割區的資訊是否已經被寫入到磁碟。您也可以編輯出現在圖形中的剩餘空間,從那些空間來建立一個新的分割區。您可以選取剩餘空間然後選擇 編輯 按鈕,或雙點選這些剩餘空間以編輯它。
- 要建立一個 RAID 裝置,您必須先建立(或使用既有的)軟體 RAID 分割區。在您已經建立兩個或更多的軟體 RAID 分割區之後,請點選 RAID 來結合軟體 RAID 分割區成為一個 RAID 裝置。
- 刪除:使用來移除 在 目前磁碟分割區 選取的分割區。您將會被要求確認任何分割區的刪除。
- 還原:使用來回復 Disk Druid 到它原先的狀態。如果您 還原 這個分割區,所有已做的變更都將會遺失。
- RAID:使用來提供多餘資料(redundancy)給任何或所有磁碟分割區。除非您有使用 RAID 的經驗,否則不建議您使用。 更多相關 RAID 的資訊,請參照 Red Hat Enterprise Linux Deployment Guide。要建立一個 RAID 裝置,您必須先建立軟體 RAID 分割區。一旦您已經建立兩個或更多的軟體 RAID 分割區,選擇 RAID,來連接軟體 RAID 分割區到一個 RAID 裝置。
- LVM:讓您可以建立一個 LVM 邏輯磁區。LVM(Logical Volume Manager)的功能是用來呈現其所包含的實體儲存空間(例如一個硬碟)的一個簡單的邏輯檢視。LVM 管理個別的實體磁碟 — 或更明白的就是說在它們其內所含的個別分割區。除非您有使用 LVM 的經驗,否則不建議您使用。 更多相關 LVM 的資訊,請參照 Red Hat Enterprise Linux System Administration Guide。請注意,您只能在圖形安裝程式內設定 LVM。要建立一個 LVM 邏輯磁區,您必須先建立實體磁區(LVM)類型的分割區。在您建立好一個或更多的實體磁區(LVM)分割區之後,請選擇 LVM 來建立一個 LVM 的邏輯磁區。
12.19.3. 分割區的欄位
- Device: This field displays the partition's device name.
- Mount Point/RAID/Volume: A mount point is the location within the directory hierarchy at which a volume exists; the volume is "mounted" at this location. This field indicates where the partition is mounted. If a partition exists, but is not set, then you need to define its mount point. Double-click on the partition or click the Edit button.
- Type: This field shows the partition's file system type (for example, ext2, ext3, or vfat).
- 格式化:這個欄位表示是否要格式化建立好的分割區。
- Size (MB): This field shows the partition's size (in MB).
- 開始:這個欄位顯示這個分割區在您的硬碟上起始的磁柱。
- 結束:這個欄位顯示這個分割區在您的硬碟上結束的磁柱。
12.19.4. 建議的磁碟分割摘要
- swap 分割區(至少 256 MB) — swap 分割區是用來當作虛擬記憶體的。換句話說,當系統記憶體不足,電腦需要空間處理現有工作時,就會把非執行中的資料寫到 swap 分割區去。如果您不確定 swap 分割區的容量,請建立兩倍於搭載於電腦記憶體容量。必須為 swap 類別。建立適當 swap 大小,有以下幾種考量(以重要性來排列):
- 在這台電腦上執行的應用程式。
- 這台電腦的實際記憶體容量。
- 作業系統版本。
swap 空間應該是實際記憶體的兩倍大,但實體記憶體以 2 GB 為上限;如果實體記憶體超過 2 GB,那麼 swap 空間的計算方式為:2 GB 以下的實體記憶體加倍,加上剩下超過 2 GB 的實體記憶體大小。但無論如何,swap 都不該小於 32 MB。因此,如果:M = 記憶體容量(以 GB 為單位)、並且 S = swap 容量(以GB為單位),則If M < 2 S = M *2 Else S = M + 2
依據這公式,有 2 GB 記憶體電腦的 swap 大小應該是 4 GB(2x2 = 4);而擁有 3 GB 記憶體大小的電腦,swap 大小則是 5 GB(2x2 + (3-2)x1)。如果您之後打算增加記憶體,那麼設置較大的 swap 空間,是比較具有計畫的作法。對於使用大量記憶體(超過 32 GB)的系統來說,您可以使用較小的 swap 分割區(大約實際記憶體的同等大小,或更少)。 - 位於硬碟第一個分割區上的 PPC PReP 開機分割區 — PPC PReP 開機分割區含有作業系統的核心或(iSeries 系統)或 YABOOT 開機管理程式(使得您的 POWER 系統能啟動 Red Hat Enterprise Linux)。除非您打算從軟碟片或網路來源開機,您必須擁有 PPC PReP 開機分割區才能啟動 Red Hat Enterprise Linux。對於 IBM System i 和 IBM System p 的使用者:PPC PReP 開機分割區必須介於 4 到 8 MB 之間,請勿超過 10MB。
- 一個
/boot/
分割區(100 MB) — 掛載在/boot/
的分割區含有作業系統核心(使您的系統能啟動 Red Hat Enterprise Linux),以及在系統開機(bootstrap) 過程中所用到的檔案。 由於大部分 PC BIOS 的限制,最好建立一個小型的分割區來存放 這些檔案,對於大部分的使用者來說,一個 100 MB 的 boot 分割區已經足夠了。警告
如果您擁有一張 RAID 控制卡,請注意 Red Hat Enterprise Linux 5.0 並不支援從 RAID 控制卡開機,在這種 情況下,必須建立/boot/
分割區在 RAID 陣列之外,例如在另一顆 硬碟上。 - A
root
partition (3.0 GB - 5.0 GB) — this is where "/
" (the root directory) is located. In this setup, all files (except those stored in/boot
) are on the root partition.一個 3.0 GB 的 root 分割區相當於最小安裝;而 5.0GB 的 root 分割區將允許您安裝全部的套件群組。
12.19.5. 新增分割區
注意
圖形 12.17. 建立一個新的分割區
- Mount Point: Enter the partition's mount point. For example, if this partition should be the root partition, enter
/
; enter/boot
for the/boot
partition, and so on. You can also use the pull-down menu to choose the correct mount point for your partition. For a swap partition the mount point should not be set - setting the filesystem type to swap is sufficient. - File System Type: Using the pull-down menu, select the appropriate file system type for this partition. For more information on file system types, refer to 節 12.19.5.1, “檔案系統的類型”.
- Allowable Drives: This field contains a list of the hard disks installed on your system. If a hard disk's box is highlighted, then a desired partition can be created on that hard disk. If the box is not checked, then the partition will never be created on that hard disk. By using different checkbox settings, you can have Disk Druid place partitions where you need them, or let Disk Druid decide where partitions should go.
- 大小(MB):輸入分割區的大小(以 MB 為單位)。請注意,這個欄位最小為 100 MB;除非變更它,否則只會建立 100 MB 的分割區。
- Additional Size Options: Choose whether to keep this partition at a fixed size, to allow it to "grow" (fill up the available hard drive space) to a certain point, or to allow it to grow to fill any remaining hard drive space available.如果您選擇 填滿分割區直到 (MB),您必須在這個選項右邊的欄位中提供大小的限制。 這將使得您可以保留某些硬碟上的剩餘空間以便將來使用。
- Force to be a primary partition: Select whether the partition you are creating should be one of the first four partitions on the hard drive. If unselected, the partition is created as a logical partition. Refer to 節 25.1.3, “分割區中的分割區 - 延伸分割區的概論”, for more information.
- 確定:一旦您對設定已經滿意,而且希望要建立這個分割區,請選擇 確定。
- 取消:如果您不想建立這個分割區,請選擇取消。
12.19.5.1. 檔案系統的類型
- ext2 — 一個 ext2 的檔案系統支援標準的 Unix 檔案類型(一般檔案、目錄、符號連結等等)。它提供了支援長檔名的能力,可到 255 個字元。
- ext3 — ext3 檔案系統是以 ext2 檔案系統為基礎,並且有一個最大的優點 — 日誌檔案系統(journaling)。使用日誌式的檔案系統,將減少在系統當機後因為已不再需要做
fsck
,所以可以降低回復檔案系統的時間。[6] 檔案系統。因此安裝程式將會預設選取 ext3 檔案系統,並且強烈建議您使用它。 - 實體磁區 (LVM) — 建立一個或更多的實體磁區(LVM)分割區,使您可以建立一個 LVM 的邏輯磁區。當您使用實體硬碟時,LVM 可以增進系統效能。更多 LVM 相關資訊,請參照Red Hat Enterprise Linux Deployment Guide。
- 軟體 RAID — 建立兩個或以上的軟體 RAID 分割區可以讓您建立一個 RAID 裝置。更多 RAID 裝置的相關資訊,請參考在 Red Hat Enterprise Linux Deployment Guide 中的 RAID(磁碟陣列) 章節。
- swap — Swap 分割區是用來支援虛擬記憶體。換句話說,當實體記憶體不足以儲存系統正在處理的資料時,資料將寫入一個 swap 分割區。更多相關資訊請參照 Red Hat Enterprise Linux Deployment Guide。
12.19.6. 編輯分割區
注意
12.20. 網路設定
圖形 12.18. 網路設定
圖形 12.19. 編輯網路裝置
注意
注意
system-config-network
指令以開始 網路管理工具。如果您不是 root 身份登入則會要求您輸入root 密碼才能繼續。
12.21. 時區設定
- 藉由滑鼠點選互動式地圖,在城市間切換(以黃點標示)。紅色的X表示您目前的選擇。
- 您也可以捲動螢幕下方的選單,選擇您的時區。請用滑鼠點選您的所在位置。
注意
system-config-date
指令,以啟動時間與日期設定工具。如果您不是 root 身份登入,系統將會要求您輸入root 的密碼。
timeconfig
指令。
12.22. 設定 Root 密碼
注意
圖形 12.20. Root 密碼
su -
指令以轉換成 root。這些基本的原則將會減少因打字錯誤或不當的指令造成系統毀損的機會。
注意
su -
指令後按下 Enter 鍵。然後輸入 root 的密碼,再按下 Enter 鍵即可。
注意
注意
system-config-rootpassword
指令以啟動 Root Password Tool。如果您不是 root,系統將會提示您輸入 root 的密碼以繼續。
12.23. 選取套件群組
注意
圖形 12.21. 選取套件群組
圖形 12.22. 套件群組的細節
12.24. 準備安裝
12.24.1. 準備安裝
/root/install.log
找到一份完整的安裝紀錄。
警告
12.25. 安裝套件
12.26. 安裝完成
- IBM eServer System p 和 System i — 正在完成安裝
- 請別忘記移除任何開機媒體。在重新開機後,您必須設定開啟的軔體開機裝置為含有 Red Hat Enterprise Linux PReP 與 / 分割區的磁碟。如要完成這項工作,請等待直到 LED 的指示燈或 HMC SRC 顯示
E1F1
,然後再按下 1 以進入 System Management Services 圖形介面。請點選 Select Boot Options。再點選 Select Boot Devices,最後再點選 Configure 1st Boot Device。選取含有 Red Hat Enterprise Linux 的磁碟。設定您想使用的其它裝置。然後離開 SMS 選單,以啟動您的新系統。注意
依據機器型號的不同,SMS 選單中的步驟可能會不同。After your computer's normal power-up sequence has completed, YABOOT's prompt appears, at which you can do any of the following things:- Press Enter — causes YABOOT's default boot entry to be booted.
- 選取一個開機標籤,再按下 Enter — 將使得 YABOOT 啟動該開機標籤所指向的作業系統。(在非 iSeries 系統的
boot:
提示符號下按下 Tab 按鍵以取得有效的開機標籤清單。) - Do nothing — after YABOOT's timeout period, (by default, five seconds) YABOOT automatically boots the default boot entry.
在 Red Hat Enterprise Linux 開機後,您應該會看到一個或更多的畫面捲過。最後,您應該會看到一個login:
的提示符號或圖形介面的登入畫面(如果您有安裝 X 視窗系統而且選擇預設開機進入圖形模式的話)。
fsck
應用程式是用來檢查檔案系統上元資料(metadata)的完整性並且可能會修復一個或多個 Linux 檔案系統。
章 13. IBM POWER 系統的驅動程式媒體
13.1. 為什麼我需要驅動程式媒體?
- 如果您要執行來自一個網路裝置的安裝
- 如果您需要從區塊裝置執行安裝
- 如果您要執行來自一個 PCMCIA 裝置的安裝
- 如果您在執行安裝程式請於安裝起始提示符號或 NWSD 的 IPL 參數欄位輸入
linux dd
- 如果您在一部沒有任何 PCI 裝置的電腦上執行安裝程式
13.1.1. 那到底甚麼是驅動程式媒體?
注意
13.1.2. 我該如何取得驅動程式媒體?
注意
linux dd
開機指令,而是使用 linux dd=url
指令,這裡的 url 可以一個要使用的 HTTP、FTP 或 NFS 位址來取代。
13.1.3. 安裝過程中使用驅動程式映像檔
yaboot:
prompt enter linux dd
. Refer to 章 12, 安裝於 IBM System i 與 IBM System p 系統 for details on booting the installation program.
章 14. IBM POWER 系統安裝的故障排除
http://www14.software.ibm.com/webapp/set2/sas/f/lopdiags/info/LinuxAlerts.html
14.1. 您無法啟動 Red Hat Enterprise Linux
14.1.1. 您的系統顯示 Signal 11 的錯誤嗎?
boot:
提示符號下(Itanium 系統的用戶,請在指令前加入 elilo
),輸入以下指令:
linux mediacheck
http://www.bitwizard.nl/sig11/
14.2. 開始安裝的問題
14.2.1. 開機進入圖形安裝的問題
resolution=
boot option. Refer to 章 15, IBM Power 系統的其它開機選項 for more information.
注意
nofb
的開機選項。這個指令也許對某些螢幕讀取硬體的存取性 來說是必要的。
14.3. 安裝中的問題
14.3.1. 無法找到安裝 Red Hat Enterprise Linux 的裝置
之錯誤訊息
無法找到安裝 Red Hat Enterprise Linux 的裝置
,很有可能是安裝程式無法辨認 SCSI 控制控制器。
14.3.2. 缺少軟碟機的情況下儲存 traceback 訊息
scp
錯誤訊息到一部遠端的系統。
/tmp/anacdump.txt
的檔案中。當方塊出現時,鍵入 Ctrl+Alt+F2
切換至一個新的 tty(虛擬主控台),並且scp
訊息寫入 /tmp/anacdump.txt
至一個已知的遠端工作系統。
14.3.3. 磁碟分割表的問題
14.3.4. 對於 IBM™ POWER System 系統使用者的其它磁碟分割問題
- 一個
/
(root)分割區 - A <swap> partition of type swap
- 一個 PPC PReP 開機分割區。
- /boot/分割區
注意
14.3.5. 您有發現 Python 的錯誤嗎?
/tmp/
目錄之後發生。 這個錯誤看起來會類似:
Traceback (innermost last): File "/var/tmp/anaconda-7.1//usr/lib/anaconda/iw/progress_gui.py", line 20, in run rc = self.todo.doInstall () File "/var/tmp/anaconda-7.1//usr/lib/anaconda/todo.py", line 1468, in doInstall self.fstab.savePartitions () File "fstab.py", line 221, in savePartitions sys.exit(0) SystemExit: 0 Local variables in innermost frame: self: <fstab.GuiFstab instance at 8446fe0> sys: <module 'sys' (built-in)> ToDo object: (itodo ToDo p1 (dp2 S'method' p3 (iimage CdromInstallMethod p4 (dp5 S'progressWindow' p6 <failed>
/tmp/
的符號連結連到其它位置或在建立後已被更改。 這些符號連結或已更改的連結在安裝過程中無效,所以安裝程式無法寫入資訊而導致失敗。
http://www.redhat.com/support/errata/
http://rhlinux.redhat.com/anaconda/
http://bugzilla.redhat.com/bugzilla/
http://www.redhat.com/apps/activate/
14.4. 安裝後的問題
14.4.1. 無法從 *NWSSTG 進行 IPL
14.4.2. 開機進入圖形環境
startx
指令來開啟 X 視窗系統圖形化介面。
/etc/inittab
檔案,您只需更改執行層級部份的相對號碼即可。完成更改後,請重新啟動您的電腦,下次您登入時,您將可以看到圖形介面的登入畫面。
su
指令以轉換為 root。
gedit /etc/inittab
以使用 gedit 來編輯這個檔案。/etc/inittab
這個檔案將會被開啟,在第一個畫面中您將會看到類似如下的部份:
# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
# id:3:initdefault:
id:3:initdefault:
這一行中的 3
為 5
。
警告
3
改為 5
)。
id:5:initdefault:
14.4.3. X 視窗系統(GUI)有問題
14.4.4. 關於 X 伺服器當掉,以及非 root 使用者的問題
df -h
df
指令可以讓您看出,哪個分割區的空間已滿。要了解更多 df
指令的詳情,以及所有選項的一覽表(例如本例的 -h
選項),請參照 df
的 man page。您只要在 shell 提示符號下,鍵入 man df
指令即可。
/home/
與 /tmp/
分割區很容易因為一般使用者的超量使用,而被塞滿。您可以刪除一些舊的檔案,以清出空間;之後再以先前不成功的使用者啟動 X 看看。
14.4.5. 當您試著要登入時的問題
linux single
的方式開機您的系統。
#
提示符號,您需要輸入 passwd root
,然後您便可以輸入新的 root 密碼。 再來,您可以輸入 shutdown -r now
,您的系統將會以您新的密碼重新啟動。
su -
and enter your root password when prompted. Then, type passwd <username>
. This allows you to enter a new password for the specified user account.
http://hardware.redhat.com/hcl/
14.4.6. 您的印表機無法運作
system-config-printer
指令以開始 印表機設定工具。如果您不是已 root 身份登入則會要求您輸入 root 密碼才能繼續。
14.4.7. Apache 為基礎的 httpd
服務與 Sendmail 在開機時中斷服務
httpd
或 Sendmail 服務中斷的情形,請確定在 /etc/hosts
檔案中有下列這一行:
127.0.0.1 localhost.localdomain localhost
章 15. IBM Power 系統的其它開機選項
boot:
提示符號輸入您想要的指令。
開機時的指令參數
askmethod
- 在從 Red Hat Enterprise Linux CD-ROM 光碟機開機後,這個指令要求您指定安裝方式。
dd
- 這個引數將會在安裝程式中提示您使用驅動程式磁碟片。
dd=url
- 這個參數將會在安裝程式中提示您使用位於指定 HTTP、FTP 或 NFS 網路位址的驅動程式映像檔。
display=ip:0
- 這個指令將允許遠端顯示的傳送。在這個指令中,要以您想要顯示的系統之 IP 位址取代 IP。在您想要顯示的系統上,您必須執行指令
xhost +remotehostname
,這裡的 remotehostname 就是您執行顯示來源的主機名稱。使用xhost +remotehostname
指令將會限制存取遠端的顯示終端機,而不允許沒有特定授權的任何人或系統做遠端存取。 driverdisk
- 這個指令執行與
dd
指令相同的功能,而且也會提示您在 Red Hat Enterprise Linux 安裝過程中使用驅動程式磁碟片; ide=nodma
- 這個指令停用所有 IDE 裝置上的 DMA,這適用於當您有 IDE 相關的問題時。
mediacheck
- 這個指令提供測試安裝來源(如果是以 ISO 安裝的方式)之完整選項。這個指令可以使用在 CD、DVD、硬碟 ISO 與 NFS ISO 等的安裝方式。在安裝前,請驗證 ISO 影像檔是否完整,能避免安裝過程中經常遇到的問題。
mem=xxxm
- 這個指令將會可置換核心偵測系統所得到的記憶體容量。這在有些只能偵測到 16MB 記憶體的舊系統,以及有些顯示卡與主機共享記憶體的新系統上很有用。當執行這個指令時,請以記憶體容量的百萬位元組取代 xxx。
nopass
- 這個指令停用傳送鍵盤與滑鼠的資訊到安裝程式的第二階段。這適用於當執行網路安裝時在第二階段測試鍵盤與滑鼠的設定畫面。
nopcmcia
- 這個指令忽略系統中的所有 PCMCIA 控制卡。
noprobe
- 這個指令停用硬體偵測,而由使用者提供硬體資訊。
noshell
- 這個指令停用在安裝過程中虛擬主控台 2 的 shell 應用。
nousb
- 這個指令停用安裝過程中載入 USB 支援。這個指令適用於安裝程式在安裝過程初期容易當機的情形。
nousbstorage
- this command disables the loading of the usbstorage module in the installation program's loader. It may help with device ordering on SCSI systems.
rescue
- this command runs rescue mode. Refer to 章 26, 基本的系統回復 for more information about rescue mode.
resolution=
- 指定安裝程式要執行的顯示模式。可輸入任何標準的解析度,例如
640x480
、800x600
、1024x768
等等。 serial
- 這個指令會開啟串列主控台的支援功能。
text
- 這個指令停用圖形安裝程式,並強制安裝程式在文字模式下執行。
updates
- 這個指令會提示您置入含有 anaconda安裝程式的更新(錯誤修正)軟碟片。如果您是執行網路安裝,並且已將更新映像檔內容放置在伺服器上的
rhupdates/
中,您則不需要使用這個指令。 vnc
- 這個指令允許您從 VNC 伺服器上進行安裝。
vncpassword=
- 這個指令用來設定連線到 VNC 伺服器的密碼。
部 III. IBM System z 主機架構 – 安裝與開機
章 16. 開始使用的步驟
16.1. 安裝之前
http://www.redbooks.ibm.com/
注意
- 分配足夠的 DASD[8] 或 SCSI[9] 分割區可以提供適當的磁碟空間(例如伺服器安裝需要至少 2GB 的空間,而安裝所有套件則 需要至少 5GB 的空間)。
- 至少需要 512 MB 的記憶體(強烈建議使用 1 GB)供 Linux 虛擬機器使用。
- 請決定是否需要 swap 空間,如果需要的話,需要多少?雖然您也可以(也建議您)指派足夠的記憶體給 z/VM,並讓 z/VM 來進行必要的置換(swapping),也會有無法預測所需之 RAM 的情況發生。如此的情況必須依照每一個例子來檢查。
- 決定您打算在哪種環境下執行這作業系統(使用 LPAR 或在一或多個虛擬機器上執行)。
- 最後,請記得閱讀 IBM Linux for System z 紅皮書 中的 3.3 到 3.8 節以及第五章與第六章,其中解釋了 zSeries 平台上的不同設定與安裝情形,以及如何設定一個初始的 LPAR 或 Linux 虛擬機器(z/VM)。
16.2. 為安裝紀錄額外的 System z 硬體準備
16.3. 開機方法的基本概要
kernel.img
)、虛擬硬碟(ram disk,initrd.img
)、CMS 設定檔(redhat.conf
)、以及一個參數檔。您可以找到參數與 CMS 設定檔的範例(redhat.parm
與 redhat.conf
)。您應該為您的 DASD 編輯 CMS 設定檔,甚至加入網路設定的資訊。在您啟動 IBM System z 後,網路就會完成設定。您可以使用另一台電腦上的 ssh來登入安裝映像檔。現在您可以啟動安裝 script,安裝 Red Hat Enterprise Linux。
16.4. 準備網路安裝
注意
注意
/location/of/disk/space
。該目錄將通過 FTP、NFS、或 HTTP 公開,並將指定為 /export/directory。例如,/location/of/disk/space
可能為您所創立稱為 /var/isos
的目錄。/export/directory
也許是用來 HTTP 安裝的 /var/www/html/rhel5
。
- 請使用以下指令從安裝磁碟中建立 iso 映像檔:
- 使用 DVD 啟動
dd if=/dev/dvd of=/location/of/disk/space/RHEL5.iso
dvd 是指 DVD 光碟機裝置。 - 使用 CD-ROM 光碟機啟動:
dd if=/dev/cdrom of=/location/of/disk/space/diskX.iso
cdrom 是指 CD光碟機裝置,而X 是您所要複製光碟的編號,從 1 開始代表第一張光碟。
16.4.1. 準備 FTP 和 HTTP 安裝
- 使用 DVD 啟動
mount -o loop /location/of/disk/space/RHEL5.iso /export/directory/
在這個情況下 /export/directory 這個目錄將通過 FTP 或 HTTP 被分享。 - 使用 CD-ROM 光碟機啟動:
mount -o loop /location/of/disk/space/diskX.iso /export/directory/diskX/
將上列指令應用在每一個 CD-ROM iso 映像檔上,範例:mount -o loop /var/isos/disk1.iso /var/www/html/rhel5-install/disk1/
/export/directory
這個目錄能通過 FTP 或 HTTP 被分享,並檢驗客戶存取。您可以檢查該目錄是否能夠從伺服器上,以及在您欲安裝的同一子網路之另一部電腦上被存取。
16.4.2. 準備 NFS 安裝
- 使用 DVD 啟動
mv /location/of/disk/space/RHEL5.iso /export/directory/
- 使用 CD-ROM 光碟機啟動:
mv /location/of/disk/space/disk*.iso /export/directory/
/export/directory
目錄已通過 NFS 然後 /etc/exports
.這個分錄輸出。
/export/directory client.ip.address(ro,no_root_squash)
/export/directory *(ro,no_root_squash)
/sbin/service nfs start
指令)。如果 NFS 正在執行中,請重新載入設定檔案(在 Red Hat Enterprise Linux 系統上,請使用 /sbin/service nfs reload
)。
16.5. 準備硬碟安裝
注意
- 使用光碟片 — 從每張安裝光碟建立 ISO 映像檔。在 Linux 系統上,置入光碟並輸入下列指令:
dd if=/dev/cdrom of=/tmp/file-name.iso
dd if=/dev/cdrom of=/tmp/file-name.iso
當到達光碟片的資料結尾時,這個指令也許會產生一個錯誤訊息,您可以忽視該訊息。在複製建立好的 ISO 映像檔到正確的 DASD 後,您便可以使用它們來進行安裝。 - 使用 ISO 映像檔–傳送這些檔案至欲安裝的系統上(或至正確的 DASD 或 SCSI 裝置)。在您進行安裝前請先檢驗 ISO 映像檔的完整性,將可使您避免可能發生的一些問題。您可以使用
md5sum
程式來進行檢驗(許多作業系統中都含有md5sum
程式)。在存放這些 ISO 映像檔的同一部 Linux 機器中應該有一個md5sum
程式。讓正確的 DASD 或 SCSI LUN 能夠在新的 VM 或 LPAR 上存取然後進行安裝。除此之外,有時您在安裝來源目錄中,會看到updates.img
檔案,它是用來安裝anaconda
程式更新的。如果您想知道更多安裝 Red Hat Enterprise Linux 的方法,以及如何使用安裝程式更新的功能,請參照anaconda
RPM 套件中的install-methods.txt
檔案。
16.6. 安裝在 z/VM 之中
i cms
vmlink tcpmaint 592 592
set qioassist off
kernel.img
與 initrd.img
) 的機器,登入然後執行下列指令 (如果您要覆寫既有的 kernel.img
與 initrd.img
映像檔案,請使用(repl
選項):
cd /location/of/boot/images/
locsite fix 80
bin
get
kernel.img
(replget
initrd.img
(replascii
get
generic.prm
redhat.parm
(replquit
redhat.parm
). Refer to 章 19, 範例的參數檔案 for sample parm
files. Below is an explanation of the parm
file contents.
.parm
檔,例如 root=/dev/ram0 ro ip=off ramdisk_size=40000
,以及沒有指定到變數中的單一參數,例如 vnc
。在新的 CMS 設定檔中,有兩個在 z/VM 用來安裝指向安裝程式的參數,必須要加到 .parm
檔案中。
CMSDASD=191 CMSCONFFILE=redhat.conf
variable="value"
pairs, one on each line.
redhat.parm
檔案的例子:
root=/dev/ram0 ro ip=off ramdisk_size=40000 CMSDASD=191 CMSCONFFILE=redhat.conf vnc
redhat.exec
檔案的例子:
/* */ 'cl rdr' 'purge rdr all' 'spool punch * rdr' 'PUNCH KERNEL IMG A (NOH' 'PUNCH REDHAT PARM A (NOH' 'PUNCH INITRD IMG A (NOH' 'ch rdr all keep nohold' 'i 00c'
redhat.conf
檔案的例子:
HOSTNAME="foobar.systemz.example.com" DASD="200-203" NETTYPE="qeth" IPADDR="192.168.17.115" SUBCHANNELS="0.0.0600,0.0.0601,0.0.0602" PORTNAME="FOOBAR" NETWORK="192.168.17.0" NETMASK="255.255.255.0" BROADCAST="192.168.17.255" SEARCHDNS="example.com:systemz.example.com" GATEWAY="192.168.17.254" DNS="192.168.17.1" MTU="4096"
DASD=dasd-list
這裡的dasd-list
代表 Red Hat Enterprise Linux 使用的 DASD 裝置清單。雖然沒有指定這個參數的話還是會進行自動偵測 DASD,不過強烈建議您加入DASD=
參數,因為當一個新的 DASD 加入到 Red Hat Enterprise Linux 的 guest 時,裝置號碼(以及裝置名稱) 將會改變。 這將會導致系統不穩定。此外,在 SAN 的環境下,在 LPAR 安裝的自動偵測也許會有預期外的效應,如 DASD 和 SCSI 容量顯示也許會為意外的大並包含目其由其它使用者使用中的容量。強烈建議不要在 kickstart 安裝時自動偵測(可能造成自動磁碟分割清除所有分割區)。root=file-system
這裡的file-system
代表 根目錄檔案系統所存放的裝置。 為了安裝的目的,這裡應該設定為/dev/ram0
, 以使用含有 Red Hat Enterprise Linux 安裝程式的 ramdisk。
SUBCHANNELS=
為多種網路介面提供必備的裝置匯流排 ID。qeth: SUBCHANNELS="read_device_bus_id,write_device_bus_id, data_device_bus_id" lcs: SUBCHANNELS="read_device_bus_id,write_device_bus_id"
例如(qeth SUBCHANNEL 敘述的範例):SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602
HOSTNAME=string
這裡的string
就是全新 安裝之 Linux guest 的主機名稱。NETTYPE=type
這裡的type
必須是下列的其中之一:ctc
,iucv
,lcs
, 或qeth
。IPADDR=IP
這裡的IP
就是新 Linux guest 的 IP 位址。NETWORK=network
這裡的network
就是網路的位址。NETMASK=netmask
這裡的netmask
為網路遮罩。BROADCAST=broadcast
這裡的broadcast
為廣播位址。GATEWAY=gw
這裡的gw
為您eth
裝置的閘道器 IP 位址。MTU=mtu
這裡的mtu
就是這個連線的最大傳輸單位 (MTU)。DNS=server1:server2::serverN
這裡的server1:server2::serverN
就是以冒號分隔開的 DNS 伺服器清單,例如:DNS=10.0.0.1:10.0.0.2
SEARCHDNS=domain1:domain2::domainN
這裡的domain1:domain2::domainN
就是以冒號分隔開的搜尋網域清單,例如:SEARCHDNS=example.com:example.org
PORTNAME=osa_portname
|lcs_portnumber
這變數支援 qdio 或非 qdio 模式的 OSA 裝置。當使用 qdio 模式:osa_portname 是 OSA裝置在 qeth 模式下指定的連接埠號。PORTNAME 只有在 z/VM 4.3,或之前沒有 APAR VM63308 與 PQ3878的機器上才需要。當使用非 qdio 模式:lcs_portnumber 是用來傳送相對埠號的整數值,範圍從 0 到 15。FCP_n="device_number SCSI_ID WWPN SCSI_LUN FCP_LUN"
這些變數可以用在含有 FCP 裝置的系統上,以預先設定 FCP,並在接下來的 anaconda 安裝程式中編輯。範例如下:FCP_1="0.0.5000 0x01 0x5105074308c212e9 0x0 4010"
- n 是個整數值(例如
FCP_1
,FCP_2
, ...)。 - device_number 是用來決定 FCP 裝置位址的(例如
0.0.5000
是裝置 5000)。 - SCSI_ID 是十六位元的數值,通常是循序的號碼(例如
0x01
,0x02
...),用在多個 FCP_ 變數上。 - WWPN 是網際網路埠號,用來重新設定路徑(通常與多路徑結合),為十六位元的數值(例如
0x5105074308c212e9
)。 - SCSI_LUN 指的是本機的 SCSI 邏輯單元值,以十六位元方式呈現,多半是循序的號碼(例如 0x00, 0x01, ...),用在多個 FCP_ 變數上。
- FCP_LUN 指的是儲存邏輯單元的識別子,以十六位元方式呈現(例如
0x4010
)。
注意
每個 FCP 參數用到的數值(FCP_1, FCP_2, ...)都隨著電腦不同而有所差異,由 FCP 儲存管理者所提供。
RUNKS=value
這裡的value
定義為1
,如果您想要在 3270 終端機以非互動模式執行安裝程式,否則 將定義為0
。cmdline
在指定cmdline
後,3270 終端機輸出變得更容易閱讀,因為安裝程式停用了應用於 unix 形式的主控台,但不支援 3270 主控台的終端機跳脫序列。- 在您使用 cmdline 選項的 RUNKS 之前,請確定您的 kickstart 檔案含有所有必要的參數。
parm
檔案中缺少使網路運行順利所需的任何網路參數, 在安裝的開機過程中將會提示您。
i cms
/* */ 'CL RDR' 'PURGE RDR ALL' 'SPOOL PUNCH * RDR' 'PUNCH KERNEL IMG A (NOH' 'PUNCH REDHAT PARM A (NOH' 'PUNCH INITRD IMG A (NOH' 'CH RDR ALL KEEP NOHOLD' 'IPL 00C CLEAR'
parm
檔案中指定了所有必要的資訊。
16.7. 使用 Red Hat Enterprise Linux LPAR CD 來安裝到一個 LPAR
- 請以一個擁有足夠權限安裝一個新的 OS 到 LPAR 的使用者來登入到 Support Element Workplace(SEW)或 Hardware Master Console(HMC)。建議您使用 SYSPROG 使用者。
- 選取 Images 然後選取您想要安裝的 LPAR。使用框架中右側的箭頭來瀏覽 CPC Recovery 選單。
- 雙點選 Load from CD-ROM or Server。
- 在接下來的對話視窗中選取 Local CD-ROM,再點選 繼續。
- 在接下來的對話視窗中,保留預設選取的
generic.ins
,然後再點選 繼續。
16.8. 不使用適用 System z 的 Red Hat Enterprise Linux 光碟片來安裝到 LPAR
- 以含有足夠權限來安裝一個新的 OS 到一個 LPAR 的使用者來登入到 Support Element Workplace。
- 請選取 Images,再選取您想要安裝的 LPAR。
- 請使用框架中右側的箭頭來瀏覽 CPC Recovery 選單。
- 雙點選 Load from CD-ROM or Server。
- 在接下來的對話視窗中選取 FTP Source,然後輸入下列的資訊:
- 主機電腦:
- 您想要用來安裝之 FTP 伺服器的主機名稱與 IP 位址(例如
ftp.redhat.com
) - 使用者 ID:
- 您在 FTP 伺服器的使用者名稱(或者是 anonymous)
- 密碼:
- 您的密碼(如果您是以 anonymous 來登入的話,請使用您的電子郵件位址)
- 帳號:
- 請將此欄位留空
- 檔案位置(也可留空):
- FTP 伺服器上含有適用 System z 之 Red Hat Enterprise Linux 的目錄(例如
/pub/redhat/linux/rawhide/s390x
)
- 點選 繼續。
- 在接下來的對話視窗中,請保留預設選取的
redhat.ins
,再點選 繼續。
16.9. 在一個 LPAR 中安裝(一般步驟)
注意
16.10. 您有足夠的磁碟空間嗎?
dasda
中含有 dasda[123]
。
章 17. 在 IBM System z 系統上安裝
- Becoming familiar with the installation program's user interface
- 開始安裝程式
- 選擇一個安裝方式
- 安裝中的設定步驟(語言、鍵盤、滑鼠、磁碟分割等等。)
- 完成安裝程式
17.1. 圖形化安裝程式的使用者介面
注意
17.2. 文字模式安裝程式使用者介面
注意
圖形 17.1. Installation Program Widgets as seen in Boot Loader Configuration
圖形 17.2. Installation Program Widgets as seen in Disk Druid
- 視窗 — 視窗(在這本手冊上通常表示為 對話視窗)會出現在整個安裝過程的畫面上。有時候,一個視窗會重疊在另一個上面;在這些情況下,您只能與最上面的那個視窗產生互動。當您完成在那個視窗的動作後,它將會消失,讓您可以繼續在其下的視窗中工作。
- 選取方塊 — 選取方塊讓您可以選擇或取消選擇一個特色。選取方塊會以一個星號(表示已選取)或一個空白(表示未選取)來顯示。當游標停留在一個選取方塊時,按下 空白鍵 以選取一個未選取的項目,或取消選取一個已經選取的項目。
- 文字輸入行 — 文字輸入行是讓您可以輸入安裝程式需要訊息的地方。當游標停留在一個文字輸入行時,您可以輸入亦或編輯在該行的資訊。
- 文字元件 — 文字元件是用來顯示文字的一個畫面區域。有時候,文字元件也許會包含其它的元件,例如選取方塊。如果一個文字元件包含了超過它所能容納空間的資料,會出現一個捲軸;如果您放置游標在該文字元件上,之後您可以使用 向上 與 向下 方向鍵來捲動所有在其中的資訊。您目前的位置會以 # 字元出現在捲軸上,當您捲動捲軸時它會上下移動。
- Scroll Bar — Scroll bars appear on the side or bottom of a window to control which part of a list or document is currently in the window's frame. The scroll bar makes it easy to move to any part of a file.
- 按鈕元件 — 按鈕元件是主要用來與安裝程式互動的方法。藉由使用 Tab 與 Enter 鍵操縱這些按鈕,讓您可以前進到安裝過程的畫面。當按鈕為反白時,表示可以被選取。
- Cursor — Although not a widget, the cursor is used to select (and interact with) a particular widget. As the cursor is moved from widget to widget, it may cause the widget to change color, or the cursor itself may only appear positioned in or next to the widget. In 圖形 17.1, “Installation Program Widgets as seen in Boot Loader Configuration”, the cursor is positioned on the OK button. 圖形 17.2, “Installation Program Widgets as seen in Disk Druid”, shows the cursor on the Edit button.
17.2.1. 使用鍵盤來操縱
警告
17.3. 執行安裝程式
ssh
to the configured Linux install system on the IBM System z.
注意
parm
檔案設定 DISPLAY=
變數。文字介面的安裝類似圖形化 的安裝,然而圖形化的安裝提供更多套件選擇的細節,以及在文字介面安裝無法使用的其 他選項。 因此強烈建議您使用圖形化的安裝。
17.3.1. 使用 X11 Forwarding 進行安裝
ssh -X linuxvm.example.com
-X
選項啟用 X11 forwarding。
DISPLAY=
變數來防止這種情況發生。新增 DISPLAY=workstationname:0.0
參數到參數檔案,以連線到 Linux Image 的用戶端工作站主機名稱取代 workstationname。在本地端工作站使用 xhost +linuxvm
指令以允許 Linux 映像檔連線到工作站。
parm
檔案中的 DISPLAY=
變數設定。如果執行一個 VM 安裝,請重新執行安裝以載入新的 parm
檔案到讀取器中。除此之外,當您執行一個 X11 forwarded 的顯示時,請確定主機工作站上的 X 伺服程式已經啟動。最後,請確認選取 NFS、FTP 或 HTTP 協定的安裝方式,因為這是唯一三種支援圖形化安裝的方法。
17.3.2. 使用 VNC 進行安裝
loader
將會啟動安裝程式。
loader
啟動後,會出現許多畫面以讓您選擇安裝方式。
17.4. 從硬碟安裝(DASD)
/
. If the ISO images are located in a subdirectory of a mounted partition, enter the name of the directory holding the ISO images within that partition. For example, if the partition on which the ISO images is normally mounted as /home/
, and the images are in /home/new/
, you would enter /new/
.
17.5. 經由 NFS 安裝
example.com
網域中名為 eastcoast
的主機進行安裝的話,請在 NFS 伺服器 欄位中輸入 eastcoast.example.com
。
/export/directory/
.
RedHat
目錄的路徑。(如果您不知道這個目錄的路徑,請向您的系統管理員詢問。)舉例來說,如果您的 NFS 伺服器包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch,例如 i386, ia64, ppc 或 s390)。如果所指定的數值都正確的話,將會出現一個訊息指出 Red Hat Enterprise Linux 的安裝程式正在執行中。
圖形 17.3. NFS 設定對話視窗
17.6. 經由 FTP 安裝
圖形 17.4. FTP 設定對話視窗
variant/
所在的安裝目錄名稱。舉例來說,如果該 FTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
17.7. 經由 HTTP 安裝
variant/
所在的安裝目錄名稱。 舉例來說,如果該 HTTP 站台包含目錄 /mirrors/redhat/arch/RedHat/
,請輸入 /mirrors/redhat/arch/
(可以使用您系統的主機架構類型取代 arch/,例如 i386, ia64, ppc 或 s390x)。如果您所輸入的資訊都正確的話,會顯示一正在擷取中的訊息。
圖形 17.5. HTTP 設定對話視窗
注意
mkdir discX mount -o loop RHEL5-discX.iso discX
17.8. 歡迎使用 Red Hat Enterprise Linux
17.9. 選擇語言
圖形 17.6. 選擇語言
17.10. 輸入安裝號碼
圖形 17.7. Installation Number
17.11. 磁碟分割設定
/home
分割區)的使用者。
警告
/var/spool/up2date/
。 如果您選擇手動分割磁碟,並且另外建立一個 /var/
分割區,請確定該分割區容量夠大(3.0 GB 以上)以容納下載的更新套件。
圖形 17.8. 磁碟分割設定
警告
17.12. 進階儲存選項
17.12.1. FCP 裝置
注意
圖形 17.9. 進階儲存選項
圖形 17.10. 設定 FCP 裝置。
圖形 17.11. 設定 FCP 裝置。
注意
17.13. 建立預設配置
- 移除系統上所有的分割區並建立預設配置 — 使用這選項移除硬碟上所有分割區(包括其它作業系統建立的分割區 例如z/VM 或 z/OS)。
警告
如果您選取這個選項,在所選取的 DASD 和 SCSI 儲存碟上的所有資料都會被安裝程式移除。如果在要安裝 Red Hat Enterprise Linux 的儲存碟上有您想要保留的資料,請不要選擇這個選項。 - 移除系統上的 Linux 分割區並建立預設配置 — 使用這選項移除所有之前建立的 Linux 分割區。這選項不會移除硬碟上的其它分割區(例如 VFAT 或 FAT32 分割區)。
- 在可磁碟的可用空間上建立預設配置 — 如果您的硬碟上有足夠的剩餘空間,選擇這個選項以保留您目前的資料與分割區。
圖形 17.12. 建立預設配置
警告
17.14. 磁碟分割您的系統
圖形 17.13. 使用 Disk Druid 做磁碟分割
17.14.1. DASD 裝置的圖形顯示
/boot
連結的裝置。核心檔案與開機管理程式扇區會與這個裝置連結。在最通常的情況下,第一個 DASD 或是 SCSI LUN 會被選取使用,但某些不常見的情況下這是有可能發生的。當重新 ipl 既有安裝系統時,裝置編號會被使用。
17.14.2. Disk Druid's Buttons
- 編輯:用來更改目前在 分割區 部份選取之分割區的屬性。選取 編輯 將會開啟一個對話視窗。可以編輯部份或全部的欄位,依照於分割區的資訊是否已經被寫入到磁碟。
- RAID:使用來提供多餘資料(redundancy)給任何或所有磁碟分割區。除非您有使用 RAID 的經驗,否則不建議您使用。 更多相關 RAID 的資訊,請參照 Red Hat Enterprise Linux Deployment Guide。要建立一個 RAID 裝置,您必須先建立軟體 RAID 分割區。一旦您已經建立兩個或更多的軟體 RAID 分割區,選擇 RAID,來連接軟體 RAID 分割區到一個 RAID 裝置。
17.14.3. 分割區的欄位
- Device: This field displays the partition's device name.
- Mount Point/RAID/Volume: A mount point is the location within the directory hierarchy at which a volume exists; the volume is "mounted" at this location. This field indicates where the partition is mounted. If a partition exists, but is not set, then you need to define its mount point. Double-click on the partition or click the Edit button.
- Type: This field shows the partition's file system type (for example, ext2, ext3, or vfat).
- 格式化:這個欄位表示是否要格式化建立好的分割區。
- Size (MB): This field shows the partition's size (in MB).
- 開始:這個欄位顯示這個分割區在您的硬碟上起始的磁柱。
- 結束:這個欄位顯示這個分割區在您的硬碟上結束的磁柱。
17.14.4. 建議的磁碟分割摘要
- swap 分割區(至少 256 MB) — swap 分割區是用來當作虛擬記憶體的。換句話說,當系統記憶體不足,電腦需要空間處理現有工作時,就會把非執行中的資料寫到 swap 分割區去。如果您不確定 swap 分割區的容量,請建立兩倍於搭載於電腦記憶體容量。必須為 swap 類別。建立適當 swap 大小,有以下幾種考量(以重要性來排列):
- 在這台電腦上執行的應用程式。
- 這台電腦的實際記憶體容量。
- 作業系統版本。
swap 空間應該是實際記憶體的兩倍大,但實體記憶體以 2 GB 為上限;如果實體記憶體超過 2 GB,那麼 swap 空間的計算方式為:2 GB 以下的實體記憶體加倍,加上剩下超過 2 GB 的實體記憶體大小。但無論如何,swap 都不該小於 32 MB。因此,如果:M = 記憶體容量(以 GB 為單位)、並且 S = swap 容量(以GB為單位),則If M < 2 S = M *2 Else S = M + 2
依據這公式,有 2 GB 記憶體電腦的 swap 大小應該是 4 GB(2x2 = 4);而擁有 3 GB 記憶體大小的電腦,swap 大小則是 5 GB(2x2 + (3-2)x1)。如果您之後打算增加記憶體,那麼設置較大的 swap 空間,是比較具有計畫的作法。對於使用大量記憶體(超過 32 GB)的系統來說,您可以使用較小的 swap 分割區(大約實際記憶體的同等大小,或更少)。 /boot/
分割區(100 MB) — 這個分割區掛載於/boot/
,並包含了執行系統核心(讓您的系統啟動 Red Hat Enterprise Linux)與啟動程式進行中所需的檔案。由於條件限制,必須建立一個原有的 ext3 分割區來保存這些檔案。對於大部分的使用者,100 MB 開機分割區即足夠。
17.14.5. 編輯分割區
注意
17.15. 網路設定
圖形 17.14. 網路設定
注意
qdio/qeth
選用 DHCP。Layer 3 不會提供 MAC 位置或位置分辨協定(ARP)功能,並且不能與需要的網路服務一起使用。
圖形 17.15. 編輯網路裝置
注意
17.16. 時區設定
- 藉由滑鼠點選互動式地圖,在城市間切換(以黃點標示)。紅色的X表示您目前的選擇。
- 您也可以捲動螢幕下方的選單,選擇您的時區。請用滑鼠點選您的所在位置。
注意
system-config-date
指令,以啟動時間與日期設定工具。如果您不是 root 身份登入,系統將會要求您輸入root 的密碼。
timeconfig
指令。
17.17. 設定 Root 密碼
注意
圖形 17.16. Root 密碼
su -
指令以轉換成 root。這些基本的原則將會減少因打字錯誤或不當的指令造成系統毀損的機會。
注意
su -
指令後按下 Enter 鍵。然後輸入 root 的密碼,再按下 Enter 鍵即可。
注意
注意
system-config-rootpassword
指令以啟動 Root Password Tool。如果您不是 root,系統將會提示您輸入 root 的密碼以繼續。
17.18. 選取套件群組
注意
圖形 17.17. 選取套件群組
圖形 17.18. 套件群組的細節
17.19. 準備安裝
17.19.1. 準備安裝
/root/install.log
找到一份完整的安裝紀錄。
警告
17.20. 安裝套件
17.21. 安裝完成
/boot
分割區所安裝的 SCSI LUN 上 IPL(啟動)。
200
裝置的 dsad,您可以使用 #cp i 200
指令。大部分的時候,特別是在選取為自動分割(清除所有分割區上得資料)的唯 DASD 環境。第一個 dasd (dasda
)為 /boot
分割區所在位置。
/boot
指令,則您也許需要提供 WWPN 和 LUN 資訊,因此 zFCP 裝置能夠 ipl。例如,
#CP SET LOADDEV PORTNAME 50050763 FCCD9689 LUN 83030000 00000000
0x50050763FCCD9689
為 WWPN 範例,8303
為 SCSI LUN)一個 zFCP 路由資訊。然後, zFCP 裝置資訊就可以查詢或用來啟始 IPL。
#cp q v fcp
4322
)可以與一個指令一起 ipl,指令如下:
#cp ipl 4322
/boot
分割區位置所在的 zFCP WWPN。
注意
#cp disc
而非 #cp logout
或 #cp log
。這個指令能讓虛擬系統沒有與 3270 主控台連接的情況下繼續執行 IBM System z。
ssh
登入系統。很重要的一點是,如果您要以 root 身份登入,您只能從 3270 或者列於 /etc/securetty
的裝置中登入。
章 18. 移除 Red Hat Enterprise Linux
章 19. 範例的參數檔案
.parm
檔案應該要包括真正的核心參數,例如 root=/dev/ram0 ro ip=off ramdisk_size=40000
,以及並沒有指定為變數的單一參數,例如 vnc
。在新設定檔裡,兩個指向安裝程式的新參數需要加入 .parm
中。;這兩個參數為 CMSDASD
與 CMSCONF
。
CMSDASD=cmsdasd_address
- Where cmsdasd_address represents the list of the device ID of the CMS DASD device which contains the configuration file. This is usually the CMS user's 'A' disk. This option is applicable only for users who have a CMS formatted disk (z/VM) available.例如:
CMSDASD=191
CMSCONFFILE=configuration_file
- 在此,configuration_file 代表的是設定檔的名稱,全部為小寫,以 Linux 檔名格式命名。CMS 檔案
REDHAT CONF
則被指定為redhat.conf
。這選項只對擁有 CMS 格式化磁碟片(z/VM)的使用者有用。例如:CMSCONFFILE=redhat.conf
DASD=dasd-list
- 其中 dasd-list 代表的是 Red Hat Enterprise Linux 所使用的 DASD 裝置名稱列表。雖然即使您省去這參數,系統還是會自動偵測 DASD;但我們還是建議您加入
DASD=
參數,因為當新的 DASD 加入用戶端時,裝置的數目會變動(也因此裝置名稱也會跟著變動)。這會導致系統無法正常運行。例如:DASD=0.0.0100,0.0201-0.0.0204
SUBCHANNELS=
- 為多種網路介面提供必備的裝置匯流排 ID。
qeth: SUBCHANNELS="read_device_bus_id,write_device_bus_id, data_device_bus_id" lcs: SUBCHANNELS="read_device_bus_id,write_device_bus_id"
Due to the length of the qeth command line, it has been broken into two lines.注意
CTC 與 NETIUCV 驅動程式以不再適用,Red Hat Enterprise Linux 也不再支援。例如(qeth SUBCHANNEL 敘述的範例):SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602
HOSTNAME=string
- 其中 string 是新安裝 Linux 用戶端的主機名稱。
NETTYPE=type
- 其中 type 必須是底下任何一種:qeth 或 lcs。
IPADDR=IP
- 其中 IP 是新安裝 Linux 用戶端的 IP 位址。
NETWORK=network
- 其中 network 是網路的位址。
NETMASK=netmask
- 其中 netmask 是網路遮罩。
BROADCAST=broadcast
- 其中 broadcast 是廣播位址。
GATEWAY=gw
- 其中 network 是網路的位址。
MTU=mtu
- 其中 mtu 是本連結的最大傳輸單元(MTU,Maximum Transmission Unit)。
DNS=server1:server2:additional_server_terms:serverN
- 其中 server1:server2:additional_server_terms:serverN 是 DNS 伺服器的清單,以冒號隔開。例如:
DNS=10.0.0.1:10.0.0.2
SEARCHDNS=domain1:domain2:additional_dns_terms:domainN
- 其中 domain1:domain2:additional_dns_terms:domainN 是搜尋網域的清單,以冒號隔開。例如:
SEARCHDNS=example.com:example.org
PORTNAME=osa_portname | lcs_portnumber
- 這變數能讓 OSA 裝置在支援 qdio 模式或非 qdio 模式中運作。當使用 qdio 模式:osa_portname 是 OSA裝置在 qeth 模式下指定的連接埠號。PORTNAME 只有在 z/VM 4.3,或之前沒有 APAR VM63308 與 PQ3878的機器上才需要。當使用非 qdio 模式:lcs_portnumber 是用來傳送相對埠號的整數值,範圍從 0 到 15。
- FCP_* (FCP_1, FCP_2, ...)
- 在使用 FCP 裝置的系統上,這變數可以用來預先設定 FCP(您可以在安裝過程中,改變這些值)。
root=/dev/ram0 DASD=200
注意
redhat.parm
檔的範例:
root=/dev/ram0 ro ip=off ramdisk_size=40000 CMSDASD=191 CMSCONFFILE=redhat.conf vnc
redhat.conf
檔的範例(redhat.parm
中 CMSCONFFILE 所指向的檔案)
DASD=200 HOSTNAME="foobar.systemz.example.com" DASD="200-203" NETTYPE="qeth" IPADDR="192.168.17.115" SUBCHANNELS="0.0.0600,0.0.0601,0.0.0602" PORTNAME="FOOBAR" NETWORK="192.168.17.0" NETMASK="255.255.255.0" BROADCAST="192.168.17.255" SEARCHDNS="example.com:systemz.example.com" GATEWAY="192.168.17.254" DNS="192.168.17.1" MTU="4096"
章 20. 額外的開機選項
boot:
提示符號輸入您想要的指令。
開機時的指令參數
askmethod
- 在從 Red Hat Enterprise Linux CD-ROM 光碟機開機後,這個指令要求您指定安裝方式。
dd=url
- 這個參數將會在安裝程式中提示您使用位於指定 HTTP、FTP 或 NFS 網路位址的驅動程式映像檔。
display=ip:0
- 這個指令將允許遠端顯示的傳送。在這個指令中,要以您想要顯示的系統之 IP 位址取代 IP。在您想要顯示的系統上,您必須執行指令
xhost +remotehostname
,這裡的 remotehostname 就是您執行顯示來源的主機名稱。使用xhost +remotehostname
指令將會限制存取遠端的顯示終端機,而不允許沒有特定授權的任何人或系統做遠端存取。 mediacheck
- 這個指令提供測試安裝來源(如果是以 ISO 安裝的方式)之完整選項。這個指令可以使用在 CD、DVD、硬碟 ISO 與 NFS ISO 等的安裝方式。在安裝前,請驗證 ISO 影像檔是否完整,能避免安裝過程中經常遇到的問題。
noprobe
- 這個指令停用硬體偵測,而由使用者提供硬體資訊。
rescue
- this command runs rescue mode. Refer to 章 26, 基本的系統回復 for more information about rescue mode.
text
- 這個指令停用圖形安裝程式,並強制安裝程式在文字模式下執行。
vnc
- 這個指令允許您從 VNC 伺服器上進行安裝。
vncpassword=
- 這個指令用來設定連線到 VNC 伺服器的密碼。
noipv6
- 這個指令在安裝程式的第一階段開機過程中停用預設的 Ipv6 選項。經由選項指定 Ipv6 可以由手動設定,但是該 Ivp6 設定預設狀態將不會被啟用。
cmdline
- 3270 主控台(通常為安裝在 IBM System z 時使用)無法辨識大部分的 unix 式終端機的終端機編排格式輸入符號。在 kickstart 非交談式安裝時,指定這個選項來更改 anaconda 的狀態,因此在 3270 主控台輸出能有較佳表現。請不要在普通、交談式安裝上使用這個選項。
RUNKS=1
- 此選項用來指定(通常與
cmdline
選項連結)在 IBM System z 上的 kick start 非交談式安裝。
章 21. IBM System z 系統安裝的故障排除
21.1. 您無法啟動 Red Hat Enterprise Linux
21.1.1. 您的系統顯示 Signal 11 的錯誤嗎?
21.2. 安裝中的問題
21.2.1. 無法找到安裝 Red Hat Enterprise Linux 的裝置
之錯誤訊息
No devices found to install Red Hat Enterprise Linux
, then there may be an issue with your DASD devices. If you encounter this error, add the DASD=<disks>
parameter to your parm
file (where disks is the DASD range reserved for installation) and start the install again.
dasdfmt
指令格式化 DASD,而不是使用 CMS 來格式化 DASD。
21.2.2. 磁碟分割表的問題
21.2.3. 其它建立分割區的問題
- 一個
/
(root)分割區 - A <swap> partition of type swap
注意
21.2.4. 您有發現 Python 的錯誤嗎?
/tmp/
目錄之後發生。 這個錯誤看起來會類似:
Traceback (innermost last): File "/var/tmp/anaconda-7.1//usr/lib/anaconda/iw/progress_gui.py", line 20, in run rc = self.todo.doInstall () File "/var/tmp/anaconda-7.1//usr/lib/anaconda/todo.py", line 1468, in doInstall self.fstab.savePartitions () File "fstab.py", line 221, in savePartitions sys.exit(0) SystemExit: 0 Local variables in innermost frame: self: <fstab.GuiFstab instance at 8446fe0> sys: <module 'sys' (built-in)> ToDo object: (itodo ToDo p1 (dp2 S'method' p3 (iimage CdromInstallMethod p4 (dp5 S'progressWindow' p6 <failed>
/tmp/
的符號連結連到其它位置或在建立後已被更改。 這些符號連結或已更改的連結在安裝過程中無效,所以安裝程式無法寫入資訊而導致失敗。
http://www.redhat.com/support/errata/
http://rhlinux.redhat.com/anaconda/
http://bugzilla.redhat.com/bugzilla/
http://www.redhat.com/apps/activate/
21.3. 安裝後的問題
21.3.1. 遠端的圖形桌面與 XDMCP
vi
或 nano
等文字編輯器來編輯 Red Hat Enterprise Linux 系統上的 /etc/X11/gdm/gdm-config
檔案中的下列這一行。
[xdmcp] Enable=false
Enable=true
,儲存檔案後再離開文字編輯器。請轉換到執行層級 5 以啟動 X 伺服程式:
/sbin/init 5
X
的遠端 X 作業階段,舉例來說:
X :1 -query s390vm.example.com
:1
(可以使用 Ctrl-Alt-F8 按鍵 組合來進入)顯示作業階段顯示遠端的圖形登入畫面。
Xnest
允許使用者在他們本機的 X 作業階段以巢狀的方式開啟一個遠端的桌面。舉例來說,請使用下列指令來執行 Xnest
,以遠端 X 伺服程式的主機名稱取代 s390vm.example.com:
Xnest :1 -query s390vm.example.com
21.3.2. 當您試著要登入時的問題
linux single
的方式開機您的系統。
#
提示符號,您需要輸入 passwd root
,然後您便可以輸入新的 root 密碼。 再來,您可以輸入 shutdown -r now
,您的系統將會以您新的密碼重新啟動。
su -
and enter your root password when prompted. Then, type passwd <username>
. This allows you to enter a new password for the specified user account.
http://hardware.redhat.com/hcl/
21.3.3. 您的印表機無法運作
system-config-printer
指令以開始 印表機設定工具。如果您不是已 root 身份登入則會要求您輸入 root 密碼才能繼續。
21.3.4. Apache 為基礎的 httpd
服務與 Sendmail 在開機時中斷服務
httpd
或 Sendmail 服務中斷的情形,請確定在 /etc/hosts
檔案中有下列這一行:
127.0.0.1 localhost.localdomain localhost
章 22. 給 IBM System z 使用者的額外資訊
22.1. sysfs
檔案系統
sysfs
檔案系統,它可說是proc
、devfs
、與 devpty
的集合。sysfs
檔案系統列舉了連到系統的裝置與匯流排,整合到一個階層性的檔案系統下,可以從 user space(使用者空間)存取。sysfs
檔案系統用來處理之前位於 /proc/
目錄中的裝置與驅動程式特定選項,同時包括了之前 devfs
所提供的動態裝置功能。早期的 sysfs
中,許多驅動程式與工具程式還使用較老的 proc
項目;但可以確知的是,將來會走向 sysfs
。
sysfs
檔案系統掛載在 /sys/
之下,其中的目錄將連接到系統的裝置分成多種項目。/sysfs/
子目錄包括了:
/devices/
目錄這目錄包括了/css0/
目錄,其子目錄顯示了所有 Linux 核心偵測到的所有子通道(subchannel)。所有子通道目錄都以0.0.nnnn
格式顯示,其中 nnnn 是十六位元的子通道數值,從 0000 到 ffff。子通道目錄包括了狀態檔案,其它目錄則顯示了真正的裝置。裝置目錄的格式為0.0.xxxx
,其中 xxxx 是裝置的單位位址。/devices/
目錄也包括了裝置的狀態資訊,以及設定的選項。/bus/
目錄這包含了/ccw/
與/ccwgroup/
子目錄。CCW 裝置要通過通道指令集存取。/ccw/
目錄中的裝置只佔用主機通道子系統的一個子通道。CCW 群組裝置也通過通道指令集存取,但使用每個裝置的多個子通道。舉例來說,一組 3390-3 DASD 裝置使用一個子通道;而一張 OSA 介面卡的單組 QDIO 網路連接,卻使用了三個子通道。/ccw/
與/ccwgroup/
目錄都包括了裝置與驅動程式的子目錄:/devices/
目錄包括了指向/sys/devices/css0/
裝置目錄的連結(symbolic link)。/drivers/
目錄則包括目前系統載入的裝置之所有驅動程式,每個驅動程式各有一個目錄。dasd
、console
、qeth
與zfcp
驅動程式的目錄也位於此。/driver/
目錄包括了裝置驅動程式的設定,以及指向使用該驅動程式的裝置之連結(位於/sys/devices/css0/
目錄中)。/class/
目錄其中包括了許多子目錄,將性質相同的裝置,例如 ttys、SCSI 磁帶機、網路裝置、與其它雜項裝置等,放在一起。/block/
目錄這目錄中的子目錄,分別為系統上各別的 block device(區塊裝置):大部分是磁碟類的裝置,例如實體 DASD、loopback 裝置、以及軟體 RAID block device 等等。拿較早的 Linux 系統與使用sysfs
的系統比較,後者明顯需要需要用sysfs
名稱來指向裝置。在 2.4 核心的作業系統裡,zFCP
驅動程式會傳到裝置位址中;但在 2.6 核心中,驅動程式會以0.0.1600
傳送。
22.2. 使用 zFCP
驅動程式
/etc/zfcp.conf
檔案,其中紀錄了 SCSI 設定,並在 /etc/modprobe.conf
中加進一行 alias scsi_hostadapter zFCP
。這會載入需要的 zFCP
模組。
# cat /etc/zfcp.conf 0.0.010a 0x01 0x5005076300c18154 0x00 0x5719000000000000 # cat /etc/modprobe.conf alias eth0 qeth options dasd_mod dasd=201,4b2e alias scsi_hostadapter zfcp
# cd /lib/modules/2.6.7-1.451.2.3/kernel/drivers/s390/scsi # modprobe zfcp # lsmod Module Size Used by zfcp 221460 0 [permanent] autofs4 39944 0 qeth 166288 0 qdio 60240 3 zfcp,qeth ccwgroup 25344 1 qeth ipt_REJECT 23552 1 ipt_state 18944 5 ip_conntrack 57904 1 ipt_state iptable_filter 19712 1 ip_tables 37888 3 ipt_REJECT,ipt_state,iptable_filter sd_mod 39688 0 scsi_mod 182904 2 zfcp,sd_mod dm_mod 86408 0 ext3 179056 2 jbd 92720 1 ext3 dasd_fba_mod 25344 0 dasd_eckd_mod 77056 4 dasd_mod 85328 6 dasd_fba_mod,dasd_eckd_mod # cd /sys/bus/ccw/drivers/zfcp/0.0.010a # echo 1 > online # cat online 1 # echo 0x5005076300c18154 > /sys/bus/ccw/drivers/zfcp/0.0.010a/port_add # ls 0x5005076300c18154 failed lic_version s_id availability fc_link_speed nameserver status card_version fc_service_class online wwnn cmb_enable fc_topology port_add wwpn cutype hardware_version port_remove detach_state host2 scsi_host_no devtype in_recovery serial_number # cd /sys/bus/ccw/drivers/zfcp/0.0.010a/0x5005076300c18154 # echo 0x5719000000000000 > unit_add # ls 0x5719000000000000 d_id in_recovery status unit_remove detach_state failed scsi_id unit_add wwnn # cat /sys/bus/ccw/drivers/zfcp/0.0.010a/scsi_host_no 0x0 # cat /sys/bus/ccw/drivers/zfcp/0.0.010a/0x5005076300c18154/scsi_id 0x1 # cat \ /sys/bus/ccw/drivers/zfcp/0.0.010a/0x5005076300c18154/0x5719000000000000/scsi_lun 0x0 # cat /sys/bus/scsi/devices/0\:0\:1\:0/hba_id 0.0.010a # cat /sys/bus/scsi/devices/0\:0\:1\:0/wwpn 0x5005076300c18154 # cat /sys/bus/scsi/devices/0\:0\:1\:0/fcp_lun 0x5719000000000000 # cat /sys/bus/scsi/devices/0\:0\:1\:0/block/dev 8:0 # cat /sys/bus/scsi/devices/0\:0\:1\:0/block/sda1/dev 8:1 # cat /proc/scsi/scsi Attached devices: Host: scsi2 Channel: 00 Id: 01 Lun: 00 Vendor: IBM Model: 2105F20 Rev: .123 Type: Direct-Access ANSI SCSI revision: 03 # fdisk /dev/sda # mke2fs -j /dev/sda1 # mount /dev/sda1 /mnt # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/dasda1 2344224 1427948 797196 65% / none 511652 0 511652 0% /dev/shm /dev/dasdb1 2365444 32828 2212456 2% /opt /dev/sda1 3844088 32828 3615988 1% /mnt # cd /boot # mv initrd-2.6.7-1.451.2.3.img initrd-2.6.7-1.451.2.3.img.orig # mkinitrd -v --with=scsi_mod --with=zfcp --with=sd_mod initrd-2.6.7-1.451.2.3.img 2.6.7-1.451.2.3 Looking for deps of module ide-disk Looking for deps of module dasd_mod Looking for deps of module dasd_eckd_mod dasd_mod Looking for deps of module dasd_mod Looking for deps of module dasd_fba_mod dasd_mod Looking for deps of module dasd_mod Looking for deps of module ext3 jbd Looking for deps of module jbd Looking for deps of module scsi_mod Looking for deps of module zfcp qdio scsi_mod Looking for deps of module qdio Looking for deps of module scsi_mod Looking for deps of module sd_mod scsi_mod Looking for deps of module scsi_mod Using modules: ./kernel/drivers/s390/block/dasd_mod.ko ./kernel/drivers/s390/block/dasd_eckd_mod.ko ./kernel/drivers/s390/block/dasd_fba_mod.ko ./kernel/fs/jbd/jbd.ko ./kernel/fs/ext3/ext3.ko ./kernel/drivers/scsi/scsi_mod.ko ./kernel/drivers/s390/cio/qdio.ko ./kernel/drivers/s390/scsi/zfcp.ko ./kernel/drivers/scsi/sd_mod.ko Using loopback device /dev/loop0 /sbin/nash -> /tmp/initrd.cT1534/bin/nash /sbin/insmod.static -> /tmp/initrd.cT1534/bin/insmod `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_mod.ko'-> `/tmp/initrd.cT1534/lib/dasd_mod.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_eckd_mod.ko' -> `/tmp/initrd.cT1534/lib/dasd_eckd_mod.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_fba_mod.ko' -> `/tmp/initrd.cT1534/lib/dasd_fba_mod.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/fs/jbd/jbd.ko' -> `/tmp/initrd.cT1534/lib/jbd.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/fs/ext3/ext3.ko' -> `/tmp/initrd.cT1534/lib/ext3.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/scsi/scsi_mod.ko' -> `/tmp/initrd.cT1534/lib/scsi_mod.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/cio/qdio.ko' -> `/tmp/initrd.cT1534/lib/qdio.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/scsi/zfcp.ko' -> `/tmp/initrd.cT1534/lib/zfcp.ko' `/lib/modules/2.6.7-1.451.2.3/./kernel/drivers/scsi/sd_mod.ko' -> `/tmp/initrd.cT1534/lib/sd_mod.ko' ... Loading module dasd_mod with options dasd=201,4b2e Loading module dasd_eckd_mod Loading module dasd_fba_mod Loading module jbd Loading module ext3 Loading module scsi_mod Loading module qdio Loading module zfcp Loading module sd_mod # zipl -V Using config file '/etc/zipl.conf' Target device information Device..........................: 5e:00 Partition.......................: 5e:01 Device name.....................: dasda DASD device number..............: 0201 Type............................: disk partition Disk layout.....................: ECKD/compatible disk layout Geometry - heads................: 15 Geometry - sectors..............: 12 Geometry - cylinders............: 3308 Geometry - start................: 24 File system block size..........: 4096 Physical block size.............: 4096 Device size in physical blocks..: 595416 Building bootmap '/boot//bootmap' Building menu 'rh-automatic-menu' Adding #1: IPL section 'linux' (default) kernel image......: /boot/vmlinuz-2.6.7-1.451.2.3 at 0x10000 kernel parmline...: 'root=LABEL=/' at 0x1000 initial ramdisk...: /boot/initrd-2.6.7-1.451.2.3.img at 0x800000 Preparing boot device: dasda (0201). Preparing boot menu Interactive prompt......: disabled Menu timeout............: disabled Default configuration...: 'linux' Syncing disks... Done.
22.3. 利用 mdadm
設定 RAID 類與多路徑(Multipath)的儲存裝置
raidtools
套件組中的工具一樣,mdadm
指令可以用來執行所有與管理多裝置組相關的功能。在本節中,我們將告訴您如何利用 mdadm
指令,以:
- 建立 RAID 裝置
- 建立多路徑(multipath)裝置
22.3.1. 使用 mdadm
指令建立 RAID 裝置
/etc/mdadm.conf
檔案,設定適切的 DEVICE
與 ARRAY
值。
DEVICE /dev/sd[abcd]1 ARRAY /dev/md0 devices=/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1
DEVICE
一行使用的是傳統檔名的 glob 指令(請參照 glob
(7) man page 獲得更多訊息),以定義以下的 SCSI 裝置:
/dev/sda1
/dev/sdb1
/dev/sdc1
/dev/sdd1
ARRAY
一行則定義了 DEVICE
行中,組成 RAID 的裝置(/dev/md0
)。
/proc/mdstat
檔案顯示目前系統並無任何 RAID 裝置運作中:
Personalities : read_ahead not set Event: 0 unused devices: none
mdadm
指令,以建立 RAID 0 陣列:
mdadm -C /dev/md0 --level=raid0 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 \ /dev/sdd1 Continue creating array? yes mdadm: array /dev/md0 started.
mdadm --detail /dev/md0
指令的結果:
/dev/md0: Version : 00.90.00 Creation Time : Mon Mar 1 13:49:10 2004 Raid Level : raid0 Array Size : 15621632 (14.90 GiB 15.100 GB) Raid Devices : 4 Total Devices : 4 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Mon Mar 1 13:49:10 2004 State : dirty, no-errors Active Devices : 4 Working Devices : 4 Failed Devices : 0 Spare Devices : 0 Chunk Size : 64K Number Major Minor RaidDevice State 0 8 1 0 active sync /dev/sda1 1 8 17 1 active sync /dev/sdb1 2 8 33 2 active sync /dev/sdc1 3 8 49 3 active sync /dev/sdd1 UUID : 25c0f2a1:e882dfc0:c0fe135e:6940d932 Events : 0.1
22.3.2. 使用 mdadm
指令建立多路徑(multipath)裝置
mdadm
can also be used to take advantage of hardware supporting more than one I/O path to individual SCSI LUNs (disk drives). The goal of multipath storage is continued data availability in the event of hardware failure or individual path saturation. Because this configuration contains multiple paths (each acting as an independent virtual controller) accessing a common SCSI LUN (disk drive), the Linux kernel detects each shared drive once "through" each path. In other words, the SCSI LUN (disk drive) known as /dev/sda
may also be accessible as /dev/sdb
, /dev/sdc
, and so on, depending on the specific configuration.
mdadm
為 level
選項提供了額外的參數。這參數 multipath
會指向 Linux 核心的 md 層,在一條 I/O 路徑失效時,將 I/O 需求引導到另一條路徑去。
/etc/mdadm.conf
檔,定義 DEVICE
與 ARRAY
兩行的值,以反映您的硬體設定。
注意
/etc/mdadm.conf
中的磁碟都代表不同的實體磁碟機),這檔案中的每個裝置都指向同一台分享磁碟機。
multipath
參數:
mdadm -C /dev/md0 --level=multipath --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 Continue creating array? yes mdadm: array /dev/md0 started.
/dev/md0
之後,所有參照 /dev/md0
的 I/O 都會導向到 /dev/sda1
、/dev/sdb1
、/dev/sdc1
、或 /dev/sdd1
(視目前哪一條路徑在運行中,並且是可用的)。
mdadm --detail /dev/md0
指令,查詢 /dev/md0
的細部設定,以確定它的確是多路徑裝置:
/dev/md0: Version : 00.90.00 Creation Time : Tue Mar 2 10:56:37 2004 Raid Level : multipath Array Size : 3905408 (3.72 GiB 3.100 GB) Raid Devices : 1 Total Devices : 4 Preferred Minor : 0 Persistence : Superblock is persistent Update Time : Tue Mar 2 10:56:37 2004 State : dirty, no-errors Active Devices : 1 Working Devices : 4 Failed Devices : 0 Spare Devices : 3 Number Major Minor RaidDevice State 0 8 49 0 active sync /dev/sdd1 1 8 17 1 spare /dev/sdb1 2 8 33 2 spare /dev/sdc1 3 8 1 3 spare /dev/sda1 UUID : 4b564608:fa01c716:550bd8ff:735d92dc Events : 0.1
mdadm
的特點是能從操作設定中,強迫移除裝置(不管是 RAID 陣列或多路徑設定的裝置皆可)。在接下來的例子中,/dev/sda1
已經被標示為發生錯誤,然後將被移除,最後在加回設定中。對多路徑的設定來說,這些動作不會對 I/O 活動產生任何衝擊:
# mdadm /dev/md0 -f /dev/sda1 mdadm: set /dev/sda1 faulty in /dev/md0 # mdadm /dev/md0 -r /dev/sda1 mdadm: hot removed /dev/sda1 # mdadm /dev/md0 -a /dev/sda1 mdadm: hot added /dev/sda1 #
22.4. 從 SCSI 裝置設定 IPL
22.4.1. 開機時啟動 SCSI 硬碟
SET LOADDEV
指令,提供了 WWPN 與 LUN 給開機程式使用。
#cp set loaddev portname 50050763 00c18154 lun 57190000 00000000 Ready; T=0.01/0.01 15:47:53 q loaddev PORTNAME 50050763 00C18154 LUN 57190000 00000000 BOOTPROG 0 BR_LBA 00000000 00000000 Ready; T=0.01/0.01 15:47:56
q fcp 00: FCP 010A ON FCP 010ACHPID C1 SUBCHANNEL = 0000 00: 010A QDIO-ELIGIBLE QIOASSIST-ELIGIBLE Ready; T=0.01/0.01 15:51:29 i 010a 00: I 010A 00: HCPLDI2816I Acquiring the machine loader from the processor controller. 00: HCPLDI2817I Load completed from the processor controller. 00: HCPLDI2817I Now starting machine loader version 0001. 01: HCPGSP2630I The virtual machine is placed in CP mode due to a SIGP stop and store status from CPU 00. 00: MLOEVL012I: Machine loader up and running (version 0.13). 00: MLOPDM003I: Machine loader finished, moving data to final storage location. Linux version 2.6.7-1.451.2.3 (bhcompile@example.z900.redhat.com) (gcc version 3.4 .1 20040702 (Red Hat Linux 3.4.1-2)) #1 SMP Wed Jul 14 17:52:22 EDT 2004 We are running under VM (64 bit mode)
注意
22.5. 加入 DASD
注意
CP LINK RHEL4X 4B2E 4B2E MR DASD 4B2E LINKED R/W
cd
指令移到代表該 volume 的 /sys/
目錄:
# cd /sys/bus/ccw/drivers/dasd-eckd/0.0.4b2e/ # ls -l total 0 -r--r--r-- 1 root root 4096 Aug 25 17:04 availability -rw-r--r-- 1 root root 4096 Aug 25 17:04 cmb_enable -r--r--r-- 1 root root 4096 Aug 25 17:04 cutype -rw-r--r-- 1 root root 4096 Aug 25 17:04 detach_state -r--r--r-- 1 root root 4096 Aug 25 17:04 devtype -r--r--r-- 1 root root 4096 Aug 25 17:04 discipline -rw-r--r-- 1 root root 4096 Aug 25 17:04 online -rw-r--r-- 1 root root 4096 Aug 25 17:04 readonly -rw-r--r-- 1 root root 4096 Aug 25 17:04 use_diag
# cat online 0
# echo 1 > online # cat online 1
# ls -l total 0 -r--r--r-- 1 root root 4096 Aug 25 17:04 availability lrwxrwxrwx 1 root root 0 Aug 25 17:07 block -> ../../../../block/dasdb -rw-r--r-- 1 root root 4096 Aug 25 17:04 cmb_enable -r--r--r-- 1 root root 4096 Aug 25 17:04 cutype -rw-r--r-- 1 root root 4096 Aug 25 17:04 detach_state -r--r--r-- 1 root root 4096 Aug 25 17:04 devtype -r--r--r-- 1 root root 4096 Aug 25 17:04 discipline -rw-r--r-- 1 root root 0 Aug 25 17:04 online -rw-r--r-- 1 root root 4096 Aug 25 17:04 readonly -rw-r--r-- 1 root root 4096 Aug 25 17:04 use_diag
/dev/dasdb
為名被系統存取。
cd
指令切換到 /root
目錄下,並將該裝置格式化:
# cd # dasdfmt -b 4096 -d cdl -f /dev/dasdb -l LX4B2E -p -y cyl 97 of 3338 |#----------------------------------------------| 2%
fdasd
將這裝置格式化:
# fdasd -a /dev/dasdb auto-creating one partition for the whole disk... writing volume label... writing VTOC... checking ! wrote NATIVE! rereading partition table...
# mke2fs -j /dev/dasdb1 mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 300960 inodes, 600816 blocks 30040 blocks (5.00%) reserved for the super user First data block=0 19 block groups 32768 blocks per group, 32768 fragments per group 15840 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 39 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
# mount /dev/dasdb1 /opt # mount /dev/dasda1 on / type ext3 (rw) none on /proc type proc (rw) none on /sys type sysfs (rw) none on /dev/pts type devpts (rw,gid=5,mode=620) none on /dev/shm type tmpfs (rw) /dev/dasdb1 on /opt type ext3 (rw)
/etc/fstab
中加入一條紀錄,讓系統開機的時候,即可掛載檔案系統:
# vi /etc/fstab # cat /etc/fstab LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /dev/shm tmpfs defaults 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 /dev/dasdb1 /opt ext3 defaults 1 2
/etc/modprobe.conf
中,把裝置加入 dasd_mod 選項中。確定在清單的最後,加入新裝置,否則這清單會改變裝置的號碼:devnode 對應與檔案系統不再位於裝置該在的位置。
# vi /etc/modprobe.conf # cat /etc/modprobe.conf alias eth0 qeth options dasd_mod dasd=201,4B2E
mkinitrd
指令,把變更加入 modprobe.conf
中,讓裝置在下次開機時,能恢復上線並可掛載到系統上:
/tmp/initrd.AR1182/lib/dasd_mod.ko(elf64-s390)
.
# cd /boot # mv initrd-2.6.7-1.451.2.3.img initrd-2.6.7-1.451.2.3.img.old # mkinitrd -v initrd-2.6.7-1.451.2.3.img 2.6.7-1.451.2.3 Looking for deps of module ide-disk Looking for deps of module dasd_mod Looking for deps of module dasd_eckd_mod dasd_mod Looking for deps of module dasd_mod Looking for deps of module dasd_fba_mod dasd_mod Looking for deps of module dasd_mod Looking for deps of module ext3 jbd Looking for deps of module jbd Using modules: ./kernel/drivers/s390/block/dasd_mod.ko ./kernel/drivers/s390/block/dasd_eckd_mod.ko ./kernel/drivers/s390/block/dasd_fba_mod.ko ./kernel/fs/jbd/jbd.ko ./kernel/fs/ext3/ext3.ko Using loopback device /dev/loop0 /sbin/nash -> /tmp/initrd.AR1182/bin/nash /sbin/insmod.static -> /tmp/initrd.AR1182/bin/insmod copy from /lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_mod.ko (elf64-s390) to /tmp/initrd.AR1182/lib/dasd_mod.ko(elf64-s390) copy from /lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_eckd_mod.ko (elf64-s390) to /tmp/initrd.AR1182/lib/dasd_eckd_mod.ko (elf64-s390) copy from /lib/modules/2.6.7-1.451.2.3/./kernel/drivers/s390/block/dasd_fba_mod.ko (elf64-s390) to /tmp/initrd.AR1182/lib/dasd_fba_mod.ko (elf64-s390) copy from /lib/modules/2.6.7-1.451.2.3/./kernel/fs/jbd/jbd.ko(elf64-s390) to /tmp/initrd.AR1182/lib/jbd.ko(elf64-s390) copy from /lib/modules/2.6.7-1.451.2.3/./kernel/fs/ext3/ext3.ko(elf64-s390) to /tmp/initrd.AR1182/lib/ext3.ko(elf64-s390) Loading module dasd_mod with options dasd=201,4B2E Loading module dasd_eckd_mod Loading module dasd_fba_mod Loading module jbd Loading module ext3
zipl
將變更存入 initrd
,使得下次系統開機時,改變也能生效。
# zipl -V Using config file '/etc/zipl.conf' Target device information Device..........................: 5e:00 Partition.......................: 5e:01 Device name.....................: dasda DASD device number..............: 0201 Type............................: disk partition Disk layout.....................: ECKD/compatible disk layout Geometry - heads................: 15 Geometry - sectors..............: 12 Geometry - cylinders............: 3308 Geometry - start................: 24 File system block size..........: 4096 Physical block size.............: 4096 Device size in physical blocks..: 595416 Building bootmap '/boot//bootmap' Building menu 'rh-automatic-menu' Adding #1: IPL section 'linux' (default) kernel image......: /boot/vmlinuz-2.6.7-1.451.2.3 at 0x10000 kernel parmline...: 'root=LABEL=/' at 0x1000 initial ramdisk...: /boot/initrd-2.6.7-1.451.2.3.img at 0x800000 Preparing boot device: dasda (0201). Preparing boot menu Interactive prompt......: disabled Menu timeout............: disabled Default configuration...: 'linux' Syncing disks... Done.
22.6. 加入網路裝置
proc
檔案系統不再用來控制網路裝置,或顯示網路裝置的狀態。- 新的
sys
檔案系統提供了控制裝置的機制。 - 現在
/sys/class/net/interface_name/device
提供了運作中裝置的狀態。interface_name
這名稱就像eth0
或eth2
一樣,在設定裝置時,由驅動程式授予網路介面。 /etc/chandev.conf
不復存在。現在,sys
檔案系統包含了之前在/etc/chandev.conf
中被取代的資訊。/etc/modules.conf
不復存在。網路介面的別名規格,現在置於/etc/modprobe.conf
中。
qeth
裝置” describes in detail how to add a qeth device to an existing instance of Red Hat Enterprise Linux. 節 22.6.2, “加入網路裝置的快速指引” is a quick reference for installing other IBM System z network interfaces.
22.6.1. 加入 qeth
裝置
qeth
裝置的驅動程式模組是否已經載入。
# lsmod | grep qeth qeth 135240 0 qdio 45360 2 qeth ipv6 303984 13 qeth ccwgroup 15104 1 qeth
lsmod
指令顯示模組尚未被載入,請執行 modprobe
載入這些模組:
# modprobe qeth
qeth
群組裝置。
# echo read_device_bus_id,write_device_bus_id, data_device_bus_id > /sys/bus/ccwgroup/drivers/qeth/group
# echo 0.0.0600,0.0.0601,0.0.0602 > /sys/bus/ccwgroup/drivers/qeth/group
qeth
群組裝置是否建立正確。
# ls /sys/bus/ccwgroup/drivers/qeth 0.0.0600 0.0.09a0 group notifier_register
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/portname no portname required
注意
# echo portname > /sys/bus/ccwgroup/drivers/qeth/0.0.0600/portname
# echo 1 /sys/bus/ccwgroup/drivers/qeth/0.0.0600/online
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/online1
# cat /sys/bus/ccwgroup/drivers/qeth/0.0.0600/if_name eth1
if_name
的值,請使用以下指令:
# echo new_if_name > /sys/bus/ccwgroup/drivers/qeth/0.0.0600/if_name
add_hhlen
broadcast_mode
buffer_count
canonical_macaddr
card_type
checksumming
chpid
detach_state
fake_broadcast
fake_ll
ipa_takeover
portno
priority_queueing
recover
route4
rxip
state
ungroup
vipa
/etc/sysconfig/network-scripts/
目錄下。
if_name
檔案裡的值;這例子中是 eth1
。
# cd /etc/sysconfig/network-scripts # cp ifcfg-eth0 ifcfg-eth1
ifcfg-eth0
例子為樣板,建立您所需的檔案。
/etc/sysconfig/network-scripts/ifcfg-eth0 # IBM QETH DEVICE=eth0 BOOTPROTO=static HWADDR=00:06:29:FB:5F:F1 IPADDR=9.12.20.136 NETMASK=255.255.255.0 ONBOOT=yes NETTYPE=qeth SUBCHANNELS=0.0.09a0,0.0.09a1,0.0.09a2 TYPE=Ethernet
ifcfg-eth1
檔案。
if_name
檔案內容。
yes
。
qeth
裝置的硬體位址相同。
/etc/sysconfig/network-scripts/ifcfg-eth1 # IBM QETH DEVICE=eth1 BOOTPROTO=static IPADDR=192.168.70.87 NETMASK=255.255.255.0 ONBOOT=yes NETTYPE=qeth SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602 TYPE=Ethernet
qeth
裝置設定一個別名,並紀錄在 /etc/modprobe.conf
中。請編輯這檔案,加入介面的別名。
/etc/modprobe.conf alias eth0 qeth alias eth1 qeth options dasd_mod dasd=0.0.0100,0.0.4b19
# ifup eth1
# ifconfig eth1 eth1 Link encap:Ethernet HWaddr 02:00:00:00:00:01 inet addr:192.168.70.87 Bcast:192.168.70.255 Mask:255.255.255.0 inet6 addr: fe80::ff:fe00:1/64 Scope:Link UP BROADCAST RUNNING NOARP MULTICAST MTU:1492 Metric:1 RX packets:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:644 (644.0 b) TX bytes:264 (264.0 b)
ifconfig
執行結果中,第一行的 HWaddr
欄位。請把這欄位之後的值加到 ifcfg-eth1
檔案中,底下這行是個範例:
HWADDR=02:00:00:00:00:01
ifcfg-eth1
看起來如下:
# IBM QETH DEVICE=eth1 HWADDR=02:00:00:00:00:01 BOOTPROTO=static IPADDR=192.168.70.69 NETMASK=255.255.255.0 ONBOOT=yes NETTYPE=qeth SUBCHANNELS=0.0.0600,0.0.0601,0.0.0602 TYPE=Ethernet
# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.70.0 * 255.255.255.0 U 0 0 0 eth1 9.12.20.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth1 default pdlrouter-if5.p 0.0.0.0 UG 0 0 0 eth0
ping
指令看是否能接觸到閘道器,以驗證您的改變是否正確:
# ping -c 1 192.168.70.8 PING 192.168.70.8 (192.168.70.8) 56(84) bytes of data. 64 bytes from 192.168.70.8: icmp_seq=0 ttl=63 time=8.07 ms
/etc/sysconfig/network
。
22.6.2. 加入網路裝置的快速指引
- 載入裝置的驅動程式。
- 建立群組裝置:
- 設定裝置。
- 將裝置上線:
- 定義別名(如果需要的話)。
- 為設定建立 script。
- 啟動裝置。
22.6.2.1. 採用 LCS 裝置驅動程式
- 載入裝置的驅動程式:
# modprobe lcs
- 建立群組裝置:
# echo read_device_bus_id,write_device_bus_id > /sys/bus/ccwgroup/drivers/lcs/group
Due to the length of this command, it has been broken into two lines. - 設定裝置。OSA 卡能為單一 CHPID 提供多達 16 組連接埠。預設上 LCS 群組裝置會使用第 0 號連接埠。要採用其它連接埠,請使用類似以下的指令:
# echo portno > /sys/bus/ccwgroup/drivers/lcs/device_bus_id/portno
如果要更進一步了解設定 LCS 驅動程式的相關資訊,請參照:http://www- 128.ibm.com/developerworks/linux/linux390/october2005_documentation.html#3 (IBM System z 與 S/390 的 Linux 裝置驅動程式、功能與指令) - 將裝置上線:
# echo 1 > /sys/bus/ccwgroup/drivers/lcs/read_device_bus_id/online
- 定義別名。根據要加入的介面種類,請在
/etc/modprobe.conf
檔案中加入類似底下這一行:ethn alias lcs trn alias lcs
- 為設定建立 script。在
/etc/sysconfig/network-scripts/
目錄中建立一個檔案,檔名近似以下範例:ifcfg-ethn ifcfg-trn
這檔案看起來如下:/etc/sysconfig/network-scripts/ifcfg-eth0
# IBM LCS DEVICE=eth0 BOOTPROTO=static HWADDR=00:06:29:FB:5F:F1 IPADDR=9.12.20.136 NETMASK=255.255.255.0 ONBOOT=yes NETTYPE=lcs SUBCHANNELS=0.0.09a0,0.0.09a1 PORTNAME=0 TYPE=Ethernet根據要加入的介面種類,DEVICE 參數應該是以下之一:DEVICE=ethn DEVICE=trn
- 啟動裝置。根據要加入的介面種類,請使用
ifup
指令:# ifup ethn # ifup trn
22.6.2.2. 採用 QETH 裝置驅動程式
- HiperSocket 裝置的 hsin
- OSA-Express 高速乙太網路與十億位元乙太網路的 ethn。
- 環狀網路用的 trn。
- 載入裝置的驅動程式:
# modprobe qeth
- 建立群組裝置:
# echo read_device_bus_id,write_device_bus_id,data_device_bus_id > /sys/bus/ccwgroup/drivers/qeth/group
Due to the length of this command, it has been broken into two lines. - 設定裝置。如果要更進一步了解設定 QETH 驅動程式的相關資訊,請參照:http://oss.software.ibm.com/developerworks/opensource/linux390/docu/lx26apr04dd01.pdf(IBM System z 與 S/390 的 Linux 裝置驅動程式、功能與指令)
- 將裝置上線:
# echo 1 > /sys/bus/ccwgroup/drivers/qeth/read_device_bus_id/online
- 定義別名。根據要加入的介面種類,請在
/etc/modprobe.conf
檔案中加入類似以下的一行:hsin alias qeth ethn alias qeth trn alias qeth
- 為設定建立 script。在
/etc/sysconfig/network-scripts/
目錄中建立一個檔案,檔名近似以下範例:ifcfg-hsin ifcfg-ethn ifcfg-trn
這檔案看起來像:/etc/sysconfig/network-scripts/ifcfg-eth0
# IBM QETH DEVICE=eth0 BOOTPROTO=static HWADDR=00:06:29:FB:5F:F1 IPADDR=9.12.20.136 NETMASK=255.255.255.0 ONBOOT=yes NETTYPE=qeth SUBCHANNELS=0.0.09a0,0.0.09a1,0.0.09a2 TYPE=Ethernet根據要加入的介面種類,DEVICE 參數應該類似以下之一:DEVICE=hsin DEVICE=ethn DEVICE=trn
- 啟動裝置。根據要加入的介面種類,請使用
ifup
指令:# ifup hsin # ifup ethn # ifup trn
22.7. 核心相關的資訊
/proc/
檔案系統來達成。要取消定期的系統中斷,請使用以下指令:
echo 0 > /proc/sys/kernel/hz_timer
echo 1 > /proc/sys/kernel/hz_timer
/etc/sysctl.conf
設定檔中加入以下一行,以取消定期中斷功能:
kernel.hz_timer = 0
注意
部 IV. 一般工作項
章 23. 升級您目前的系統
23.1. 決定要升級還是重新安裝
- 在升級之後,因為多種設定檔的格式改變,所以獨立套件設定檔不一定還可以繼續運作。
- If you have one of Red Hat's layered products (such as the Cluster Suite) installed, it may need to be manually upgraded after the Red Hat Enterprise Linux upgrade has been completed.
- 在升級之後,協力廠商或獨立軟體開發商的應用程式可能無法正常運作。
.rpmsave
副檔名重新命名(例如,sendmail.cf.rpmsave
)。升級的過程也會建立一個 /root/upgrade.log
紀錄檔。
警告
注意
23.2. 升級您的系統
注意
/etc/redhat-release
檔案的預設內容已經被更改過,當試著要升級至 Red Hat Enterprise Linux 5.0 時,也許會找不到您的 Red Hat Enterprise Linux 安裝。
linux upgradeany
linux upgradeany
開機指令。
章 24. 啟動您的產品
24.1. RHN 註冊
- 登入 Red Hat
- 輸入安裝序號
- 連上網際網路
24.1.1. 登入 Red Hat
https://www.redhat.com/apps/activate/newlogin.html
- 從 Red Hat Network 獲得軟體更新、修正、以及維護。
- Red Hat 的技術支援、文件、以及知識庫
https://rhn.redhat.com/help/forgot_password.pxt
24.1.2. 輸入您的安裝序號
24.1.3. 連上網際網路
- 使用設定代理程式 — 當螢幕上出現發送硬體資訊 與 發送系統套件清單時,檢查這些資訊是否有誤。
- 設定代理程式執行完成後 — 請從 主目錄(控制台上的主目錄)、系統工具(System Tools),點選套件更新。
- 設定代理程式完成後 —,在指令列下以 root 身份登入,輸入以下指令:
/usr/bin/rhn_register --register
章 25. 磁碟分割區的介紹
注意
25.1. 硬碟基本概念
圖形 25.1. 一個未使用過的硬碟
25.1.1. 寫入的方式遠過於寫入的內容
圖形 25.2. 有檔案系統存在的硬碟
- A small percentage of the drive's available space is used to store file system-related data and can be considered as overhead.
- A file system splits the remaining space into small, consistently-sized segments. For Linux, these segments are known as blocks. [11]
圖形 25.3. 有不同檔案系統的磁碟
圖形 25.4. 有寫入資料的磁碟
25.1.2. 磁碟分割區:將一個硬碟變成很多個
注意
圖形 25.5. 含有磁碟分割表的硬碟
- 分割區在這個磁碟上起始與結束的點。
- Whether the partition is "active"
- The partition's type
圖形 25.6. 含有單一分割區的磁碟
表格 25.1. 分割區類型
分割區類型 | 數值 | 分割區類型 | 數值 |
---|---|---|---|
空的 | 00 | Novell Netware 386 | 65 |
DOS 12 位元 FAT | 01 | PIC/IX | 75 |
XENIX root | 02 | Old MINIX | 80 |
XENIX usr | 03 | Linux/MINUX | 81 |
DOS 16-bit <=32M | 04 | Linux swap | 82 |
Extended | 05 | Linux native | 83 |
DOS 16-bit >=32 | 06 | Linux extended | 85 |
OS/2 HPFS | 07 | Amoeba | 93 |
AIX | 08 | Amoeba BBT | 94 |
AIX 可開機的 | 09 | BSD/386 | a5 |
OS/2 Boot Manager | 0a | OpenBSD | a6 |
Win95 FAT32 | 0b | NEXTSTEP | a7 |
Win95 FAT32 (LBA) | 0c | BSDI fs | b7 |
Win95 FAT16 (LBA) | 0e | BSDI swap | b8 |
Win95 Extended (LBA) | 0f | Syrinx | c7 |
Venix 80286 | 40 | CP/M | db |
Novell | 51 | DOS access | e1 |
PPC PReP 啟動 | 41 | DOS R/O | e3 |
GNU HURD | 63 | DOS secondary | f2 |
Novell Netware 286 | 64 | BBT | ff |
25.1.3. 分割區中的分割區 - 延伸分割區的概論
圖形 25.7. 含有延伸分割區的磁碟
25.1.4. 建立空間給 Red Hat Enterprise Linux
- 有未分割的剩餘空間
- 有未使用的分割區
- 正在使用的分割區上有剩餘的空間
注意
25.1.4.1. 使用未分割的剩餘空間
圖形 25.8. 磁碟含有未分割的剩餘空間
25.1.4.2. 使用一個未被使用的分割區空間
圖形 25.9. 含有一個未使用分割區的磁碟
25.1.4.3. 使用開機分割區上的剩餘空間
- Destructive Repartitioning
- 基本上就是刪除這個單一的大型分割區,然後再建立幾個比較小的。您應該也可以想到,在分割區上的所有資料都刪除掉了。這表示您有必要做完全的備份。但為了保險起見,還是建議您做兩份備份,並使用『資料確認』(如果您的備份軟體有提供的話),然後在刪除分割區之前,試著從您的備份中讀取資料。
警告
如果在該分割區上有安裝了某種作業系統,您將需要重新安裝它。請注意,有些買來已經安裝好作業系統的電腦並沒有附上可以用來重新安裝作業系統的光碟片。因此在您刪除原始分割區與它其上安裝好的作業系統之前,最好先確定一下是否有附上光碟片。After creating a smaller partition for your existing operating system, you can reinstall any software, restore your data, and start your Red Hat Enterprise Linux installation. 圖形 25.10, “毀滅性重新分割後的磁碟” shows this being done.圖形 25.10. 毀滅性重新分割後的磁碟
In 圖形 25.10, “毀滅性重新分割後的磁碟”, 1 represents before and 2 represents after.警告
As 圖形 25.10, “毀滅性重新分割後的磁碟”, shows, any data present in the original partition is lost without proper backup! - Non-Destructive Repartitioning
- 在這裡,您會執行一種看起來似乎不可能的程式:該程式使得一個大的分割區變小,而且不影響儲存在其上的資料。許多人覺得這個方法很穩定而且比較沒有麻煩。那到底是什麼樣的軟體可以用來執行這種技術呢?市面上有許多種磁碟管理的軟體。您必須做一些研究,以找出最適合您狀況的程式。這種非毀滅性的重新磁碟分割過程是比較直接的,它牽涉到許多步驟:
- 壓縮並備份現有的資料
- Resize the existing partition
- Create new partition(s)
25.1.4.3.1. 壓縮現有的資料
圖形 25.11. 已壓縮過的磁碟
25.1.4.3.2. Resize the existing partition
圖形 25.12. 已調整過分割區大小的磁碟
25.1.4.3.3. Create new partition(s)
圖形 25.13. 完成分割區設定的磁碟
注意
parted
工具程式。這是一種可免費取得的程式,可用來調整分割區的大小。
parted
來重新分割您的硬碟,您必須先熟悉磁碟儲存的方式,並且先備份您電腦中的資料。您應該要建立兩份所有在您電腦上資料的複本。這些複本必須存放在可移除的媒體上(例如磁帶、CD-ROM 或軟碟上),而且在繼續之前您必須確定它們是可以讀取的。
parted
,請注意在 parted
執行完後,您會只剩下 兩個 分割區:一個是您調整過的,另一個是 parted
從新釋放出來的空間建立的。如果您的目的是使用那個空間來安裝 Red Hat Enterprise Linux,您應該要刪除這個新建立的分割區,您可以使用在目前作業系統下的磁碟分割工具或在安裝過程中設定分割區時將之刪除。
25.1.5. 分割區命名規則
- Each partition's type is checked to determine if it can be read by DOS/Windows.
- If the partition's type is compatible, it is assigned a "drive letter." The drive letters start with a "C" and move on to the following letters, depending on the number of partitions to be labeled.
- 這個磁碟機代號就可用來表示該分割區以及在分割區上的檔案系統。
/dev/xxyN
。
/dev/
- 這個是存放所有裝置檔案的目錄名稱。因為分割區是存放在硬碟上,而硬碟是一種裝置,所以表示所有可能分割區的檔案都會放置在
/dev/
目錄中。 xx
- 分割區名稱最前面的兩個字母代表存放該分割區的裝置類型。通常您不是看到
hd
(表示 IDE 硬碟)就是sd
(代表 SCSI 硬碟)。 y
- 這個字母代表存放該分割區的裝置。例如,
/dev/hda
(第一個 IDE 硬碟)或/dev/sdb
(第二個 SCSI 硬碟)。 N
- 最後的號碼表示分割區。最前面的四個(主要或延伸的)分割區以
1
到4
表示。邏輯分割區以5
開始。因此,例如,/dev/hda3
代表第一個 IDE 硬碟上第三個主要或延伸的分割區,而/dev/sdb6
代表第二個 SCSI 硬碟上的第二個邏輯分割區。
注意
25.1.6. 磁碟分割區與其它的作業系統
25.1.7. 磁碟分割區與掛載點
/dev/hda5
被掛載到 /usr/
,這將表示所有在 /usr/
目錄下的檔案與目錄都是實際存放在 /dev/hda5
中。所以檔案 /usr/share/doc/FAQ/txt/Linux-FAQ
將會儲存在 /dev/hda5
上,而檔案 /etc/X11/gdm/Sessions/Gnome
則不是。
/usr/
目錄下的一個或多個目錄是屬於其它分割區的掛載點。例如,一個分割區(如 /dev/hda7
)也許會被掛載到 /usr/local/
目錄,表示 /usr/local/man/whatis
檔案將會存放在 /dev/hda7
上,而不是在 /dev/hda5
上。
25.1.8. 多少分割區才夠用?
swap
、/boot/
(或 Itanium 系統使用的/boot/efi/
分割區)、Itanium 系統使用 /var/
分割區以及 /
(root)。
部 V. 基本的系統回復
章 26. 基本的系統回復
26.1. 一般問題
- 您無法正常開機進入 Red Hat Enterprise Linux(執行層級 3 或 5)。
- You are having hardware or software problems, and you want to get a few important files off of your system's hard drive.
- 您忘記您的 root 密碼。
26.1.1. 無法開機進入 Red Hat Enterprise Linux
/
分割區的號碼更改了,開機管理程式將無法找到並掛載該分割區。 如要修復這個問題,請開機進入救援模式,並修改 /boot/grub/grub.conf
。
26.1.2. 硬體/軟體問題
26.1.3. Root 密碼
passwd
指令來重設 root 密碼。
26.2. 開機進入救援模式
- 從安裝的開機光碟啟動系統。
- 從安裝啟動媒體(例如 USB 隨身)碟開機。
- 使用 Red Hat Enterprise Linux CD-ROM #1 啟動系統。
rescue
當作一個核心參數,舉例來說,對於 x86 系統,請在安裝的開機提示符號輸入以下指令:
linux rescue
The rescue environment will now attempt to find your Linux installation and mount it under the directory /mnt/sysimage. You can then make any changes required to your system. If you want to proceed with this step choose 'Continue'. You can also choose to mount your file systems read-only instead of read-write by choosing 'Read-only'. If for some reason this process fails you can choose 'Skip' and this step will be skipped and you will go directly to a command shell.
/mnt/sysimage/
目錄下,如果無法掛載該分割區,系統將會提示您。如果您選取 唯讀,系統將會試著以僅能讀取的模式掛載檔案系統到 /mnt/sysimage/
目錄下。如果您選取 略過,您的檔案系統將不會被掛載,如果您認為您的檔案系統已經毀損了,請選擇 略過。
sh-3.00b#
chroot /mnt/sysimage
rpm
指令時(需要您的根目錄分割區掛載為 /
)。如要離開 chroot
的環境,請輸入 exit
,您則會回到提示符號。
/foo
的目錄,然後輸入以下指令:
mount -t ext3 /dev/mapper/VolGroup00-LogVol02 /foo
/foo
是您剛建立的目錄,而 /dev/mapper/VolGroup00-LogVol02
為您想要掛載的 LVM 邏輯空間。如果該分割區類型為 ext2
,請以 ext2
取代 ext3
。
fdisk -l
pvdisplay
vgdisplay
lvdisplay
ssh
,scp
與ping
:測試網路是否已啟動dump
與restore
:適用於擁有磁帶機的使用者parted
與fdisk
:用來管理分割區rpm
:用來安裝或升級軟體joe
來編輯設定檔注意
如果您試著啟動其它受歡迎的編輯器,例如emacs
、pico
或vi
,將會啟動joe
編輯器。
26.2.1. 重新安裝開機管理程式
- 從安裝開機媒體啟動系統。
- 在開機提示符號下輸入
linux rescue
以進入救援環境。 - 請輸入
chroot /mnt/sysimage
以掛載 root 分割區。 - 在
/dev/hda
為開機分割機的情況下,輸入/sbin/grub-install /dev/hda
重新安裝 GRUM 開機管理程式。 /boot/grub/grub.conf
檔案,瀏覽其它 GRUB 控制其它作業系統所需的檔案。- 重新啟動系統。
26.3. 開機進入單機使用者模式
- 在開機時的 GRUB 顯示畫面,按任一鍵進入 GRUB 互動選單。
- 選取您想要開機的 Red Hat Enterprise Linux 核心版本,再輸入
a
來新增資訊到該行。 - 在該行的最後輸入另一個字
single
(按下 空白鍵 然後再輸入single
),再按下 Enter 以離開編輯模式。
26.4. 開機進入緊急模式
init
檔案。因此當 init
檔案毀損或無法使用時,您仍然可以掛載檔案系統以回復重新安裝階段中遺失的資料。
single
with the keyword emergency
.
章 27. POWER 系統的救援模式
'rescue'
(including the quotes), or to 'dd rescue'
if you need to load the SCSI driver. On other systems, specify the rescue
or dd rescue
(without quotes) after the default kernel name at the YABOOT prompt.
exit 0
來離開 shell。這將會導致 C 那邊重新開機,如要從 A 或 B 或是從 *NWSSTG 來重新開機,您應該要關閉(vary off)系統而不是離開 shell。
27.1. 從救援模式存取 SCSI 工具的特殊考量
- 使用
linux rescue askmethod
從光碟開機,這讓您可以選擇 NFS 當作救援媒體的來源,而不是預設為光碟機。 - 請複製第一片安裝光碟的內容到另一部 Linux 系統的檔案系統中。
- 使得這個安裝光碟的副本可以通過 NFS 或 FTP 被存取使用。
- 關閉或關機您需要救援的系統,依照指示設定 IPL 參數以啟動安裝光碟到救援模式,除了 IPL 的來源應該要指向您的 IFS(以上的步驟一)上的
boot.img
副本。 - Make sure the installation disc is not in your CD-ROM drive.
- IPL Linux 系統。
- Follow the prompts as decribed in 章 27, POWER 系統的救援模式. An additonal prompt for the installation source appears. Select NFS or FTP (as appropriate) and complete the following network configuration screen.
- 當 Linux 系統開機進入救援模式後,您便可以存取使用光碟機,而且您可以掛載驅動程式媒體以存取 SCSI 工具。
部 VI. 進階安裝與建置
章 28. Kickstart 安裝
28.1. 到底什麼是 Kickstart 安裝?
28.2. 該如何執行一個 Kickstart 安裝?
- 建立一個 kickstart 檔案。
- 使用 kickstart 檔案建立一個開機媒體或是從網虜上建立一個 kickstart 檔案。
- 準備好安裝目錄。
- 開始 kickstart 安裝。
28.3. 建立 Kickstart 檔案
/root/anaconda-ks.cfg
檔案中。您可以利用能將檔案儲存為 ASCII 文字檔的文字處理器來編輯這個檔案。
- 必須以既定的順序指定各個部份,每一個部份中的項目不必以特定的順序排列(除非另外有指定),主要的順序如下:
- Command section — Refer to 節 28.4, “Kickstart 的選項” for a list of kickstart options. You must include the required options.
- The
%packages
section — Refer to 節 28.5, “套件選擇” for details. - The
%pre
and%post
sections — These two sections can be in any order and are not required. Refer to 節 28.6, “前置安裝程式碼” and 節 28.7, “後續安裝程式碼” for details.
- 可以忽略不必要的項目。
- 省略必須的項目會使安裝程式提示使用者提供相關項目,就如同在一般安裝時的提示。在提供相關項目之後,程式會繼續自動執行(除非又有另一項需提供之項目)。
- 以井字號開頭的行會被視為註解,且會忽略它。
- 至於 kickstart 的升級,下列的項目是必要的:
- 語言
- 安裝類型
- 裝置說明(如果該裝置需要執行安裝)
- 鍵盤設定
upgrade
關鍵字- 開機管理程式設定
如果有任何項目需要升級,這些項目會被忽略(請注意,這將包括套件選項)。
28.4. Kickstart 的選項
注意
autopart
(非必選的)ignoredisk
(非必選的)- Causes the installer to ignore the specified disks. This is useful if you use autopartition and want to be sure that some disks are ignored. For example, without
ignoredisk
, attempting to deploy on a SAN-cluster the kickstart would fail, as the installer detects passive paths to the SAN that return no partition table.ignoredisk
選項適用於當您的磁碟有多重路徑時。語法為:ignoredisk --drives=drive1,drive2,...
driveN 為sda
,sdb
,...,hda
,... 等等。 autostep
(非必選的)--autoscreenshot
— Take a screenshot at every step during installation and copy the images over to/root/anaconda-screenshots
after installation is complete. This is most useful for documentation.
auth
orauthconfig
(必選的)- Sets up the authentication options for the system. It is similar to the
authconfig
command, which can be run after the install. By default, passwords are normally encrypted and are not shadowed.--enablemd5
— Use md5 encryption for user passwords.--enablenis
— Turns on NIS support. By default,--enablenis
uses whatever domain it finds on the network. A domain should almost always be set by hand with the--nisdomain=
option.--nisdomain=
— NIS domain name to use for NIS services.--nisserver=
— Server to use for NIS services (broadcasts by default).--useshadow
or--enableshadow
— Use shadow passwords.--enableldap
— Turns on LDAP support in/etc/nsswitch.conf
, allowing your system to retrieve information about users (UIDs, home directories, shells, etc.) from an LDAP directory. To use this option, you must install thenss_ldap
package. You must also specify a server and a base DN (distinguished name) with--ldapserver=
and--ldapbasedn=
.--enableldapauth
— Use LDAP as an authentication method. This enables thepam_ldap
module for authentication and changing passwords, using an LDAP directory. To use this option, you must have thenss_ldap
package installed. You must also specify a server and a base DN with--ldapserver=
and--ldapbasedn=
.--ldapserver=
— If you specified either--enableldap
or--enableldapauth
, use this option to specify the name of the LDAP server to use. This option is set in the/etc/ldap.conf
file.--ldapbasedn=
— If you specified either--enableldap
or--enableldapauth
, use this option to specify the DN in your LDAP directory tree under which user information is stored. This option is set in the/etc/ldap.conf
file.--enableldaptls
— Use TLS (Transport Layer Security) lookups. This option allows LDAP to send encrypted usernames and passwords to an LDAP server before authentication.--enablekrb5
— Use Kerberos 5 for authenticating users. Kerberos itself does not know about home directories, UIDs, or shells. If you enable Kerberos, you must make users' accounts known to this workstation by enabling LDAP, NIS, or Hesiod or by using the/usr/sbin/useradd
command. If you use this option, you must have thepam_krb5
package installed.--krb5realm=
— The Kerberos 5 realm to which your workstation belongs.--krb5kdc=
— The KDC (or KDCs) that serve requests for the realm. If you have multiple KDCs in your realm, separate their names with commas (,).--krb5adminserver=
— The KDC in your realm that is also running kadmind. This server handles password changing and other administrative requests. This server must be run on the master KDC if you have more than one KDC.--enablehesiod
— Enable Hesiod support for looking up user home directories, UIDs, and shells. More information on setting up and using Hesiod on your network is in/usr/share/doc/glibc-2.x.x/README.hesiod
, which is included in theglibc
package. Hesiod is an extension of DNS that uses DNS records to store information about users, groups, and various other items.--hesiodlhs
— The Hesiod LHS ("left-hand side") option, set in/etc/hesiod.conf
. This option is used by the Hesiod library to determine the name to search DNS for when looking up information, similar to LDAP's use of a base DN.--hesiodrhs
— The Hesiod RHS ("right-hand side") option, set in/etc/hesiod.conf
. This option is used by the Hesiod library to determine the name to search DNS for when looking up information, similar to LDAP's use of a base DN.注意
To look up user information for "jim", the Hesiod library looks up jim.passwd<LHS><RHS>, which should resolve to a TXT record that looks like what his passwd entry would look like (jim:*:501:501:Jungle Jim:/home/jim:/bin/bash
). For groups, the situation is identical, except jim.group<LHS><RHS> would be used.Looking up users and groups by number is handled by making "501.uid" a CNAME for "jim.passwd", and "501.gid" a CNAME for "jim.group". Note that the library does not place a period . in front of the LHS and RHS values when performing a search. Therefore the LHS and RHS values need to have a period placed in front of them in order if they require this.--enablesmbauth
— Enables authentication of users against an SMB server (typically a Samba or Windows server). SMB authentication support does not know about home directories, UIDs, or shells. If you enable SMB, you must make users' accounts known to the workstation by enabling LDAP, NIS, or Hesiod or by using the/usr/sbin/useradd
command to make their accounts known to the workstation. To use this option, you must have thepam_smb
package installed.--smbservers=
— The name of the server(s) to use for SMB authentication. To specify more than one server, separate the names with commas (,).--smbworkgroup=
— The name of the workgroup for the SMB servers.--enablecache
— Enables thenscd
service. Thenscd
service caches information about users, groups, and various other types of information. Caching is especially helpful if you choose to distribute information about users and groups over your network using NIS, LDAP, or hesiod.
bootloader
(必選的)- Specifies how the boot loader should be installed. This option is required for both installations and upgrades.
--append=
— Specifies kernel parameters. To specify multiple parameters, separate them with spaces. For example:bootloader --location=mbr --append="hdd=ide-scsi ide=nodma"
--driveorder
— Specify which drive is first in the BIOS boot order. For example:bootloader --driveorder=sda,hda
--location=
— Specifies where the boot record is written. Valid values are the following:mbr
(the default),partition
(installs the boot loader on the first sector of the partition containing the kernel), ornone
(do not install the boot loader).--password=
— If using GRUB, sets the GRUB boot loader password to the one specified with this option. This should be used to restrict access to the GRUB shell, where arbitrary kernel options can be passed.--md5pass=
— If using GRUB, similar to--password=
except the password should already be encrypted.--upgrade
— Upgrade the existing boot loader configuration, preserving the old entries. This option is only available for upgrades.
clearpart
(非必選的)- Removes partitions from the system, prior to creation of new partitions. By default, no partitions are removed.
注意
如果使用clearpart
指令,--onpart
指令則不能被使用在一個邏輯分割區上。--all
— Erases all partitions from the system.--drives=
— Specifies which drives to clear partitions from. For example, the following clears all the partitions on the first two drives on the primary IDE controller:clearpart --drives=hda,hdb --all
--initlabel
— Initializes the disk label to the default for your architecture (for examplemsdos
for x86 andgpt
for Itanium). It is useful so that the installation program does not ask if it should initialize the disk label if installing to a brand new hard drive.--linux
— Erases all Linux partitions.--none
(default) — Do not remove any partitions.
cmdline
(非必選的)device
(非必選的)- On most PCI systems, the installation program autoprobes for Ethernet and SCSI cards properly. On older systems and some PCI systems, however, kickstart needs a hint to find the proper devices. The
device
command, which tells the installation program to install extra modules, is in this format:device <type> <moduleName> --opts=<options>
- <type> — Replace with either
scsi
oreth
. - <moduleName> — Replace with the name of the kernel module which should be installed.
--opts=
— Mount options to use for mounting the NFS export. Any options that can be specified in/etc/fstab
for an NFS mount are allowed. The options are listed in thenfs(5)
man page. Multiple options are separated with a comma.
driverdisk
(非必選的)- Driver diskettes can be used during kickstart installations. You must copy the driver diskettes's contents to the root directory of a partition on the system's hard drive. Then you must use the
driverdisk
command to tell the installation program where to look for the driver disk.driverdisk <partition> [--type=<fstype>]
另外您可以指定一個含有驅動程式磁碟片的網路位置:driverdisk --source=ftp://path/to/dd.img driverdisk --source=http://path/to/dd.img driverdisk --source=nfs:host:/path/to/img
- <partition> — Partition containing the driver disk.
--type=
— File system type (for example, vfat or ext2).
firewall
(非必選的)firewall --enabled|--disabled [--trust=] <device> [--port=]
--enabled
or--enable
— Reject incoming connections that are not in response to outbound requests, such as DNS replies or DHCP requests. If access to services running on this machine is needed, you can choose to allow specific services through the firewall.--disabled
or--disable
— Do not configure any iptables rules.--trust=
— Listing a device here, such as eth0, allows all traffic coming from that device to go through the firewall. To list more than one device, use--trust eth0 --trust eth1
. Do NOT use a comma-separated format such as--trust eth0, eth1
.- <incoming> — Replace with one or more of the following to allow the specified services through the firewall.
--ssh
--telnet
--smtp
--http
--ftp
--port=
— You can specify that ports be allowed through the firewall using the port:protocol format. For example, to allow IMAP access through your firewall, specifyimap:tcp
. Numeric ports can also be specified explicitly; for example, to allow UDP packets on port 1234 through, specify1234:udp
. To specify multiple ports, separate them by commas.
firstboot
(非必選的)- Determine whether the Setup Agent starts the first time the system is booted. If enabled, the
firstboot
package must be installed. If not specified, this option is disabled by default.--enable
or--enabled
— The Setup Agent is started the first time the system boots.--disable
or--disabled
— The Setup Agent is not started the first time the system boots.--reconfig
— Enable the Setup Agent to start at boot time in reconfiguration mode. This mode enables the language, mouse, keyboard, root password, security level, time zone, and networking configuration options in addition to the default ones.
halt
(非必選的)- Halt the system after the installation has successfully completed. This is similar to a manual installation, where anaconda displays a message and waits for the user to press a key before rebooting. During a kickstart installation, if no completion method is specified, the
reboot
option is used as default.halt
選項類似於shutdown -h
指令。關於其它完成方式,請參照poweroff
、reboot
與shutdown
kickstart 選項。 graphical
(非必選的)install
(非必選的)- Tells the system to install a fresh system rather than upgrade an existing system. This is the default mode. For installation, you must specify the type of installation from
cdrom
,harddrive
,nfs
, orurl
(for FTP or HTTP installations). Theinstall
command and the installation method command must be on separate lines.cdrom
— Install from the first CD-ROM drive on the system.harddrive
— Install from a Red Hat installation tree on a local drive, which must be either vfat or ext2.--biospart=
從(如 82)上安裝 BIOS 分割區。--partition=
從(如 sdb2)上安裝 BIOS 分割區。--dir=
包含安裝樹variant
目錄的目錄。
舉例來說:harddrive --partition=hdb2 --dir=/tmp/install-tree
nfs
— Install from the NFS server specified.--server=
安裝來源的伺服器(主機名稱或 IP 位址)。--dir=
包含安裝樹variant
目錄的目錄。--opts=
使用於掛載 NFS 輸出的掛載選項。(非必選的)
舉例來說:nfs --server=nfsserver.example.com --dir=/tmp/install-tree
url
— Install from an installation tree on a remote server via FTP or HTTP.舉例來說:url --url http://<server>/<dir>
or:url --url ftp://<username>:<password>@<server>/<dir>
interactive
(非必選的)- Uses the information provided in the kickstart file during the installation, but allow for inspection and modification of the values given. You are presented with each screen of the installation program with the values from the kickstart file. Either accept the values by clicking Next or change the values and click Next to continue. Refer to the
autostep
command. iscsi
(非必選的)--target
—--port=
—--user=
—--password=
—
key
(非必選的)- Specify an installation key, which is needed to aid in package selection and identify your system for support purposes. This command is Red Hat Enterprise Linux-specific; it has no meaning for Fedora and will be ignored.
--skip
— Skip entering a key. Usually if the key command is not given, anaconda will pause at this step to prompt for a key. This option allows automated installation to continue if you do not have a key or do not want to provide one.
keyboard
(必選的)- Sets system keyboard type. Here is the list of available keyboards on i386, Itanium, and Alpha machines:
be-latin1, bg, br-abnt2, cf, cz-lat2, cz-us-qwertz, de, de-latin1, de-latin1-nodeadkeys, dk, dk-latin1, dvorak, es, et, fi, fi-latin1, fr, fr-latin0, fr-latin1, fr-pc, fr_CH, fr_CH-latin1, gr, hu, hu101, is-latin1, it, it-ibm, it2, jp106, la-latin1, mk-utf, no, no-latin1, pl, pt-latin1, ro_win, ru, ru-cp1251, ru-ms, ru1, ru2, ru_win, se-latin1, sg, sg-latin1, sk-qwerty, slovene, speakup, speakup-lt, sv-latin1, sg, sg-latin1, sk-querty, slovene, trq, ua, uk, us, us-acentos
/usr/lib/python2.2/site-packages/rhpl/keyboard_models.py
中也含有這個清單,而它是rhpl
套件的一部分。 lang
(required)- 設定在安裝過程與安裝後系統的預設語言。例如,將語言設為英文,kickstart 檔案會包含下列:
lang en_US
/usr/share/system-config-language/locale-list
檔案在每行的第一欄提供了可用的語言代碼,這個檔案包含在system-config-language
套件中。在文字模式安裝下無法支援某些語言(基本上為中文、日文、韓文與印度語系)。如果在語言指令下指定以上其中一種語言,在安裝過程中會以英語進行,但在執行系統會將此語言設定為預設。 langsupport
(deprecated)- 不贊成使用語言支援關鍵字,使用語言支援關鍵字會出現錯誤訊息並造成安裝終止。您應該現在將您所需要的語言之支援套件群組列在 kickstart 檔案上的
%packages
。例如將法文加入支援套件群組內,你需要將下列加入%packages
:@french-support
logvol
(optional)- 使用下列語法來建立用於邏輯磁區管理(LVM)的一個邏輯磁區:
logvol <mntpoint> --vgname=<name> --size=<size> --name=<name> <options>
選項如下所示:--noformat
— Use an existing logical volume and do not format it.--useexisting
— Use an existing logical volume and reformat it.--fstype=
— Sets the file system type for the logical volume. Valid values are ext2, ext3, swap, and vfat.--fsoptions=
— Specifies a free form string of options to be used when mounting the filesystem. This string will be copied into the/etc/fstab
file of the installed system and should be enclosed in quotes.--bytes-per-inode=
— Specifies the size of inodes on the filesystem to be made on the logical volume. Not all filesystems support this option, so it is silently ignored for those cases.--grow=
— Tells the logical volume to grow to fill available space (if any), or up to the maximum size setting.--maxsize=
— The maximum size in megabytes when the logical volume is set to grow. Specify an integer value here, and do not append the number with MB.--recommended=
— Determine the size of the logical volume automatically.--percent=
— Specify the size of the logical volume as a percentage of available space in the volume group.
先建立分割區,再建立邏輯磁區群組,然後再建立邏輯磁區,例如:part pv.01 --size 3000 volgroup myvg pv.01 logvol / --vgname=myvg --size=2000 --name=rootvol
logging
(optional)- 這個指令在安裝過程中控制 anaconda 登錄錯誤。但對安裝完成的系統無任何影響。
--host=
— Send logging information to the given remote host, which must be running a syslogd process configured to accept remote logging.--port=
— If the remote syslogd process uses a port other than the default, it may be specified with this option.--level=
— One of debug, info, warning, error, or critical.指定在 tty3 所顯示的訊息之最低層級。但是不論是任何層級,所有的訊息仍會傳送到登錄檔。
mediacheck
(optional)- 如果選擇這個選項,則會強制 anaconda 在安裝媒體上執行 mediacheck。這個指令需在手動安裝下執行,因此預設為停用。
monitor
(optional)- 如果沒有使用 monitor 指令,anaconda 會使用 X 來自動偵測螢幕設定。請在手動設定前先試用自動設定。
--hsync=
— Specifies the horizontal sync frequency of the monitor.--monitor=
— Use specified monitor; monitor name should be from the list of monitors in /usr/share/hwdata/MonitorsDB from the hwdata package. The list of monitors can also be found on the X Configuration screen of the Kickstart Configurator. This is ignored if --hsync or --vsync is provided. If no monitor information is provided, the installation program tries to probe for it automatically.--noprobe=
— Do not try to probe the monitor.--vsync=
— Specifies the vertical sync frequency of the monitor.
mouse
(deprecated)- The mouse keyword is deprecated.
network
(optional)- 為系統設定網路資訊,如果 kickstart 安裝不需要網路連線(也就是說,它不是通過 NFS、HTTP 或 FTP 來進行安裝),則不會在系統上設定網路連線。 如果安裝確實需要網路連線,而且在 kickstart 檔案中沒有提供任何的網路資訊,安裝程式會假定安裝是通過 eth0 經由一個動態的 IP 位址(BOOTP/DHCP) 所完成,並且設定最後安裝好的系統動態取得它的 IP 位址。
network
的選項為通過網路的 kickstart 安裝過程以及安裝好的系統設定網路連線的資訊。--bootproto=
— One ofdhcp
,bootp
, orstatic
.預設為dhcp
,bootp
與dhcp
視為等同。DHCP 的方式使用一部 DHCP 伺服器系統來取得它的網路連線資訊,您也許會猜想,BOOTP 的方式應該是類似的,需要一部 BOOTP 伺服器以供應網路連線資訊。如要設定一部系統使用 DHCP:network --bootproto=dhcp
如要設定一部系統使用 BOOTP 來取得它的網路連線設定資訊,請使用下列的資訊在 kickstart 檔案中:network --bootproto=bootp
The static method requires that you enter all the required networking information in the kickstart file. As the name implies, this information is static and are used during and after the installation. The line for static networking is more complex, as you must include all network configuration information on one line. You must specify the IP address, netmask, gateway, and nameserver. For example: (the "\" indicates that this should be read as one continuous line):network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 \ --gateway=10.0.2.254 --nameserver=10.0.2.1
如果您使用靜態的方法,請注意下列的兩種限制:- 所有靜態網路連線的資訊必須在同一行中指定,您不能使用反斜線來換行。
- You can also configure multiple nameservers here. To do so, specify them as a comma-delimited list in the command line. For example:
network --bootproto=static --ip=10.0.2.15 --netmask=255.255.255.0 \ --gateway=10.0.2.254 --nameserver 192.168.2.1,192.168.3.1
--device=
— Used to select a specific Ethernet device for installation. Note that using--device=
is not effective unless the kickstart file is a local file (such asks=floppy
), since the installation program configures the network to find the kickstart file. For example:network --bootproto=dhcp --device=eth0
--ip=
— IP address for the machine to be installed.--gateway=
— Default gateway as an IP address.--nameserver=
— Primary nameserver, as an IP address.--nodns
— Do not configure any DNS server.--netmask=
— Netmask for the installed system.--hostname=
— Hostname for the installed system.--ethtool=
— Specifies additional low-level settings for the network device which will be passed to the ethtool program.--essid=
— The network ID for wireless networks.--wepkey=
— The encryption key for wireless networks.--onboot=
— Whether or not to enable the device at boot time.--class=
— The DHCP class.--mtu=
— The MTU of the device.--noipv4
— Disable IPv4 on this device.--noipv6
— Disable IPv6 on this device.
multipath
(optional)- multipath --name= --device= --rule=
-
part
orpartition
(required for installs, ignored for upgrades) - 為系統建立一個分割區。如果在同一系統上的不同分割區中裝有一個以上的 Red Hat Enterprise Linux,安裝程式為提示選取欲升級的 Red Hat Enterprise Linux。
警告
除非使用--noformat
與--onpart
,否則所有在安裝過程中所建立的分割區都為格式化。For a detailed example ofpart
in action, refer to 節 28.4.1, “進階磁碟分割範例”.- <mntpoint> — The <mntpoint> is where the partition is mounted and must be of one of the following forms:
/<path>
例如/
、/usr
、/home
swap
這個分割區被當作 swap 空間使用。如要自動決定 swap 分割區的大小,請使用--recommended
選項:swap --recommended
自動產生的 sawp 分割區,其容量不會小於系統上得記憶體,也不會大於系統記憶體的兩倍。raid.<id>
軟體 RAID 所使用的分割區(請參照raid
)pv.<id>
LVM 所使用的分割區(請參照logvol
)。
--size=
— The minimum partition size in megabytes. Specify an integer value here such as 500. Do not append the number with MB.--grow
— Tells the partition to grow to fill available space (if any), or up to the maximum size setting.--maxsize=
— The maximum partition size in megabytes when the partition is set to grow. Specify an integer value here, and do not append the number with MB.--noformat
— Tells the installation program not to format the partition, for use with the--onpart
command.--onpart=
or--usepart=
— Put the partition on the already existing device. For example:partition /home --onpart=hda1
將以存在的/home
放置於/dev/hda1
。--ondisk=
or--ondrive=
— Forces the partition to be created on a particular disk. For example,--ondisk=sdb
puts the partition on the second SCSI disk on the system.--asprimary
— Forces automatic allocation of the partition as a primary partition, or the partitioning fails.--type=
(replaced byfstype
) — This option is no longer available. Usefstype
.--fstype=
— Sets the file system type for the partition. Valid values areext2
,ext3
,swap
, andvfat
.--start=
— Specifies the starting cylinder for the partition. It requires that a drive be specified with--ondisk=
orondrive=
. It also requires that the ending cylinder be specified with--end=
or the partition size be specified with--size=
.--end=
— Specifies the ending cylinder for the partition. It requires that the starting cylinder be specified with--start=
.--bytes-per-inode=
— Specifies the size of inodes on the filesystem to be made on the partition. Not all filesystems support this option, so it is silently ignored for those cases.--recommended
— Determine the size of the partition automatically.--onbiosdisk
— Forces the partition to be created on a particular disk as discovered by the BIOS.
注意
如果分割失敗,診斷訊息會於虛擬主控台 3 上顯示。 -
poweroff
(optional) - 在安裝完成後將系統關閉,通常在手動安裝,anaconda 會顯示一個訊息並等待使用者按下任何鍵來重新啟動。在 kickstart 安裝過程,如果沒有指定完成方式,則
reboot
則為預設選項。poweroff
選項與shutdown -p
指令雷同。注意
Thepoweroff
option is highly dependent on the system hardware in use. Specifically, certain hardware components such as the BIOS, APM (advanced power management), and ACPI (advanced configuration and power interface) must be able to interact with the system kernel. Contact your manufacturer for more information on you system's APM/ACPI abilities.其它結束方式,請參照 kickstart 選項halt
、reboot
與shutdown
-
raid
(optional) - 組合一個軟體 RAID 裝置,這個指令如以下所示:
raid <mntpoint> --level=<level> --device=<mddevice> <partitions*>
- <mntpoint> — Location where the RAID file system is mounted. If it is
/
, the RAID level must be 1 unless a boot partition (/boot
) is present. If a boot partition is present, the/boot
partition must be level 1 and the root (/
) partition can be any of the available types. The <partitions*> (which denotes that multiple partitions can be listed) lists the RAID identifiers to add to the RAID array. --level=
— RAID level to use (0, 1, or 5).--device=
— Name of the RAID device to use (such as md0 or md1). RAID devices range from md0 to md15, and each may only be used once.--bytes-per-inode=
— Specifies the size of inodes on the filesystem to be made on the RAID device. Not all filesystems support this option, so it is silently ignored for those cases.--spares=
— Specifies the number of spare drives allocated for the RAID array. Spare drives are used to rebuild the array in case of drive failure.--fstype=
— Sets the file system type for the RAID array. Valid values are ext2, ext3, swap, and vfat.--fsoptions=
— Specifies a free form string of options to be used when mounting the filesystem. This string will be copied into the /etc/fstab file of the installed system and should be enclosed in quotes.--noformat
— Use an existing RAID device and do not format the RAID array.--useexisting
— Use an existing RAID device and reformat it.
以下的例子顯示如何建立一個 RAID level 1 的分割區給/
,以及一個 RAID level 5 給/usr
,在此假設系統上有三個 SCSI 磁碟機。也會建立三個 swap 分割區(每一個磁碟上各建立一個)。part raid.01 --size=60 --ondisk=sda part raid.02 --size=60 --ondisk=sdb part raid.03 --size=60 --ondisk=sdc
part swap --size=128 --ondisk=sda part swap --size=128 --ondisk=sdb part swap --size=128 --ondisk=sdc
part raid.11 --size=1 --grow --ondisk=sda part raid.12 --size=1 --grow --ondisk=sdb part raid.13 --size=1 --grow --ondisk=sdc
raid / --level=1 --device=md0 raid.01 raid.02 raid.03 raid /usr --level=5 --device=md1 raid.11 raid.12 raid.13
For a detailed example ofraid
in action, refer to 節 28.4.1, “進階磁碟分割範例”. -
reboot
(optional) - 在安裝完成之後重新啟動(無參數)。通常 kickstart 會顯示一個訊息並等待使用者按任何鍵重新啟動。
reboot
選項與shutdown -r
雷同。注意
依安裝媒體與方式的不同,使用reboot
選項 可能 會造成不停的重新執行安裝。如果沒有在 kickstart 檔案特別指定其它方式,reboot
選項為預設結束方式。其它結束方始,請參照 kickstart 選項halt
、poweroff
與shutdown
。 repo
(optional)- 設定可以用來當作套件安裝的資料來源額外之 yum 儲藏室。可指定多重 repo 路線。
repo --name=<repoid> [--baseurl=<url>| --mirrorlist=<url>]
--name=
— The repo id. This option is required.--baseurl=
— The URL for the repository. The variables that may be used in yum repo config files are not supported here. You may use one of either this option or --mirrorlist, not both.--mirrorlist=
— The URL pointing at a list of mirrors for the repository. The variables that may be used in yum repo config files are not supported here. You may use one of either this option or --baseurl, not both.
rootpw
(必選的)rootpw [--iscrypted] <password>
--iscrypted
— If this is present, the password argument is assumed to already be encrypted.
selinux
(非必選的)selinux [--disabled|--enforcing|--permissive]
--enforcing
— Enables SELinux with the default targeted policy being enforced.注意
如果selinux
選項沒有在 kickstart 檔案中出現,表示 SELinux 已經啟動並且預設為--enforcing
。--permissive
— Outputs warnings based on the SELinux policy, but does not actually enforce the policy.--disabled
— Disables SELinux completely on the system.
相關完整的 Red Hat Enterprise Linux 資訊,請參照 Red Hat Enterprise Linux Deployment Guide。services
(非必選的)- Modifies the default set of services that will run under the default runlevel. The services listed in the disabled list will be disabled before the services listed in the enabled list are enabled.
--disabled
— Disable the services given in the comma separated list.--enabled
— Enable the services given in the comma separated list.
shutdown
(非必選的)- Shut down the system after the installation has successfully completed. During a kickstart installation, if no completion method is specified, the
reboot
option is used as default.shutdown
選項與shutdown
指令雷同。其它完成方式,請參照 kickstart 選項halt
、poweroff
與reboot
skipx
(非必選的)text
(非必選的)timezone
(必選的)timezone [--utc] <timezone>
--utc
— If present, the system assumes the hardware clock is set to UTC (Greenwich Mean) time.
upgrade
(非必選的)user
(非必選的)user --name=<username> [--groups=<list>] [--homedir=<homedir>] [--password=<password>] [--iscrypted] [--shell=<shell>] [--uid=<uid>]
--name=
— Provides the name of the user. This option is required.--groups=
— In addition to the default group, a comma separated list of group names the user should belong to.--homedir=
— The home directory for the user. If not provided, this defaults to /home/<username>.--password=
— The new user's password. If not provided, the account will be locked by default.--iscrypted=
— Is the password provided by --password already encrypted or not?--shell=
— The user's login shell. If not provided, this defaults to the system default.--uid=
— The user's UID. If not provided, this defaults to the next available non-system UID.
vnc
(非必選的)- Allows the graphical installation to be viewed remotely via VNC. This method is usually preferred over text mode, as there are some size and language limitations in text installs. With no options, this command will start a VNC server on the machine with no password and will print out the command that needs to be run to connect a remote machine.
vnc [--host=<hostname>] [--port=<port>] [--password=<password>]
--host=
— Instead of starting a VNC server on the install machine, connect to the VNC viewer process listening on the given hostname.--port=
— Provide a port that the remote VNC viewer process is listening on. If not provided, anaconda will use the VNC default.--password=
— Set a password which must be provided to connect to the VNC session. This is optional, but recommended.
volgroup
(非必選的)volgroup <name> <partition> <options>
選項如下所示:--noformat
— Use an existing volume group and do not format it.--useexisting
— Use an existing volume group and reformat it.--pesize=
— Set the size of the physical extents.
先建立分割區,再建立邏輯磁區群組,然後再建立邏輯磁區,例如:part pv.01 --size 3000 volgroup myvg pv.01 logvol / --vgname=myvg --size=2000 --name=rootvol
For a detailed example ofvolgroup
in action, refer to 節 28.4.1, “進階磁碟分割範例”.xconfig
(非必選的)- Configures the X Window System. If this option is not given, the user must configure X manually during the installation, if X was installed; this option should not be used if X is not installed on the final system.
--driver
— Specify the X driver to use for the video hardware.--videoram=
— Specifies the amount of video RAM the video card has.--defaultdesktop=
— Specify either GNOME or KDE to set the default desktop (assumes that GNOME Desktop Environment and/or KDE Desktop Environment has been installed through%packages
).--startxonboot
— Use a graphical login on the installed system.--resolution=
— Specify the default resolution for the X Window System on the installed system. Valid values are 640x480, 800x600, 1024x768, 1152x864, 1280x1024, 1400x1050, 1600x1200. Be sure to specify a resolution that is compatible with the video card and monitor.--depth=
— Specify the default color depth for the X Window System on the installed system. Valid values are 8, 16, 24, and 32. Be sure to specify a color depth that is compatible with the video card and monitor.
zerombr
(非必選的)- If
zerombr
is specified any invalid partition tables found on disks are initialized. This destroys all of the contents of disks with invalid partition tables.Note that in previous versions of Red Hat Enterprise Linux, this command was specified aszerombr yes
. This form is now deprecated; you should now simply specifyzerombr
in your kickstart file instead. zfcp
(非必選的)zfcp [--devnum=<devnum>] [--fcplun=<fcplun>] [--scsiid=<scsiid>] [--scsilun=<scsilun>] [--wwpn=<wwpn>]
%include
(optional)
28.4.1. 進階磁碟分割範例
clearpart
、raid
、part
、volgroup
與 logvol
。
clearpart --drives=hda,hdc --initlabel # Raid 1 IDE config part raid.11 --size 1000 --asprimary --ondrive=hda part raid.12 --size 1000 --asprimary --ondrive=hda part raid.13 --size 2000 --asprimary --ondrive=hda part raid.14 --size 8000 --ondrive=hda part raid.15 --size 1 --grow --ondrive=hda part raid.21 --size 1000 --asprimary --ondrive=hdc part raid.22 --size 1000 --asprimary --ondrive=hdc part raid.23 --size 2000 --asprimary --ondrive=hdc part raid.24 --size 8000 --ondrive=hdc part raid.25 --size 1 --grow --ondrive=hdc # You can add --spares=x raid / --fstype ext3 --device md0 --level=RAID1 raid.11 raid.21 raid /safe --fstype ext3 --device md1 --level=RAID1 raid.12 raid.22 raid swap --fstype swap --device md2 --level=RAID1 raid.13 raid.23 raid /usr --fstype ext3 --device md3 --level=RAID1 raid.14 raid.24 raid pv.01 --fstype ext3 --device md4 --level=RAID1 raid.15 raid.25 # LVM configuration so that we can resize /var and /usr/local later volgroup sysvg pv.01 logvol /var --vgname=sysvg --size=8000 --name=var logvol /var/freespace --vgname=sysvg --size=8000 --name=freespacetouse logvol /usr/local --vgname=sysvg --size=1 --grow --name=usrlocal
28.5. 套件選擇
%packages
指令來開始一個 kickstart 檔案部份用來列出您想要安裝的套件(這只適用於安裝,因為升級過程中並不支援套件選擇)。
variant/repodata/comps-*.xml
檔案。每個群組都擁有一個 id、使用者能見值、名稱、註釋與套件清單。在套件清單中,如果選擇一個套件群組其中標示為強制的套件則一定會安裝;標示為預設的套件則為預設選取;非必選的則需手動選取。
Core
與 Base
群組,所以並不需要在 %packages
的部份指定它們。
%packages
部份的一個例子:
%packages @ X Window System @ GNOME Desktop Environment @ Graphical Internet @ Sound and Video dhcp
@
符號開頭,再接上一個空白字元,然後是完整的群組名稱(如 comps.xml
檔案中所指定的)。也可以使用群組的 ID 來指定群組,例如 gnome-desktop
,如要指定個別的套件,請只列出該套件的名稱,不加上任何的字元(在以上例子中的 dhcp
一行,便是個別套件的例子)。
-autofs
%packages
選項有下列的選項可以使用:
--nobase
- 請勿安裝 @Base 群組。如果您欲建立一個非常小的系統,請使用這個選項。
--resolvedeps
- --resolvedeps 選項已不適用。相容性問題現在會自動解決。
--ignoredeps
- --ignoredeps 選項已不適用。相容性問題現在會自動解決。
--ignoremissing
- 在不暫停安裝以詢問安裝是否該停止或繼續的情況下,便忽視遺失的套件或群組,例如:
%packages --ignoremissing
28.6. 前置安裝程式碼
ks.cfg
語法化之後,您可以新增指令並在系統上執行。您必須在 kickstart 檔案(指令之後)的最後,並且與 %pre
指令一同啟始。您可以在 %pre
存取網路,但由於此時尚未設定 name service,您只能輸入 IP 位置。
注意
--interpreter /usr/bin/python
- 您可以指定一個不同的程式語言,例如 Python,請以您所選擇之程式語言取代 /usr/bin/python。
28.6.1. 範例
%pre
部份的範例:
%pre #!/bin/sh hds="" mymedia="" for file in /proc/ide/h* do mymedia=`cat $file/media` if [ $mymedia == "disk" ] ; then hds="$hds `basename $file`" fi done set $hds numhd=`echo $#` drive1=`echo $hds | cut -d' ' -f1` drive2=`echo $hds | cut -d' ' -f2` #Write out partition scheme based on whether there are 1 or 2 hard drives if [ $numhd == "2" ] ; then #2 drives echo "#partitioning scheme generated in %pre for 2 drives" > /tmp/part-include echo "clearpart --all" >> /tmp/part-include echo "part /boot --fstype ext3 --size 75 --ondisk hda" >> /tmp/part-include echo "part / --fstype ext3 --size 1 --grow --ondisk hda" >> /tmp/part-include echo "part swap --recommended --ondisk $drive1" >> /tmp/part-include echo "part /home --fstype ext3 --size 1 --grow --ondisk hdb" >> /tmp/part-include else #1 drive echo "#partitioning scheme generated in %pre for 1 drive" > /tmp/part-include echo "clearpart --all" >> /tmp/part-include echo "part /boot --fstype ext3 --size 75" >> /tmp/part-includ echo "part swap --recommended" >> /tmp/part-include echo "part / --fstype ext3 --size 2048" >> /tmp/part-include echo "part /home --fstype ext3 --size 2048 --grow" >> /tmp/part-include fi
%include /tmp/part-include
注意
28.7. 後續安裝程式碼
%post
指令開頭,這個部份在例如安裝其他的軟體以及設定另一部名稱伺服器時相當好用。
注意
%post
部份存取網路並且解析 IP 位址。 如果您設定網路為使用 DHCP,當安裝程式執行 %post
部份時,/etc/resolv.conf
檔案還尚未完成。您可以存取網路,不過您無法解析 IP 位址,因此如果您使用 DHCP,您必須在 %post
部份指定 IP 位址。
注意
--nochroot
- 使您可以指定在 chroot 環境之外執行的指令。以下的例子會複製
/etc/resolv.conf
檔案到剛安裝好的檔案系統中。%post --nochroot cp /etc/resolv.conf /mnt/sysimage/etc/resolv.conf
--interpreter /usr/bin/python
- 您可以指定一個不同的程式語言,例如 Python,請以您所選擇之程式語言取代 /usr/bin/python。
28.7.1. 範例
%post ( # Note that in this example we run the entire %post section as a subshell for logging. wget -O- http://proxy-or-sat.example.com/pub/bootstrap_script | /bin/bash /usr/sbin/rhnreg_ks --activationkey=<activationkey> # End the subshell and capture any output to a post-install log file. ) 1>/root/post_install.log 2>&1
runme
的程式碼:
mkdir /mnt/temp mount -o nolock 10.10.0.2:/usr/new-machines /mnt/temp open -s -w -- /mnt/temp/runme umount /mnt/temp
注意
-o nolock
。
28.8. 使 Kickstart 檔案可存取
- 開機磁碟片上
- 開機光碟片上
- 網路上
28.8.1. 建立 Kickstart 開機媒體
ks.cfg
.
ks.cfg
and must be located in the boot CD-ROM's top-level directory. Since a CD-ROM is read-only, the file must be added to the directory used to create the image that is written to the CD-ROM. Refer to the Red Hat Enterprise Linux Installation Guide for instructions on creating boot media; however, before making the file.iso
image file, copy the ks.cfg
kickstart file to the isolinux/
directory.
ks.cfg
and must be located in the flash memory's top-level directory. Create the boot image first, and then copy the ks.cfg
file.
dd
指令將開機媒體傳送到 USB 隨身碟(/dev/sda
):
dd if=diskboot.img of=/dev/sda bs=1M
注意
28.8.2. 使 Kickstart 檔案可經由網路存取
dhcpd.conf
檔案中一行的範例:
filename
"/usr/new-machine/kickstart/"; next-server blarg.redhat.com;
filename
之後的數值(或者 kickstart 檔案所存放的目錄),以 NFS 伺服器的名稱取代 next-server
之後的數值。
<ip-addr>-kickstart
<ip-addr>
section of the file name should be replaced with the client's IP address in dotted decimal notation. For example, the file name for a computer with an IP address of 10.10.0.1 would be 10.10.0.1-kickstart
.
/kickstart
from the BOOTP/DHCP server and tries to find the kickstart file using the same <ip-addr>-kickstart
file name as described above.
28.9. 使安裝目錄可存取
28.10. 開始 Kickstart 安裝
ks
指令列參數傳至核心,則安裝程式會尋找 kickstart 檔案。。
- CD-ROM #1 與磁碟片
- The
linux ks=floppy
command also works if theks.cfg
file is located on a vfat or ext2 file system on a diskette and you boot from the Red Hat Enterprise Linux CD-ROM #1.另外一個開機指令為,從 Red Hat Enterprise Linux CD-ROM #1 光碟啟動而且 kickstart 檔案在 vfat 或 ext2 檔案系統的磁碟上。請在boot:
提示符號下輸入下列指令:linux ks=hd:fd0:/ks.cfg
- 使用驅動程式磁碟片
- 如果您需要在 kickstart 安裝使用驅動程式磁碟片,請指定
dd
選項。 舉例來說,如要使用開機片開機,並且使用驅動程式磁碟片,請在boot:
提示符號下輸入下列指令:linux ks=floppy dd
- 開機光碟
- If the kickstart file is on a boot CD-ROM as described in 節 28.8.1, “建立 Kickstart 開機媒體”, insert the CD-ROM into the system, boot the system, and enter the following command at the
boot:
prompt (whereks.cfg
is the name of the kickstart file):linux ks=cdrom:/ks.cfg
askmethod
- 請不要在偵測到 CD-ROM 磁碟機中有 Red Hat Enterprise Linux CD 光碟時,自動將其當作安裝光碟使用。
autostep
- 將 kickstart 設為非互動。
debug
- 立即啟始 pdb。
dd
- 使用驅動程式磁碟
dhcpclass=<class>
- Sends a custom DHCP vendor class identifier. ISC's dhcpcd can inspect this value using "option vendor-class-identifier".
dns=<dns>
- 使用逗號將用來網路安裝的名稱伺服器分開。
driverdisk
- Same as 'dd'.
expert
- 特別功能:
- 使用移動式媒體分割磁碟
- 驅動程式磁碟的提時符號
gateway=<gw>
- 用來進行網路安裝的閘道。
graphical
- 強制圖形化安裝。需要 ftp/http 使用 GUI。
isa
- 提示使用者設定 ISA 裝置。
ip=<ip>
- IP to use for a network installation, use 'dhcp' for DHCP.
keymap=<keymap>
- Keyboard layout to use. Valid values are those which can be used for the 'keyboard' kickstart command.
ks=nfs:<server>:/<path>
- The installation program looks for the kickstart file on the NFS server <server>, as file <path>. The installation program uses DHCP to configure the Ethernet card. For example, if your NFS server is server.example.com and the kickstart file is in the NFS share
/mydir/ks.cfg
, the correct boot command would beks=nfs:server.example.com:/mydir/ks.cfg
. ks=http://<server>/<path>
- The installation program looks for the kickstart file on the HTTP server <server>, as file <path>. The installation program uses DHCP to configure the Ethernet card. For example, if your HTTP server is server.example.com and the kickstart file is in the HTTP directory
/mydir/ks.cfg
, the correct boot command would beks=http://server.example.com/mydir/ks.cfg
. ks=floppy
- 安裝程式將會在
/dev/fd0
磁碟片上一個 vfat 或 ext2 檔案系統中尋找ks.cfg
檔案。 ks=floppy:/<path>
- The installation program looks for the kickstart file on the diskette in
/dev/fd0
, as file <path>. ks=hd:<device>:/<file>
- The installation program mounts the file system on <device> (which must be vfat or ext2), and look for the kickstart configuration file as <file> in that file system (for example,
ks=hd:sda3:/mydir/ks.cfg
). ks=file:/<file>
- The installation program tries to read the file <file> from the file system; no mounts are done. This is normally used if the kickstart file is already on the
initrd
image. ks=cdrom:/<path>
- The installation program looks for the kickstart file on CD-ROM, as file <path>.
ks
- If
ks
is used alone, the installation program configures the Ethernet card to use DHCP. The kickstart file is read from the "bootServer" from the DHCP response as if it is an NFS server sharing the kickstart file. By default, the bootServer is the same as the DHCP server. The name of the kickstart file is one of the following:- 如果已指定 DHCP 且 boot 檔案字首為
/
,則安裝程式會在 NFS 伺服器上尋找由 DHCP 提供的 boot 檔案。 - 如果已指定 DHCP 且 boot檔案字首不是
/
,則安裝程式會在 NFS 伺服器上的/kickstart
目錄尋找由 DHCP 提供的 boot 檔案。 - 如果 DHCP 沒有指定 boot 檔案,則安裝程式會試著讀取
/kickstart/1.2.3.4-kickstart
,1.2.3.4 為進行安裝的電腦之 IP 位置。
ksdevice=<device>
- The installation program uses this network device to connect to the network. For example, consider a system connected to an NFS server through the eth1 device. To perform a kickstart installation on this system using a kickstart file from the NFS server, you would use the command
ks=nfs:<server>:/<path> ksdevice=eth1
at theboot:
prompt. kssendmac
- Adds HTTP headers to ks=http:// request that can be helpful for provisioning systems. Includes MAC address of all nics in CGI environment variables of the form: "X-RHN-Provisioning-MAC-0: eth0 01:23:45:67:89:ab".
lang=<lang>
- Language to use for the installation. This should be a language which is valid to be used with the 'lang' kickstart command.
loglevel=<level>
- Set the minimum level required for messages to be logged. Values for <level> are debug, info, warning, error, and critical. The default value is info.
lowres
- 強制 GUI 安裝程式在 640x480 下執行。
mediacheck
- 啟動開機管理程式代碼,讓使用者能夠完整檢測安裝來源(如果是 ISO 方式)。
method=cdrom
- 使用 CDROM 安裝
method=ftp://<path>
- Use <path> for an FTP installation.
method=hd:<device>:<path>
- Use <path> on <dev> for a hard drive installation.
method=http://<path>
- Use <path> for an HTTP installation.
method=nfs:<path>
- Use <path> for an NFS installation.
netmask=<nm>
- 網路安裝所使用的網路遮罩。
nofallback
- 如果無法跳出 GUI。
nofb
- 在某些語言環境,請不要在使用文字模式安裝時載入 VGA16 幀幅緩衝器(framebuffer)。
nofirewire
- 請勿載入防火牆裝置支援
noipv6
- 在安裝過程停用 IPv6 網路。
nokill
- 在嚴重錯誤發生時,一個可以預防 anaconda 終止所有執行中程式的錯誤排除選項。
nomount
- Don't automatically mount any installed Linux partitions in rescue mode.
nonet
- 請勿自動偵測網路裝置。
noparport
- 請勿載入並聯埠支援。
nopass
- Don't pass keyboard/mouse info to stage 2 installer, good for testing keyboard and mouse config screens in stage2 installer during network installs.
nopcmcia
- 在系統中忽略 PCMCIA 控制台。
noprobe
- 除非提示使用者,請勿試著偵測 hw。
noshell
- 在安裝過程中請勿將 shell 放至於 tty2。
nostorage
- 請勿自動偵測儲存裝置(SCSI、IDE 或 RAID)。
nousb
- 請勿載入 USB 支援(如果在一開始就造成當機)。
nousbstorage
- 請勿在開機管理程式載入 usbstorage 模組。 它也許會有助於在 SCSI 系統上的裝置順序。
rescue
- 執行救援環境
resolution=<mode>
- Run installer in mode specified, '1024x768' for example.
serial
- 開啟序列主控台支援。
skipddc
- Skips DDC probe of monitor, may help if it's hanging system.
syslog=<host>[:<port>]
- Once installation is up and running, send log messages to the syslog process on <host>, and optionally, on port <port>. Requires the remote syslog process to accept connections (the -r option).
text
- 強制文字模式安裝。
updates
- 提示含有更新(錯誤修復)的軟碟。
updates=ftp://<path>
- 在 FTP 上含有更新的映像檔。
updates=http://<path>
- 在 HTTP 上含有更新的映像檔。
upgradeany
- Don't require an /etc/redhat-release that matches the expected syntax to upgrade.
vnc
- 啟動 vnc 安裝。您需要使用 vnc 用戶端應用程式來連接電腦。
vncconnect=<host>[:<port>]
- Once installation is up and running, connect to the vnc client named <host>, and optionally use port <port>.Requires 'vnc' option to be specified as well.
vncpassword=<password>
- 磁碟片 vnc 連接啟用密碼。這可預防他人在 vnc 安裝過程意外連接。Requires 'vnc' option to be specified as well.
章 29. Kickstart Configurator
/usr/sbin/system-config-kickstart
.
29.1. Basic Configuration
圖形 29.1. Basic Configuration
29.2. 安裝方式
圖形 29.2. 安裝方式
- CD-ROM — 選擇從 Red Hat Enterprise Linux CD-ROM 安裝或升級。
- NFS — 選擇從 NFS 分享目錄安裝或升級。在 NFS 伺服器的文字欄中,輸入完整主機名稱或 IP 位置。至於 NFS 目錄,請輸入包含安裝樹的
variant
目錄之 NFS 目錄的名稱。例如,如果 NFS 伺服器包含了/mirrors/redhat/i386/RedHat/
目錄,將 NFS 目錄輸入為/mirrors/redhat/i386/
。 - FTP — 選擇從 FTP 伺服器安裝或升級。在 FTP 伺服文字欄,輸入完整的主機名稱或 IP 位置。輸入包含
RedHat
目錄的 FTP 目錄名稱。例如,如果 FTP 伺服器包含/mirrors/redhat/i386/Server/
目錄,將 FTP 目錄輸入為/mirrors/redhat/i386/Server/
。如果 FTP 伺服器要求,請指定使用者名稱與密碼。 - HTTP — 選擇從 HTTP 伺服器安裝或升級。在 HTTP 伺服文字欄,輸入完整的主機名稱或 IP 位置。輸入包含
RedHat
目錄的 HTTP 目錄名稱。例如,如果 HTTP 伺服器包含/mirrors/redhat/i386/Server/
目錄,將 HTTP 目錄輸入為/mirrors/redhat/i386/Server/
。 - 硬碟 — 選擇從硬碟伺服器安裝或升級。硬碟安裝需使用 ISO (或 CD-ROM)映像檔。請在開始安裝之前確認 ISO 映像檔無損壞。欲確認 ISO 映像檔狀態請使用在 Red Hat Enterprise Linux 安裝手冊 中所討論過的
md5sum
程式或linux mediacheck
開機選項。在 硬碟分割區 文字方塊中輸入包含 ISO 映像檔(例如,/dev/hda1
)的硬碟分割區。在 硬碟目錄 文字方塊中輸入包含 ISO 映像檔的目錄。
29.3. Boot Loader Options
/boot
分割區的第一扇區)。在 MBR 上安裝開機管理程式,如果您欲使用它。
cdrecord
之前載入,設定 hdd=ide-scsi
為核心參數(hdd
為 CD-ROM 裝置)。
注意
29.4. 分割區資訊
圖形 29.4. 分割區資訊
msdos
與 Itanium 為 gpt
)架構磁碟標籤預設,請選擇 初始磁碟標籤。
注意
anaconda
與 kickstart
支援邏輯磁區管理員(LVM),但目前 Kickstart 設定器.尚無設定機制供使用。
29.4.1. 建立分割區
- 在 其它容量選項,選擇將分割區設定為固定容量、自選容量或者填滿剩餘磁碟空間。如果您選擇系統檔案類型為 swap,您可以選擇由安裝程式來建立 swap 分割區,並設定為建議容量而非指定容量。
- 強制分割區建立為主要分割區。
- 在指定的硬碟上建立分割區。例如將分割區建立於主 IDE 硬碟(
/dev/hda
),指定hda
為磁碟。請不要將/dev
包括在磁碟名稱中。 - 使用一個既有分割區。例如在主硬碟上的主分割區(
/dev/hda1
)建立分割區,指定hda1
為分割區。請勿將/dev
包括在分割區名稱中。 - 格式化分割區為選取的檔案系統類型。
圖形 29.5. 建立分割區
29.4.1.1. 建立軟體 RAID 分割區
- 點選 RAID 按鈕。
- 選擇 建立 RAID 磁碟分割軟體。
- 除了選擇 軟體 RAID 為檔案系統類型外,請依照先前所述來設定分割區。此外,您必須指定用來建立分割區的硬碟或指定既有硬碟。
圖形 29.6. 建立一個軟體 RAID 分割區
- 點選 RAID 按鈕。
- 選取 建立 RAID 裝置。
- 再來為軟體 RAID 裝置選取一個掛載點、檔案系統類型、RAID 裝置名稱、RAID 等級、RAID 成員以及備援裝置的數量,還有是否要格式化 RAID 裝置。
圖形 29.7. 建立一個軟體 RAID 裝置
- 點選 確定 在清單上新增裝置。
29.5. 網路設定
圖形 29.8. 網路設定
system-config-network
)來設定網路裝置。請參照 Red Hat Enterprise Linux 建置指南。
29.6. 認證
圖形 29.9. 認證
- NIS
- LDAP
- Kerberos 5
- Hesiod
- SMB
- 名稱置換快取
29.7. 防火牆設定
圖形 29.10. 防火牆設定
連接埠:通訊協定
。例如,如果您想允許 IMAP 通過防火牆存取,您可以指定 imap:tcp
。您也可以明確地指定連接埠號碼;譬如要允許在連接埠 1234 上的 UDP 封包通過防火牆,可以輸入 1234:udp
。如要指定多重埠號,請以逗號將它們分開。
29.8. 顯示設定
skipx
option is written to the kickstart file.
29.8.1. 一般
圖形 29.11. X 組態設定 - 一般
/etc/inittab
設定檔來更改。
29.8.2. 顯示卡
圖形 29.12. X 組態設定 - 顯示卡
29.8.3. 螢幕
圖形 29.13. X 組態設定 - 螢幕
29.9. 套件選擇
圖形 29.14. 套件選擇
%packages
section of the kickstart file after you save it. Refer to 節 28.5, “套件選擇” for details.
29.10. 前置安裝程式碼
圖形 29.15. 前置安裝程式碼
/usr/bin/python2.4
可用來指定一個 Python script。這個選項可以在 kickstart 檔案中與 %pre --interpreter /usr/bin/python2.4
一起使用。
addgroup, adduser, adjtimex, ar, arping, ash, awk, basename, bbconfig, bunzip2, busybox, bzcat, cal, cat, catv, chattr, chgrp, chmod, chown, chroot, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cut, date, dc, dd, deallocvt, delgroup, deluser, devfsd, df, diff, dirname, dmesg, dnsd, dos2unix, dpkg, dpkg-deb, du, dumpkmap, dumpleases, e2fsck, e2label, echo, ed, egrep, eject, env, ether-wake, expr, fakeidentd, false, fbset, fdflush, fdformat, fdisk, fgrep, find, findfs, fold, free, freeramdisk, fsck, fsck.ext2, fsck.ext3, fsck.minix, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifup, inetd, insmod, install, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iptunnel, kill, killall, lash, last, length, less, linux32, linux64, ln, load_policy, loadfont, loadkmap, login, logname, losetup, ls, lsattr, lsmod, lzmacat, makedevs, md5sum, mdev, mesg, mkdir, mke2fs, mkfifo, mkfs.ext2, mkfs.ext3, mkfs.minix, mknod, mkswap, mktemp, modprobe, more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nohup, nslookup, od, openvt, passwd, patch, pidof, ping, ping6, pipe_progress, pivot_root, printenv, printf, ps, pwd, rdate, readlink, readprofile, realpath, renice, reset, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, runlevel, rx, sed, seq, setarch, setconsole, setkeycodes, setlogcons, setsid, sh, sha1sum, sleep, sort, start-stop-daemon, stat, strings, stty, su, sulogin, sum, swapoff, swapon, switch_root, sync, sysctl, tail, tar, tee, telnet, telnetd, test, tftp, time, top, touch, tr, traceroute, true, tty, tune2fs, udhcpc, udhcpd, umount, uname, uncompress, uniq, unix2dos, unlzma, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, watch, watchdog, wc, wget, which, who, whoami, xargs, yes, zcat, zcip
anaconda bash bzip2 jmacs ftp head joe kudzu-probe list-harddrives loadkeys mtools mbchk mtools mini-wm mtools jpico pump python python2.4 raidstart raidstop rcp rlogin rsync setxkbmap sftp shred ssh syslinux syslogd tac termidx vncconfig vncpasswd xkbcomp Xorg Xvnc zcat
警告
%pre
指令。已經替您新增了這個指令。
注意
29.11. 後續安裝程式碼
圖形 29.16. 後續安裝程式碼
警告
%post
指令。已經替您新增了這個指令。
%post
中心增下列命令:
echo "Hackers will be punished!" > /etc/motd
注意
29.11.1. Chroot 環境
%post
下使用 --nochroot
選項一樣。
/mnt/sysimage/
的目錄。
echo "Hackers will be punished!" > /mnt/sysimage/etc/motd
29.11.2. 使用編譯器
/usr/bin/python2.4
可用來指定一個 Python script。這個選項可以在 kickstart 檔案中與 %pre --interpreter /usr/bin/python2.4
一起使用。
29.12. 儲存檔案
圖形 29.17. Preview
章 30. 開機過程、init 與關機
30.1. 開機過程
- 系統 BIOS 會檢測系統並在主硬碟上的 MBR 啟始第一階段的開機管理程式。
- 第一階段開機管理程式會自己載入記憶體,並且從
/boot/
分割區啟始第二階段開機管理程式。 - 第二階段開機管理程式會將核心載入記憶體,其將依序載入必要的模組並掛載於唯讀的 root 分割區。
- 核心將開機過程的控制權轉移給
/sbin/init
程式。 /sbin/init
程式將所有服務與使用者工具載入,並掛載所有列於/etc/fstab
的分割區。- 對於第一次啟動 Linux 系統的使用者,螢幕上會顯示登入畫面。
30.2. 開機過程的詳細資訊
30.2.1. BIOS
30.2.2. 開機管理程式
/boot/grub/grub.conf
— at boot time. Refer to 節 9.7, “GRUB選單設定檔案” for information on how to edit this file.
注意
/boot/
directory. The kernel binary is named using the following format — /boot/vmlinuz-<kernel-version>
file (where <kernel-version>
corresponds to the kernel version specified in the boot loader's settings).
/boot/
,一個通過 cpio
以記憶體為基礎的虛擬檔案系統。核心利用 initramfs
載入驅動程式以及用來啟動系統的模組。這對使用 SCSI 硬碟或者使用 ext3 檔案系統的系統更是重要。
initramfs
映像檔載入記憶體後,開機管理程式將開機過程控制權轉移給核心。
30.2.2.1. 在其它架構上使用的開機管理程式
init
command, the same sequence of events occurs on every architecture. So the main difference between each architecture's boot process is in the application used to find and load the kernel.
30.2.3. 核心
initramfs
image(s) in a predetermined location in memory, decompresses it directly to /sysroot/
, and loads all necessary drivers. Next, it initializes virtual devices related to the file system, such as LVM or software RAID, before completing the initramfs
processes and freeing up all the memory the disk image once occupied.
/sbin/init
程式來設定使用者環境。
30.2.4. /sbin/init
程式
/sbin/init
程式(亦稱 init
)協調剩餘的開機過程和使用者環境的設定。
init
啟動後,它將自動成為所有系統啟始過程的親項。首先它執行 /etc/rc.d/rc.sysinit
script,這個 script 設定環境路徑、交換(starts wap)、檢測檔案系統,和執行其它所有系統啟始所需的步驟。例如大部分的系統都採用時基(clock),所以 rc.sysinit
能讀取 /etc/sysconfig/clock
設定檔並啟始硬體時基。另一個例子為,如果序列通訊埠程序需啟始 rc.sysinit
會執行 /etc/rc.serial
檔案。
init
command then runs the /etc/inittab
script, which describes how the system should be set up in each SysV init runlevel. Runlevels are a state, or mode, defined by the services listed in the SysV /etc/rc.d/rc<x>.d/
directory, where <x> is the number of the runlevel. For more information on SysV init runlevels, refer to 節 30.4, “SysV Init 執行層級”.
init
指令會替系統設定資源功能程式館 /etc/rc.d/init.d/functions
,這是用來設定如何啟始、刪除以及決定程式的 PID。
init
程式從適合的 rc
目錄,尋找在 /etc/inittab
中指定為預設的 runlevel,以啟始所有的背景程序。rc
目錄會跟著顯示的 runlevel 來編號。例如,/etc/rc.d/rc5.d/
是 runlevel 5 的目錄。
init
程式會在 /etc/rc.d/rc5.d/
目錄中尋找決定啟始或停止程序的設定。
/etc/rc.d/rc5.d/
目錄中的列表:
K05innd -> ../init.d/innd K05saslauthd -> ../init.d/saslauthd K10dc_server -> ../init.d/dc_server K10psacct -> ../init.d/psacct K10radiusd -> ../init.d/radiusd K12dc_client -> ../init.d/dc_client K12FreeWnn -> ../init.d/FreeWnn K12mailman -> ../init.d/mailman K12mysqld -> ../init.d/mysqld K15httpd -> ../init.d/httpd K20netdump-server -> ../init.d/netdump-server K20rstatd -> ../init.d/rstatd K20rusersd -> ../init.d/rusersd K20rwhod -> ../init.d/rwhod K24irda -> ../init.d/irda K25squid -> ../init.d/squid K28amd -> ../init.d/amd K30spamassassin -> ../init.d/spamassassin K34dhcrelay -> ../init.d/dhcrelay K34yppasswdd -> ../init.d/yppasswdd K35dhcpd -> ../init.d/dhcpd K35smb -> ../init.d/smb K35vncserver -> ../init.d/vncserver K36lisa -> ../init.d/lisa K45arpwatch -> ../init.d/arpwatch K45named -> ../init.d/named K46radvd -> ../init.d/radvd K50netdump -> ../init.d/netdump K50snmpd -> ../init.d/snmpd K50snmptrapd -> ../init.d/snmptrapd K50tux -> ../init.d/tux K50vsftpd -> ../init.d/vsftpd K54dovecot -> ../init.d/dovecot K61ldap -> ../init.d/ldap K65kadmin -> ../init.d/kadmin K65kprop -> ../init.d/kprop K65krb524 -> ../init.d/krb524 K65krb5kdc -> ../init.d/krb5kdc K70aep1000 -> ../init.d/aep1000 K70bcm5820 -> ../init.d/bcm5820 K74ypserv -> ../init.d/ypserv K74ypxfrd -> ../init.d/ypxfrd K85mdmpd -> ../init.d/mdmpd K89netplugd -> ../init.d/netplugd K99microcode_ctl -> ../init.d/microcode_ctl S04readahead_early -> ../init.d/readahead_early S05kudzu -> ../init.d/kudzu S06cpuspeed -> ../init.d/cpuspeed S08ip6tables -> ../init.d/ip6tables S08iptables -> ../init.d/iptables S09isdn -> ../init.d/isdn S10network -> ../init.d/network S12syslog -> ../init.d/syslog S13irqbalance -> ../init.d/irqbalance S13portmap -> ../init.d/portmap S15mdmonitor -> ../init.d/mdmonitor S15zebra -> ../init.d/zebra S16bgpd -> ../init.d/bgpd S16ospf6d -> ../init.d/ospf6d S16ospfd -> ../init.d/ospfd S16ripd -> ../init.d/ripd S16ripngd -> ../init.d/ripngd S20random -> ../init.d/random S24pcmcia -> ../init.d/pcmcia S25netfs -> ../init.d/netfs S26apmd -> ../init.d/apmd S27ypbind -> ../init.d/ypbind S28autofs -> ../init.d/autofs S40smartd -> ../init.d/smartd S44acpid -> ../init.d/acpid S54hpoj -> ../init.d/hpoj S55cups -> ../init.d/cups S55sshd -> ../init.d/sshd S56rawdevices -> ../init.d/rawdevices S56xinetd -> ../init.d/xinetd S58ntpd -> ../init.d/ntpd S75postgresql -> ../init.d/postgresql S80sendmail -> ../init.d/sendmail S85gpm -> ../init.d/gpm S87iiim -> ../init.d/iiim S90canna -> ../init.d/canna S90crond -> ../init.d/crond S90xfs -> ../init.d/xfs S95atd -> ../init.d/atd S96readahead -> ../init.d/readahead S97messagebus -> ../init.d/messagebus S97rhnsd -> ../init.d/rhnsd S99local -> ../rc.local
/etc/rc.d/rc5.d/
目錄中,沒有一個 script 適用來啟始或停止服務的。而所有在 /etc/rc.d/rc5.d/
的檔案都是 符號連結檔(symbolic links),用來指示位於 /etc/rc.d/init.d/
目錄中的 script。在每個 rc
目錄中可以使用 symbolic links,因此可以在不影響實際 script 的情況下建立、修改刪除 symbloic links 來重新設定 runlevel。
K
或 S
來命名。K
為 runlevel 中被刪除(killed)的連結檔,而 S
則為啟始(started)的連結檔。
init
command first stops all of the K
symbolic links in the directory by issuing the /etc/rc.d/init.d/<command> stop
command, where <command> is the process to be killed. It then starts all of the S
symbolic links by issuing /etc/rc.d/init.d/<command> start
.
注意
/etc/rc.d/init.d/httpd stop
指令可以用來停止 Apache HTTP 伺服器。
注意
init
program executes is the /etc/rc.d/rc.local
file. This file is useful for system customization. Refer to 節 30.3, “在開機時執行其它程式” for more information about using the rc.local
file.
init
command has progressed through the appropriate rc
directory for the runlevel, the /etc/inittab
script forks an /sbin/mingetty
process for each virtual console (login prompt) allocated to the runlevel. Runlevels 2 through 5 have all six virtual consoles, while runlevel 1 (single user mode) has one, and runlevels 0 and 6 have none. The /sbin/mingetty
process opens communication pathways to tty devices[14], sets their modes, prints the login prompt, accepts the user's username and password, and initiates the login process.
/etc/inittab
會執行一個稱為 /etc/X11/prefdm
的script。prefdm
script 會依照 /etc/sysconfig/desktop
檔案的內容執行偏好的 X 顯示管理程式 [15] — gdm
, kdm
, or xdm
。
30.3. 在開機時執行其它程式
/etc/rc.d/rc.local
script 在開機時或更換 runlevel 時由 init
指令執行。欲執行例如特別服務項目或啟始裝置這類的必須工作項,比起在 /etc/rc.d/init.d/
目錄下寫繁複的啟始script 和建立 symbolic link,在 script 的下方新增指令則容易了許多。
/etc/rc.serial
script is used if serial ports must be setup at boot time. This script runs setserial
commands to configure the system's serial ports. Refer to the setserial
man page for more information.
30.4. SysV Init 執行層級
init
啟動或者停止。選用 SysV init 原因為其操作容易而且比起傳統 BSD 式 init 程序更富彈性。
/etc/rc.d/
目錄中。在這個目錄中包含 rc
、 rc.local
、rc.sysinit
和非必須的 rc.serial
scripts 以及下列其它目錄:
init.d/ rc0.d/ rc1.d/ rc2.d/ rc3.d/ rc4.d/ rc5.d/ rc6.d/
init.d/
目錄包括了當 /sbin/init
指令控制服務時所用的 scripts。每個已編號的目錄都代表了六個在 Red Hat Enterprise Linux 由預設設定的 runlevel。
30.4.1. 執行層級
init
決定該停止和啟始哪個服務項目。例如 runlevel 1(單機使用者模式)在 runlevel 3 啟始網路服務項目時,將這些服務項目停止。在一個特定的 runlevel 上指定停止或啟始特定服務項目,init
能快速的更換電腦的模式,而不需要使用者手動停止或啟動服務項目。
0
— 停止1
— 單機使用者文字模式2
— 尚未使用(使用者定義)3
— 完整多機使用者文字模式4
— 尚未使用(使用者定義)5
— 完整多機使用者圖形模式(在 X 基礎下的登入畫面)6
— 重新啟動
/etc/inittab
。欲找到系統的預設 runlevel,請搜尋類似於下列並位於 /etc/inittab
的上方:
id:5:initdefault:
/etc/inittab
以更換數字。
警告
/etc/inittab
時請特別注意。即使是些微打字錯誤也會造成系統無法開機。如果上述情況發生,請使用開機磁碟進入單機使用者模式,或進入救援模式啟動電腦以修復該檔案。
30.4.2. 執行層級(Runlevel)工具
/etc/rc.d/
的子目錄下操作數個符號連結檔案(symbolic link)。
/sbin/chkconfig
—/sbin/chkconfig
為一項簡易的指令工具列,用來維修/etc/rc.d/init.d/
目錄層次。- /usr/sbin/ntsysv — ncurses-based 的 /sbin/ntsysv 工具,提供了一個交互文字模式介面,部份的人覺得起比起
chkconfig
更容易使用。 - 服務項目設定工具 — 圖形化的 服務項目設定工具(
系統設定服務項目
)程式是一個用來設定 runlevel 相當有彈性的工具。
30.5. 關機
/sbin/shutdown
指令。shutdown
man page 有完整的選項,但最常用的兩項為:
/sbin/shutdown -h now
/sbin/shutdown -r now
-h
選項停止電腦運作,-r
則是重新啟動電腦。
reboot
和 halt
指令來關閉系統。更多相關 PAM 主控台使用者的資訊,請參照 Red Hat Enterprise Linux 建置指南。
tty
devices.
章 31. PXE 網路安裝
askmethod
開機選項選取 Red Hat Enterprise Linux CD #1 啟始。此外,如果系統有安裝前制環境處理(PXE,Pre-Execution Environment)支援的網路介面卡(NIC),在使用如 CD-ROM 光碟之類的本地媒體之外,您還可以使用設定從另一個網路系統上的檔案啟動。
tftp
server (which provides the files necessary to start the installation program), and the location of the files on the tftp
server. This is possible because of PXELINUX, which is part of the syslinux
package.
- 設定網路(NFS, FTP, HTTP)伺服器來匯出安裝目錄。
- 在
tftp
伺服器上設定 PXE 開機所需要的檔案。 - 設定那些主機被允許從 PXE 設定開機。
- 啟動
tftp
服務 - 設定 DHCP。
- 啟動用戶端並且開始安裝。
31.1. 設定網路伺服器
31.2. PXE 開機設定
tftp
伺服器,因此在客戶端要求這些檔案時能夠在伺服器上找到。tftp
伺服器通常與輸出安裝程式樹的網路伺服器相同。
31.2.1. 指令列設定
pxeos
command line utility, which is part of the system-config-netboot
package, can be used to configure the tftp
server files as described in 節 31.4, “TFTPD”:
pxeos -a -i "<description>" -p <NFS|HTTP|FTP> -D 0 -s client.example.com \ -L <net-location> -k <kernel> -K <kickstart> <os-identifer>
-a
— 指定一個 OS 實體已經被加入到 PXE 設定中。-i
"<description>" — Replace "<description>" with a description of the OS instance.-p
<NFS|HTTP|FTP> — Specify which of the NFS, FTP, or HTTP protocols to use for installation. Only one may be specified.-D
<0|1> — Specify "0
" which indicates that it is not a diskless configuration sincepxeos
can be used to configure a diskless environment as well.-s
client.example.com — 在-s
選項後提供了 NFS、 FTP 或 HTTP 伺服器名稱。-L
<net-location> — Provide the location of the installation tree on that server after the-L
option.-k
<kernel> — Provide the specific kernel version of the server installation tree for booting.-K
<kickstart> — Provide the location of the kickstart file, if available.- <os-identifer> — Specify the OS identifier, which is used as the directory name in the
/tftpboot/linux-install/
directory.
-A 0 -u <username> -p <password>
pxeos
的指令列的資訊,請參照 pxeos
man page。
31.3. 新增 PXE 主機
圖形 31.1. Add Hosts
圖形 31.2. Add a Host
- 主機名稱或 IP 位置/子網路 — IP 位置、合條件的主機名稱或系統子網路可以連接到 PXE 伺服器進行安裝。
- 作業系統 — 安裝作業系統識別器至用戶端。這個列表植於由 網路安裝對話 所建立的網路安裝實體中。
- 序列主控台 — 這個選項啟用序列主控台。
- Kickstart File — The location of a kickstart file to use, such as
http://server.example.com/kickstart/ks.cfg
. This file can be created with the Kickstart Configurator. Refer to 章 29, Kickstart Configurator for details.
31.3.1. 指令列設定
system-config-netboot
套件中的 pxeboot
工具,來新增聯接到 PEX 伺服器的主機。
pxeboot -a -K <kickstart> -O <os-identifier> -r <value> <host>
-a
— 指定要新增的一個主機。-K
<kickstart> — The location of the kickstart file, if available.-O
<os-identifier> — Specifies the operating system identifier as defined in 節 31.2, “PXE 開機設定”.-r
<value> — Specifies the ram disk size.- <host> — Specifies the IP address or hostname of the host to add.
pxeboot
指令列選項,請參照 pxeboot
man page。
31.4. TFTPD
31.4.1. 啟動 tftp
服務
tftp-server
package is installed with the command rpm -q tftp-server
. If it is not installed, install it via Red Hat Network or the Red Hat Enterprise Linux CD-ROMs. 注意
tftp
為一 xientd 的服務,請開始下列指令:
/sbin/chkconfig --level 345 xinetd on /sbin/chkconfig --level 345 tftp on
tftp
與 xinetd
服務下設定,以能即刻在 執行層級 3, 4 和 5 啟動時開始並設定它們。
31.5. 設定 DHCP 伺服器
allow booting; allow bootp; class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient"; next-server <server-ip>; filename "linux-install/pxelinux.0"; }
tftp
server.
31.6. 新增一個自訂的開機訊息
/tftpboot/linux-install/msgs/boot.msg
來自定開機訊息。
31.7. 執行 PXE 安裝
附錄 A. Revision History
修訂記錄 | ||||
---|---|---|---|---|
修訂 5.0-9.400 | 2013-10-31 | Rüdiger Landmann | ||
| ||||
修訂 5.0-9 | 2012-07-18 | Anthony Towns | ||
| ||||
修訂 5.0.0-20 | Wed Feb 07 2007 | Michael Hideo Smith | ||
| ||||
修訂 5.0.0-17 | Thu Jan 23 2007 | Michael Hideo Smith | ||
| ||||
修訂 5.0.0-15 | Thu Jan 18 2007 | Jeff Fearn | ||
| ||||
修訂 5.0.0-14 | Thu Jan 9 2007 | Michael Hideo Smith | ||
| ||||
修訂 5.0.0-13 | Thu Jan 04 2007 | Michael Hideo Smith | ||
| ||||
修訂 5.0.0-12 | Thu Dec 21 2006 | Michael Hideo Smith | ||
|