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