Package: lilo
Version: 1:22.8-7
Severity: normal
Tags: patch

If the first physical device of a RAID1 array is faulty or removed, lilo fails 
to install.
It doesn't get valid informations about the device (md: RAIDset device 0 = 
0x0000) and didn't resume with the next disk.
In "raid.c" lilo should loop through all devices ( for (pass=0; pass < 
raid_limit; pass++) )
to get the disk geometry. But raid_limit is set to md_array_info.active_disks ( 
1 ) and getting
informations about the faulty or removed device is skipped.

The attached patch really scans all devices to get all required information.

lilo 22.6.1-9.3 is also affected.

This Bug is related to Bug #278373 where lilo dies with
"Fatal: Trying to map files from unnamed device 0x0000 (NFS/RAID mirror down ?)"


-- lilo.conf
boot=/dev/md0
root=/dev/md0
raid-extra-boot=mbr-only
map=/boot/map
delay=20
        prompt
        timeout=30
vga=normal

image=/boot/vmlinuz-2.6.26
        label=Linux-2.6.26


-- output of `mdadm -D /dev/md0`
/dev/md0:
        Version : 00.90
  Creation Time : Mon Jun 19 13:40:52 2006
     Raid Level : raid1
     Array Size : 9767424 (9.31 GiB 10.00 GB)
  Used Dev Size : 9767424 (9.31 GiB 10.00 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Apr  2 13:34:44 2009
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : 87a10740:3e72e7cd:74838c78:f64d172f
         Events : 0.4694164

    Number   Major   Minor   RaidDevice State
       0       0        0        0      removed
       1       8        1        1      active sync   /dev/sda1


-- output of `/sbin/lilo -v3 -t -H`
LILO version 22.8 (test mode), Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2006 John Coffman
Released 19-Feb-2007, and compiled at 17:47:45 on Nov 15 2008
Running Linux kernel 2.6.26 on i686
Debian GNU/Linux

Warning: LBA32 addressing assumed
device-mapper major = 253
pf_hard_disk_scan: ndevs=2
  0800  707DF863  /dev/sda
  0810  72B6A682  /dev/sdb
Resolve invalid VolumeIDs
Resolve duplicate VolumeIDs
  0800  707DF863  /dev/sda
  0810  72B6A682  /dev/sdb
device codes (user assigned pf) = 0
device codes (user assigned) = 0
device codes (BIOS assigned) = 3
device codes (canonical) = 3
RAID info:  nr=1, raid=2, active=1, working=1, failed=0, spare=0
Warning: Partial RAID-1 install on active disks only; booting is not failsafe

md: RAIDset device 0 = 0x0000
Warning: Faulty disk in RAID-1 array; boot with caution!!
Fatal: Unusual RAID bios device code: 0xFF


-- System Information:
Debian Release: 5.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages lilo depends on:
ii  debconf [debconf-2.0]        1.5.24      Debian configuration management sy
ii  libc6                        2.7-18      GNU C Library: Shared libraries
ii  libdevmapper1.02.1           2:1.02.27-4 The Linux Kernel Device Mapper use
ii  mbr                          1.1.10-2    Master Boot Record for IBM-PC comp

lilo recommends no packages.

Versions of packages lilo suggests:
pn  lilo-doc                      <none>     (no description available)

-- debconf information:
  liloconfig/fstab_broken:
  liloconfig/banner:
  liloconfig/liloconf_incompatible:
  lilo/bad_bitmap:
  liloconfig/use_lba32: true
  lilo/upgrade:
  liloconfig/liloconf_exists:
  liloconfig/configuring_base:
  liloconfig/use_current_lilo: true
  lilo/runme: false
  liloconfig/wipe_old_liloconf: false
  liloconfig/instruction:
  liloconfig/activate_error:
  liloconfig/select_bitmap: /boot/coffee.bmp
  liloconfig/lilo_error:
  lilo/new-config:
  liloconfig/odd_fstab:
  liloconfig/install_from_root_device: true
  liloconfig/make_active_partition: true
  liloconfig/maintitle:
  liloconfig/mbr_error:
  liloconfig/lilo_warning:
  liloconfig/install_mbr: false
  liloconfig/no_changes:
* lilo/add_large_memory: false


* FES GmbH Fahrzeug-Entwicklung Sachsen 
  USt.-Id. Nr.:      DE 141379336         
  Registergericht:   Amtsgericht Chemnitz, Registernummer: HRB 4499             
  Geschaeftsfuehrer: Dr. Hartmut Kaul, Ronny Tolliszus, Frank Weidenmueller

* Auto-Entwicklungsring Sachsen GmbH
  USt.-Id. Nr.:      DE 188743030
  Registergericht:   Amtsgericht Chemnitz, Registernummer: HRB 14770
  Geschaeftsfuehrer: Dr. Hartmut Kaul, Ronny Tolliszus, Frank Weidenmueller
diff -Nur lilo/lilo-22.8/raid.c lilo/lilo-22.8/raid.c
--- lilo/lilo-22.8/raid.c	2009-04-01 17:27:06.000000000 +0200
+++ lilo/lilo-22.8/raid.c	2009-04-01 17:26:48.000000000 +0200
@@ -223,7 +223,7 @@
 	    if (!force_raid) die("Not all RAID-1 disks are active; use '-H' to install to active disks only");
 	    else {
 		warn("Partial RAID-1 install on active disks only; booting is not failsafe\n");
-		raid_limit = md_array_info.active_disks;
+		raid_limit = md_array_info.raid_disks;
 	    }
 	}
 	raid_index = 0;

Reply via email to