elilo.txt

来自「EFI(Extensible Firmware Interface)是下一代BI」· 文本 代码 · 共 479 行 · 第 1/2 页

TXT
479 行
字号
    -----------------------------    The elilo.efi binary must be in an EFI system partition (FAT32). The config    file, kernel image, and optional initrd ramdisk can be on the same partition    or even another EFI partition. In the following discussion we assume that all     files are on the same EFI partition which is recognized by the EFI shell (nshell)     as fs0. The kernel and initrd can be copied from the any linux filesystems to the     EFI partition using either the mtools (mcopy) or by mounting the EFI partition as     a vfat partition. However you do not really need this because most linux     distributions install both files in the EFI partition and mount this partition in /boot/efi.    To boot a kernel, simply power cycle the machine. Once you get to the EFI    shell prompt, change to the filesystem that maps to the partition where elilo is.	Shell> fs0:	fs0:\>	You might need to make sure that the Shell Path is set such that it will load	ELILO from fs0:. You can verify this by typing:	fs0:\> set   	path : fs0:\		At this point you can invoke ELILO:	fs0:\> elilo	If there is no config file, then it will: 		- pick up the kernel image named vmlinux if it exists, otherwise it will abort.		- pass no argument to the kernel.		You can specify the kernel image and its options on the command line.	For instance you can do:	fs0:\> elilo vmlinux root=/dev/sda5	You can specify as many parameters as you want. The syntax follows the kernel	rule, i.e., list of value pairs (or even single values) separated by space.	A more complicated example would be:	fs0:\> elilo -i initrd-2.4.9 vmlinuz-2.4.9 root=/dev/sda2 console=tty0 console="ttyS0,115200n8"	In this example, notice the double quotes. They are required because the comma is a control	character for nshell.    In the case a config file is found, then elilo will behave according to    the options in that file. However if elilo is invoked with command line options, they    will be combined or they will override (if conflicting) what is defined in the config file.    As of version 3.3, elilo is fully compliant with the EFI specification (1.10) with regards    to where the bootloader (elilo.efi) must be located in the EFI system partition. In     section 11.2.1.3 of the EFI1.10 specification, it is said that in order to avoid conflicts    between various loaders for various OSes or distributions of the same OS, every vendor MUST    use a dedicated directory: \EFI\vendor\. The bootloader must be placed in this directory.    This has always been possible as this is a matter of creating the directory and copying    the elilo.efi file in it. However up until version 3.3, elilo would look for its config file    and kernel/initrd in the root (/) of the partition it was loaded from. As of version 3.3,    elilo will now ONLY look for its configuration file FROM THE DIRECTORY IT WAS LOADED FROM.     The same applies to the kernel and initrd files unless absolute paths are specified. Let us     look at a simple example:    	- suppose elilo.efi is in \EFI\DIST if fs0:  (for the EFI Shell)	- if you invoke elilo as follows:		fs0:\> \efi\dist\elilo -v -p		default file path: \efi\dist\		config file      : \efi\dist\elilo.conf		ELILO boot: 	  Note that this is the same if you invoke elilo directly from \efi or \efi\dist.     File references in the configuration file are treated as relative to the directory    elilo was loaded from except if they use an absolute path.    As of version 3.4 a similar rule applies to the network boot sequence, see netbooting.txt   for details.V/ Interactive mode   ----------------   Elilo can be forced into interactive mode using the "prompt" option in the config   file or with the -p option. In this mode, the user can select a kernel to load.   The interface depends on the chooser, it may be a simple command line prompt as provided   by the simple chooser or a more sophisticated screen with scroll menus as provided by   textmenu. Most choosers depends on the elilo config file to get the information they   display. The simple chooser can operated without the elilo config file. However it   is always better to have this file, to create handy logical names for each possible   boot choices. The logical names are specified with the "label" option in the config   file. They represent a specific kernel "image" and its specific options.   In elilo, the user can select a particular kernel image using the corresponding label   name. A simple example is as follows:      If we suppose that the following is defined in elilo.conf:      	image=vmlinuz-2.4.9	label=linux-up	initrd=initrd-2.4.9	root=/dev/sda2	append="console=tty0 console=ttyS0,115200n8"      then the user can specify linux-up at the prompt and elilo will load the       vmlinuz-2.4.9 kernel file and the initrd-2.4.9 ramdisk and will pass          "root=/dev/sda2 console=tty0 console=ttyS0,115200n8"      as command line arguments to the kernel.      This behavior is identical to Lilo/x86. However, elilo further allows the user      to specify actual kernel files names as well, i.e., kernels that are not defined      in the configuration file. If we reuse the above example and the simple chooser,       the user can type:      ELILO boot: vmlinux-2.4.18 root=/dev/sda2      and elilo will boot the vmlinuz-2.4.18 kernel if it exists.VI/ The alternate kernel image    --------------------------    Oftentimes when debugging kernels you want to reboot the machine once with    your test kernel and, if something goes wrong, you want to fall back to a more    stable kernel. In addition you want to be able to do this from a remote machine.     Many things can go wrong when doing kernel debugging. It could be that you don't    even reach user-mode. In this case however, you still want to fall back to    a stable kernel. The feature you'd like from a boot loader is 'boot once and    then fall back to safe kernel'.    Elilo offers this feature and it's called 'alternate kernel image'.      You can configure elilo to load a kernel only once and then whatever     happens the next reboot falls back to a different kernel hopefully more stable.    To do this, elilo relies on an EFI variable called 'EliloAlt' with a NULL GUID.    The content of this variable is a UNICODE string containing the kernel file name    and its command line options.    When the -a option is specified on the command line or if the "checkalt" option    is present in the config file, elilo will check for the presence of this variable.    If found and the content is a valid UNICODE string, elilo will use it as the kernel    to boot. There is no verification made on the validity of the kernel name or options.    Then the variable is deleted. If the variable is rejected because it does not look    sane, it is also deleted.    The variable can be set from a running Linux system using the /proc/efi/vars    interface. In the tools directory of this package, there is a Linux tool called    elilovar which can be used to create, modify, print, and delete the EliloAlt    variable. Refer to eliloalt.txt for more information on this tool.VII/ Auto booting the machine     -----------------------    Once you're satisfied with your machine setup, it is good to install an     auto boot procedure.  You have two options to do this:    	- from the EFI boot manager menu	- from the EFI shell    The first option is preferred and is used by most Linux distributions.    Elilo can be invoked directly from the boot manager. You need to get into    the 'boot maintenance' menu and use load file a file. This can be tedious    so instead it is recommended that you use a Linux tool called efibootmgr    which is also shipped in most distributions. With this tool, you can    create your own boot option and change the boot order.            The second approach use the EFI shell and a shell script with a special name: 'startup.nsh'.    When the system boots, it looks for EFI partitions and if it finds    a 'startup.nsh' file in ANY of these it will jumpstart execution from it.    So the typical way of auto booting your Linux/ia64 system is to simply create    such a file with the following content:	# cat /boot/startup.nsh	elilo vmlinuz root=/dev/sda2    Of course, this can be simplified if there is a configuration file.VII/ Netbooting      ----------     Please refer to netbooting.txt for a complete description of how to boot     from the network.XII/ Booting on EFI/ia32 platforms     -----------------------------	Until PC comes with the EFI firmware built in, you need to boot from a	floppy that has the EFI firmware on it. Such floppy can be	constructed from the EFI sample implementation and toolkit that is	available from the Intel Developer Web site at:		http://developer.intel.com/technology/efi/	To use elilo on IA-32, you can put it on a floppy and	on a FAT32 partition (msdos partition). You can also	netbooting if you network adapter has support for UNDI/PXE.	Elilo/ia32 is capable of booting unmodified 2.2.x. and 2.4.x kernels	as they are shipped by distributors today (such as Redhat7.2). You don't need 	to recompile the kernel with special options. Elilo ONLY takes compressed kernel	image which are typically obtained via a 'make bzImage'. Plain elf/32 kernel can't 	be booted (plain vmlinux will not work). Similarly, existing initial ramdisks can 	be used without modifications. IX/ Credits    -------	Intel Corp.	Stephane Eranian <eranian@hpl.hp.com>	David Mosberger  <davidm@hpl.hp.com>	Johannes Erdfelt <jerdfelt@valinux.com>	Richard Hirst    <rhirst@linuxcare.com>	Chris Ahna	 <christopher.j.ahna@intel.com>	Mike Johnston	 <michael.johnston@intel.com>X/ Bug reports   -----------   	You can submit bugs to <eranian@hpl.hp.com> or to the Linux/ia64	mailing list at linux-ia64@linuxia64.org. Visit http://www.linuxia64.org	to subscribe to this list.XIII/ Reference      ---------	EFI v1.02 specifications are available from the following web site:	http://developer.intel.com/technology/efi/	The latest sources of ELILO can be downloaded at:		ftp://ftp.hpl.hp.com/pub/linux-ia64

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?