编辑 lilo.conf

接下来,我们将编辑 LILO(Linux 装入器)配置文件 lilo.conf,以添加一个记录告诉 Linux 关于我们完成的第一个安装的信息。

要做到这一点,转至 /etc 目录然后用您喜欢的编辑器打开 lilo.conf 文件(您可能想首先建立一个备份副本,只是为以防万一)。lilo.conf 代码类似于:

boot=/dev/sda  #this points to the boot device

timeout=300 #if no activity in the specified time, load default image

linear

prompt

Default="Linux2"#Linux1 will be displayed at the prompt

Vga=normal #video mode

read-only

map=/boot/map

Install=/boot/boot.b

image=/boot/vmlinuz=2.2.14-5.0 #location of boot image

Label="Linux2" #label

initrd=/boot/initrd-2.2.14-5.0

Root=/dev/sda10 #location of root partition

注:计算机忽略注释(由 # 或者井号开头)。这里包含它们以便您能正确了解每一行的用途 — 不必在您系统上的 lilo.conf 文件中包含这些注释,除非想保留它们以供参考。

同样,如果使用 IDE 驱动器,记住使用 hda 来替换 sda。

配置 LILO 的另一种方法

这里是一种编辑 lilo.conf 文件的替代方法。

打开一个终端窗口,然后转至“/root”目录并输入 linuxconf。这会把您带到 Linux 命令窗口,在那您可以配置系统。

向下滚动直到 Boot mode。在“boot mode”下,您应该看见配置 LILO 的选项。选择菜单上的第二项“Configure LILO Linux configurations”,然后单击“LILO Linux configurations”选项卡。

单击“Add”。然后可以添加其它 Linux 引导分区和内核文件的位置。如果不确定要在每个字段添加什么信息,在输入前,请查看已经列出的内容。


相关内容