Hi,
Martin Bene wrote:
> I'm not too happy with this double-lilo setup I'm currently using - is
> there any way to make the boot process more transparent while still
> retaining the ability to start from either drive?
Yes! Lilo allows you to do this nicely. I've got it up and running on my
system.
Just create two different lilo configuration files ( on my system they are
/etc/lilo.conf.sda and /etc/lilo.conf.sdb ). The differences between these
two files are the following:
(1) The "boot" directive in lilo.conf determines on which drive the master
boot record for lilo will be installed. On the lilo.conf.sda, this boot
directive is set to /dev/sda, and in lilo.conf.sdb it is set to /dev/sdb
(2) Make sure each configuration file has different "map", "install", and
"backup" directives which point to the appropriate files in their own boot
partition. ( /kernelN on your system, /bootN on mine ) It is very important
to have two unique map files on each drive, because that file contains all
of the configuration for lilo. It's read and processed by the master boot
record, which is less than 512 bytes and can't too much.
(3) Make sure each lilo.conf file can boot the kernel images stored on each
drive. On the lilo.conf.sdb, make the default image be one which reads a
kernel off of the sdb drive. Do this by putting this section first in the
file, or using the "default" directive to name the default image label.
Now this will allow you to boot off of either drive when both are in the
system and running. But when the first drive fails, lilo will not be able to
run at all. This is because it memorized that sdb (where all its
configuration in the map file resides) was on the disk that had a certain
bios address. Because the disks have changed when sda failed, that drive no
longer has that bios address.
(4) To get around this use the "disk" directive:
Basically, you give lilo the bios address of the second drive - but, you
give it the bios address the second drive _will_ have when the first fails.
On my system I just add the following to /etc/lilo.conf.sdb
------
disk=/dev/sdb
bios=0x80
------
Depending on your disk configuration the actual bios address ( 0x80 ) might
be different. They are assigned from 0x80, with that drive being the first,
upwards.. so 0x81 is the second drive, etc. Your SCSI BIOS should tell you
the bios address of the drives it finds at bootup. (At least mine does..)
Oh, forgot to mention how to install lilo using the non-default
configuration file. Just use the -C option. So, I install both of my lilo
files with the following:
-----
lilo -C /etc/lilo.conf.sda
lilo -C /etc/lilo.conf.sdb
-----
The real documentation is in the lilo mini-HOWTO. The details on the "disk"
directive are in a section titled "Installing hdc to Boot as hda and Using
bios=". Can be found at:
http://www.linuxhq.com/HOWTO/mini/LILO-4.html
I've included my lilo configuration here, just in case actually seeing it
helps.
- David Harris
Principal Engineer, DRH Internet Services
----------------------------
[root@w1 /root]#
[root@w1 /root]#
[root@w1 /root]# cat /etc/lilo.conf.sda
boot=/dev/sda
map=/boot1/map
install=/boot1/boot.b
backup=/boot1/boot.0800
prompt
timeout=50
serial=0,9600n8
optional
image=/boot1/vmlinuz-2.0.35-1
label=linux
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img
append="mem=128M console=0x3f8"
read-only
image=/boot1/vmlinuz-2.0.35-1_old
label=linux_old
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img_old
append="mem=128M console=0x3f8"
read-only
image=/boot1/vmlinuz-2.0.35-1_orig
label=linux_orig
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img_orig
append="mem=128M"
read-only
image=/boot2/vmlinuz-2.0.35-1
label=linux2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img
append="mem=128M console=0x3f8"
read-only
image=/boot2/vmlinuz-2.0.35-1_old
label=linux_old2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img_old
append="mem=128M console=0x3f8"
read-only
image=/boot2/vmlinuz-2.0.35-1_orig
label=linux_orig2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img_orig
append="mem=128M"
read-only
[root@w1 /root]#
[root@w1 /root]#
[root@w1 /root]# cat /etc/lilo.conf.sdb
boot=/dev/sdb
map=/boot2/map
install=/boot2/boot.b
backup=/boot2/boot.0800
prompt
timeout=50
serial=0,9600n8
default=linux2
optional
disk=/dev/sdb
bios=0x80
image=/boot1/vmlinuz-2.0.35-1
label=linux
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img
append="mem=128M console=0x3f8"
read-only
image=/boot1/vmlinuz-2.0.35-1_old
label=linux_old
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img_old
append="mem=128M console=0x3f8"
read-only
image=/boot1/vmlinuz-2.0.35-1_orig
label=linux_orig
root=/dev/sda6
initrd=/boot1/initrd-2.0.35-1.img_orig
append="mem=128M"
read-only
image=/boot2/vmlinuz-2.0.35-1
label=linux2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img
append="mem=128M console=0x3f8"
read-only
image=/boot2/vmlinuz-2.0.35-1_old
label=linux_old2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img_old
append="mem=128M console=0x3f8"
read-only
image=/boot2/vmlinuz-2.0.35-1_orig
label=linux_orig2
root=/dev/sda6
initrd=/boot2/initrd-2.0.35-1.img_orig
append="mem=128M"
read-only
[root@w1 /root]#
[root@w1 /root]#
[root@w1 /root]# ls -la /boot1
total 4536
drwxr-xr-x 3 root root 1024 Dec 14 04:53 ./
drwxr-xr-x 24 root root 1024 Dec 15 23:42 ../
lrwxrwxrwx 1 root root 24 Nov 20 20:16 System.map ->
System.map-2.0.35
-rw-r--r-- 1 root root 104883 Jul 15 00:05 System.map-2.0.35-1
-rw-r--r-- 1 root root 512 Nov 11 12:27 boot.0800
-rw-r--r-- 1 root root 4536 May 7 1998 boot.b
-rw-r--r-- 1 root root 300 May 7 1998 chain.b
-rw-r--r-- 1 root root 1422465 Dec 14 04:53 initrd-2.0.35-1.img
-rw-r--r-- 1 root root 1418519 Dec 14 03:23
initrd-2.0.35-1.img_old
-rw-r--r-- 1 root root 204735 Nov 11 13:25
initrd-2.0.35-1.img_orig
drwxr-xr-x 2 root root 12288 Nov 20 20:11 lost+found/
-rw------- 1 root root 97792 Dec 14 04:53 map
-rw-r--r-- 1 root root 11773 Jul 15 00:05 module-info-2.0.35-1
lrwxrwxrwx 1 root root 25 Nov 20 20:16 modules-info ->
module-info-2.0.35
-rw-r--r-- 1 root root 308 May 7 1998 os2_d.b
-rw-r--r-- 1 root root 444019 Dec 14 04:33 vmlinuz-2.0.35-1
-rw-r--r-- 1 root root 438802 Dec 14 03:23 vmlinuz-2.0.35-1_old
-rw-r--r-- 1 root root 448295 Nov 11 13:25 vmlinuz-2.0.35-1_orig
[root@w1 /root]#
[root@w1 /root]#
[root@w1 /root]# ls -la /boot2
total 8051
drwxr-xr-x 3 root root 1024 Dec 14 04:53 ./
drwxr-xr-x 24 root root 1024 Dec 15 23:42 ../
lrwxrwxrwx 1 root root 24 Nov 20 20:16 System.map ->
System.map-2.0.35
-rw-r--r-- 1 root root 104883 Jul 15 00:05 System.map-2.0.35-1
-rw-r--r-- 1 root root 512 Nov 11 12:27 boot.0800
-rw-r--r-- 1 root root 4536 May 7 1998 boot.b
-rw-r--r-- 1 root root 300 May 7 1998 chain.b
-rw-r--r-- 1 root root 3584000 Nov 20 17:12 initrd
-rw-r--r-- 1 root root 1422465 Dec 14 04:53 initrd-2.0.35-1.img
-rw-r--r-- 1 root root 1418519 Dec 14 03:25
initrd-2.0.35-1.img_old
-rw-r--r-- 1 root root 204735 Nov 11 13:25
initrd-2.0.35-1.img_orig
drwxr-xr-x 2 root root 12288 Nov 20 20:11 lost+found/
-rw------- 1 root root 97792 Dec 14 04:53 map
-rw-r--r-- 1 root root 11773 Jul 15 00:05 module-info-2.0.35-1
lrwxrwxrwx 1 root root 25 Nov 20 20:16 modules-info ->
module-info-2.0.35
-rw-r--r-- 1 root root 308 May 7 1998 os2_d.b
-rw-r--r-- 1 root root 444019 Dec 14 04:34 vmlinuz-2.0.35-1
-rw-r--r-- 1 root root 438802 Dec 14 03:25 vmlinuz-2.0.35-1_old
-rw-r--r-- 1 root root 448295 Nov 11 13:25 vmlinuz-2.0.35-1_orig
[root@w1 /root]#
[root@w1 /root]#
[root@w1 /root]#
----------------------------
- David Harris
Principal Engineer, DRH Internet Services