| (Thanks to Rick Masters for helping with this.) |
We're assuming that LILO is installed on the hard
disk's Master Boot Record (MBR); this seems to be the
most common configuration. You want to install LILO on
what's presently the second hard disk but will become the first hard disk.
Edit the file /new-disk/etc/lilo.conf as follows:
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. |
If you're using a SCSI hard disk, you may have to
add a line with initrd. See your existing file
/etc/lilo.conf.
Install LILO on the new disk:
/sbin/lilo -C /new-disk/etc/lilo.conf |
The -C option tells LILO what
configuration file to use.