grub-devel
[Top][All Lists]
Advanced

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

[patch] Universal RAID1 safe BIOS booting


From: Jan Kratochvil
Subject: [patch] Universal RAID1 safe BIOS booting
Date: Sat, 20 May 2006 19:34:45 +0200
User-agent: Mutt/1.4.2.1i

Hi,

there is AFAIK no solution for safe booting from RAID1 devices such as in the
typical case of two harddrives in a PC (Primary Master+Primary Slave or
Primary Master+Secondary Master).

Created a BIOS wrapper to automatically detect disk failure and swap
0x80<->0x81 reading so it applies to stage1/stage2/kernel/initrd/whatever
loading. It was tested using QEMU patches simulating various disk failures.

        
http://cvs.jankratochvil.net/viewcvs/biosautoraid/biosautoraid.tar.gz?tarball=1
        http://cvs.jankratochvil.net/viewcvs/biosautoraid/README?rev=HEAD

WHY:

The loading of stage2 can be fixed only for 0x80 or 0x81 but there is never
a foolproof choice. Sometimes the primary drive 0x80 dies while becoming
unreadable, in some other cases it dies while disappearing from POST so 0x81
becomes 0x80. If you set 0x80 or 0x81 there are always some disk crash cases
where the booting will fail.

Fallback to the second drive during failure of the kernel load is AFAIK not
possible with LILO and it is even a bit complicated to configure with GRUB.

REQUIREMENTS:

This solution is fully independent of the used loader. Either LILO or GRUB can
be used, both have been tested. Just the sectors required for booting need to
be exactly at the same sectors of both disks. This is satisfied with standard
Linux-RAID devices /dev/md* if both disks are partitioned the same way.

DISADVANTAGE:

Currently it does not support LBA32 handling so you must install the boot stuff
under the first 8GB. I have some draft LBA32 support done but it never got
debugged/finished as there are no business needs for it. The whole swapping
wrapper no longer fits into 1 sector so it needs its own stage2 loader (also
with automatic drives swapping) etc.

TESTING/DEBUGGING:

Used the attached "block-limit.diff" QEMU patch, it is user unfriendly to use.

SPONSORSHIP:

Development paid by the courtesy of JK Labs s.r.o.

Some integration into GRUB/LILO would be wised? Do you find it useful?



Regards,
Lace

Attachment: block-limit.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]