Previous Next Contents

4. Installing hdc to boot as hda

Lilo allows to map the kernel image from one disk and instruct the BIOS to retrieve it from another disk. For example, it's common for me to install Linux on a disk I connect to hdc (master disk of secondary controller) and boot it as a standalong system on the primary IDE controller of another computer. I copied the installation floppy to a tiny partition, so I can run chroot in a virtual console to install hdc while I use the system to do something else.

The lilo.conf file I use to install Lilo looks like:

# This file must be used from a system running from /dev/hdc
boot = /dev/hdc   # overwrite MBR of hdc
disk = /dev/hdc   # tell how hdc will look like:
   bios = 0x80    #  the bios will see it as first drive
delay = 0
vga = 0

image = /boot/vmlinux  # root partition is /dev/hdc1
  root = /dev/hda1         # hdc1 at boot will be hda1
  label = Linux
  read-only

This configuration file must be read by a Lilo running off /dev/hdc1. The Lilo maps that get written the boot sector (/dev/hdc) must rever the copies of vmlinux and to /boot/boot.b that will be available at boot time, i.e., the copies in hdc.

I call this configuration file /mnt/etc/lilo.conf.hdc and I install Lilo by invoking ``cd /mnt; chroot . sbin/lilo -C /etc/lilo.conf.hdc'' while /dev/hdc1 is mounted under /mnt.


Previous Next Contents