Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
4.27.2. 自動啟動 Red Hat Enterprise Linux
在安裝完 Red Hat Enterprise Linux 之後,每當您想要啟動 Itanium 系統時,您可以在 EFI SHell 提示符號下輸入
elilo
以及任何的開機選項。然而如果您希望設定您的系統以自動開機進入 Red Hat Enterprise Linux,您需要設定 EFI 開機管理程式。
如要設定 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. 使用一個啟動程式碼
建議您設定 ELILO 開機管理程式自動啟動 Red Hat Enterprise Linux,然而如果您需要設定在 ELILO 開機管理程式啟動前必須執行的額外指令,您可以建立一個名稱為
startup.nsh
的啟動程式碼,而且最後的指令必須是 elilo
以開機進入 Linux。
startup.nsh
程式碼必須位於 /boot/efi
分割區中(/boot/efi/startup.nsh
), 而且必須含有下列的文字:
echo -off your set of commands elilo
If you want to pass options to the boot loader (refer to 節 4.27.1, “後安裝的開機管理程式選項”) add them after
elilo
.
You can either create this file after booting into Red Hat Enterprise Linux or use the editor built into the EFI shell. To use the EFI shell, at the
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.
下次系統開機時,EFI 會偵測到
startup.nsh
檔案,並且使用 它來啟動系統。 如要停止 EFI 載入該檔案,請輸入 Ctrl+c。 這將會停止這個載入過程,並且帶您回到 EFI shell 提示符號。