(感谢 Rick Masters 提供的帮助。) |
我们假设 LILO 安装在硬盘的主引导记录(MBR)上;这似乎是最常见的配置。 您希望将 LILO 安装到当前为第二块硬盘但即将成为第一块硬盘的磁盘上。
编辑文件/new-disk/etc/lilo.conf如下所示
disk=/dev/hdb bios=0x80 # Tell LILO to treat the second # disk as if it were the first # disk (BIOS ID 0x80). boot=/dev/hdb # Install LILO on second hard # disk. map=/new-disk/boot/map # Location of "map file". install=/new-disk/boot/boot.b # File to copy to hard disk's # boot sector. prompt # Have LILO show "LILO boot:" # prompt. timeout=50 # Boot default system after 5 # seconds. (Value is in tenths of # seconds.) image=/new-disk/boot/vmlinuz # Location of Linux kernel. The # actual name may include a version # number, for example # "vmlinuz-2.0.35". label=linux # Label for Linux system. root=/dev/hda1 # Location of root partition on # new hard disk. Modify this as # appropriate for your system. # Note that you must use the name # of the future location, once the # old disk has been removed. read-only # Mount partition read-only at # first, to run fsck. |
仅限 Slackware。 使用 image=/new-disk/vmlinuz。
如果您使用的是 SCSI 硬盘,您可能需要添加一行 initrd。 请参阅您现有的文件/etc/lilo.conf.
在新磁盘上安装 LILO
/sbin/lilo -C /new-disk/etc/lilo.conf |
The-C选项告诉 LILO 要使用的配置文件。