Menu Close
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 Boot Manager。
配置 EFI Boot Manager(可能会根据硬件而有所不同):
- 引导 Itanium 系统,然后从 EFI Boot Manager 菜单中选择 Boot option maintenance menu。
- 从主菜单中选择 Add a Boot Option。
- 选择在 Linux 中被挂载为
/boot/efi/
的系统分区。 - 选择
elilo.efi
文件。 - 在
Enter New Description:
提示下,键入Red Hat Enterprise Linux 5
,或你想在 EFI Boot Manager 菜单中显示的名称。 - 在
Enter Boot Option Data Type
提示下,如果你不想给 ELILO 引导装载程序传递选项,输入N
代表 No Boot Option。这个选项在多数情况下都能奏效。如果你想给引导装载程序传递选项,你可以在/boot/efi/elilo.conf
配置文件中配置。 - 对
Save changes to NVRAM
提示回答Yes
。这会把你返回到 EFI Boot Maintenance Manager 菜单中。 - 下一步,让 Red Hat Enterprise Linux 5 这个菜单项目成为默认引导项目。一个引导选项列表会出现。把 Red Hat Enterprise Linux 5 菜单项目移到列表顶端,方法是使用箭头键来选择它,然后按 u 键来把它向上移动。你还可以按 d 键把项目向下移动。改变了引导顺序后,选择 Save changes to NVRAM。选择 Exit 来返回到主菜单。
- Optionally, you can change the boot timeout value by choosing Set Auto Boot TimeOut => Set Timeout Value from the Main Menu.
- 选择 Exit 来返回到 EFI Boot Manager。
4.27.2.1. 使用启动脚本
推荐你配置 ELILO Boot Manager 来自动引导Red Hat Enterprise Linux 。然而,如果你在启动 ELILO 引导装载程序之前需要执行额外的命令,你可以创建一个叫做
startup.nsh
的启动脚本。最后一个命令应该是引导 Linux 的 elilo
命令。
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 提示下。