LILO/zh-cn

LILO (LInux LOader) is Article description::a simple boot loader to load Linux and other operating systems.

安装
LILO's installation is two-fold. One is the installation of the software itself on the system (but does not activate LILO), the second one is the installation (activation) of the LILO bootloader on the disk's MBR.

Emerge
The software installation will only deploy the software on the file system, but will not install LILO in the MBR.

在 MBR 安装 LILO
In order to install LILO on the MBR or update LILO, invoke. However, before doing that, the file must be set up, which is covered in the  section below.

配置
An example file is provided at. To start configuring LILO, copy over the example file.

相应地，更新 文件.

生成配置
First configure LILO to be deployed on the system. The  parameter tells LILO where to install the LILO bootloader in. Usually, this is the block device that represents the first disk (the disk that the system will boot), such as. Be aware that the file still uses  so make sure that references to  are changed to.

Next, tell LILO what to boot as default (if the user does not select any other option at the boot menu). The name used here is the  value of the operating system blocks defined later in the file.

LILO will show the available options for a short while before continuing to boot the default selected operating system. How long it waits is defined by the  parameter and is measured in tenths of a second (so the value 10 is one second):

Configuring the Gentoo OS block
An example configuration block for Gentoo is shown below. It is given the "Gentoo" label to match the  parameter declared earlier.

This will boot the Linux kernel with root file system.

添加内核参数
To add additional kernel parameters to the OS block, use the  parameter. For instance, to boot the Linux kernel silently (so it does not show any kernel messages unless critical):

users for instance would want to set  so that the systemd init is used:

As can be seen, additional kernel parameters are just appended to the same  parameter.

Multiple block definitions
It is a good idea to keep old definitions available in case the new kernel doesn't boot successfully. This is accomplished by creating another block:

在 MBR 更新LILO
As mentioned earlier, has to be executed in order to install LILO in the MBR. This step has to be repeated every time is modified or when the Linux kernel(s) that the  file points to are updated!

多次运行 不会有影响.

双启动 Gentoo 和 FreeBSD
要 Gentoo 和 FreeBSD们，像下面这样编辑 ：

请确保调整示例配置文件以匹配所使用的设置.

Unmerge
很简单就能卸载 lilo：