Re: RAID-1 root/boot/lilo problem

From: M (non_at_email.non)
Date: 04/16/04


Date: Fri, 16 Apr 2004 06:31:45 -0600

OK, with your hint I'm getting somewhere.

My original intention was to make lilo write to a degraded /dev/md0 to get
the needed boot sector written there, then reboot the system and complete
the addition of /dev/hda1 into the array. Obviously lilo was not enthused
about doing this, and probably rightfully so- the system may not have been
able to boot off /dev/hdc1 anyway. I just wish its fatal message would
have been a little more clueful.

So I modified /etc/fstab and made /dev/md0 mount on /boot and rebooted with
a mkbootdisk floppy. The system came up showing /dev/md0 as mounted
on /boot, so I successfully completed the md0 array by adding /dev/hda1. I
thought I had it in the bag, so I made sure my /etc/lilo.conf had
boot=/dev/md0 and did a lilo, figuring it would update the boot sectors of
the drives. Lilo succeeded, but on reboot I just got a big string of crap
on the console. Rebooted with the mkbootdisk floppy and /dev/md0 was again
degraded to only running /dev/hdc1 (not sure why).

As a second try, reading the README.raid1 from lilo-doc informed me that
using the raid-extra-boot="/dev/hdc1,/dev/hda1" would write usable boot
sectors to the MBR's of those devices. Tried that, same string of crap on
reboot.

I -am- using the plain old "lilo" command (without -t) for my tests.

Here is the output of lilo -v3 with the same lilo.conf as my previous post,
except with raid-extra-boot="/dev/hdc1,/dev/hda1". Before this command was
given, the md0 array was synced with both /dev/hda1 and /dev/hdc1. Would
the output of lilo -q -v3 help?

Thank you for the pointer. I think I'm getting close.

Mike

LILO version 22.2, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2001 John Coffman
Released 05-Feb-2002 and compiled at 20:57:26 on Apr 13 2002.
MAX_IMAGES = 27

RAID info: nr=2, raid=2, active=2, working=2, failed=0, spare=0
md: RAIDset device 0 = 0x0301
bios_dev: device 0301
Warning: Int 0x13 function 8 and function 0x48 return different
head/sector geometries for BIOS drive 0x80
Warning: Int 0x13 function 8 and function 0x48 return different
head/sector geometries for BIOS drive 0x81
bios_dev: masked device 0300, which is /dev/hda
bios_dev: geometry check found 0 matches
bios_dev: PT match found 1 match (0x80)
Device 0x0301: BIOS drive 0x80, 16 heads, 65535 cylinders,
               63 sectors. Partition offset: 63 sectors.
RAID scan: geo_get: returns geo->device = 0x80 for device 0301
disk->start = 63 raid_offset = 0 (00000000)
Name: /dev/hda1 yields MBR: /dev/hda (without primary partition check)
md: RAIDset device 1 = 0x1601
bios_dev: device 1601
bios_dev: masked device 1600, which is /dev/hdc
bios_dev: geometry check found 0 matches
bios_dev: PT match found 1 match (0x81)
Device 0x1601: BIOS drive 0x81, 16 heads, 65535 cylinders,
               63 sectors. Partition offset: 63 sectors.
RAID scan: geo_get: returns geo->device = 0x81 for device 1601
disk->start = 63 raid_offset = 0 (00000000)
Name: /dev/hdc1 yields MBR: /dev/hdc (without primary partition check)
RAID list: /dev/hdc is device 0x1600
RAID list: /dev/hda is device 0x0300
Warning: using BIOS device code 0x80 for RAID boot blocks
raid_setup returns offset = 00000000
raid flags: at bsect_open 0x02
Reading boot sector from /dev/md0
Merging with /boot/boot-menu.b
Device 0x0301: BIOS drive 0x80, 16 heads, 65535 cylinders,
               63 sectors. Partition offset: 63 sectors.
Secondary loader: 15 sectors.
Device 0x0301: BIOS drive 0x80, 16 heads, 65535 cylinders,
               63 sectors. Partition offset: 63 sectors.
map_create: boot=0900 map=0900
Boot image: /vmlinuz-2.6.5 -> /boot/vmlinuz-2.6.5
Device 0x0301: BIOS drive 0x80, 16 heads, 65535 cylinders,
               63 sectors. Partition offset: 63 sectors.
Setup length is 10 sectors.
Mapped 2182 sectors.
Added Linux-2.6.5 *
    <dev=0xf0,hd=0,cyl=44,sct=83>
    "ro root=906"

do_md_install: MD_PARALLEL
/boot/boot.0900 exists - no backup copy made.
Map file size: 15872 bytes.
Writing boot sector.
The boot record of /dev/md0 has been updated.
Specifed partition: /dev/hdc raid offset = 00000000
Reading boot sector from /dev/hdc
Warning: /dev/hdc is not on the first disk
/boot/boot.1600 exists - no backup copy made.
Writing boot sector.
The boot record of /dev/hdc has been updated.
Specifed partition: /dev/hda raid offset = 00000000
Reading boot sector from /dev/hda
/boot/boot.0300 exists - no backup copy made.
Writing boot sector.
The boot record of /dev/hda has been updated.

JohnInSD At san DOT rr dot COM wrote:

> Error here. With only /dev/hdc1 active in the array, the installation of
> the
> boot record will only be on hdc. You will not be able to boot from hda.
>
> THat is why you get next to the last message: about 0x81, which is not
> the first disk.
>
> Unless both hda1 and hdc1 are active in the md0 array, it is pretty
> useless to
> try to install LILO. You will have no redundancy, because the
> installation will be on only one disk.
>
> Once you have md0 fully redundant, then the output from "lilo -v3" would
> be of interest.
>
> --John



Relevant Pages

  • Re: LILO with root-raid nightmare - please help.
    ... Kernel & BIOS return differing head/sector geometries for device 0x80 ... /dev/hda is not on the first disk /boot/boot.0300 exists - no boot sector backup copy made. ... I believe the problem may have stemmed from the fact that I originally set up the array on woody with a version of lilo that needed to overwrite the mbr of each of the physical disks, apparently this isn't the default behavior for raid in newer versions of lilo. ...
    (Debian-User)
  • Re: grubby: unable to open /boot/boot.b: No such file or directory
    ... Thomas Rabaix wrote: ... Development beyond version 21 Copyright 1999-2006 John Coffman ... The boot sector and the map file have *NOT* been altered. ... this is true, as noted in 1st line of lilo response, it proves out ...
    (Fedora)
  • Re: lilo not "accepting" a new kernel
    ... LILO version 22.6.1, ... Debian GNU/Linux ... Reading boot sector from /dev/hda ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: lilo not "accepting" a new kernel
    ... # lilo -v LILO version 22.6.1, ... Reading boot sector from /dev/hda ... Some time between 2.6.13 & 2.6.14, the Debian people changed the ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: intelligent disassembly
    ... Linux doesn't seem to have ... I did a Google search of the disassemblers you mentioned and was led ... the boot sector that is produced by Lilo derives from source code ...
    (comp.os.msdos.programmer)