[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Root on RAID - solution



Hi all,

The debian potato root-on-software-RAID problem is now solved.

Summary:
--------

My root-on-software RAID system was unbootable; lilo only reached the LI
stage.

The solution appears to be: the disk from whose MBR the
root-on-software-RAID is to be booted *for the first time* must be the
disk containing the first partition of the RAID1 array containing the
/boot filesystem.  Only then will lilo not complain about the install
device not being the first disk, and only then will the root-on-RAID
system boot.

Once the RAID system is up and the arrays have been reconstructed to
include partitions on the disk which housed the initial non-raid
installation, lilo can be run again with boot=/dev/sdb, boot=sdc etc. to
install lilo on the MBR of the other disks and ensure boot redundancy.  
Of course, one must remember to do this every time one runs lilo.
In this case lilo *will* complain when installing to the MBR's of disks
other than the first disk, but it doesn't seem to matter; the system can
then be booted from any of the disks, the choice being made from the SCSI
BIOS.


Details
-------

My root partition is /dev/md2 and is RAID5.
My /boot partition (the one lilo is interested in) is 
/dev/md1 and is RAID1 (the only RAID level lilo can boot from).

--begin lilo. conf--

# lilo.conf modified for use with root-on-software-RAID 
# by George Karaolides 2001-08-03
# _______________________________
# -------------------------------

# Global options
# --------------

# Prompt for boot choice
prompt

# Wait for ... deciseconds; unspecified waits forever
timeout=50

# Disk device info. for root-on-software-RAID device.
# 
# Lilo knows nothing of RAID5, for example; it talks only RAID1, and
# then only by reading individual partitions, not arrays.  We put the
# /boot info in a RAID1 array mounted under the root device so the
# /boot data is mirrored while the system is up, and we give lilo all
# the info it needs to find the data in a partition which is part of
# this RAID1 array at boot time.
#
# Once lilo has been given the information about the root RAID device,
# the device can be specified as the root device in the kernel options.
#
disk=/dev/md2

        # Geometry
        #
        cylinders=8761
        heads=64
        sectors=32

        # BIOS id: the first one (0x80).  BIOS (SCSI or IDE)
        # will set the ID to this when the disk to boot from 
        # is selected using the BIOS setup.
        #
        bios=0x80

        # Partition info. so lilo can locate the partition 
        # which is part of the /boot RAID1 array.  Note that
        # the partition name can be any md device, used or unused, 
        # other than the root device; lilo reads the individual 
        # partition, not the actual array and simply uses this name
        # for internal reference.
        #
        partition=/dev/md1
                # First sector
                start=32

# End of disk device info for root-on-software-RAID device.
# Now the device can be specified as the root device in kernel options.


# Disk to whose MBR lilo will install.  When starting root-on-RAID for
# the first time, this **must** be the disk containing the **first**
# partition in the /boot RAID1 array.   Once the root-on-RAID system
# is up, lilo can be re-run with different values here to install to
# the MBR's of other disks and ensure boot redundancy.  Then, lilo
# complaints about the device not being the first disk can be ignored.
#
boot=/dev/sdd

# Default boot choice.
#
default=linux

# End of global options.

# Kernel options: Can be configured globally as defaults for all
# kernels (except for `label' and `literal'), or per image.
# ---------------------------------------------------------

# Root device.
#
root=/dev/md2


# Boot choices
# ------------

image=/boot/vmlinuz
        label=linux
        read-only

image=/boot/vmlinuz.old
        label=linux-old
        read-only

-- end lilo.conf --

George Karaolides       8, Costakis Pantelides St.,
tel:   +35 79 68 08 86                   Strovolos, 
email: george@karaolides.com       Nicosia CY 2057,
web:   www.karaolides.com      Republic  of Cyprus





Reply to: