At kernel boot LILO stores information about the disk assignment numbers, and then uses this data when boot loader is being installed. When the boot device changes, the disk numbers change in BIOS settings the selected boot disk is numbered 0x80), so the information stored by LILO does not any longer match the actual configuration.
You must explicitly specify the disk numbers in /etc/lilo.conf:
disk=/dev/hda
bios=0x80
disk=/dev/hdb
bios=0x81