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

Re: booting from the other disk of a RAID-1



On 29/06/11 00:42, lee wrote:
> Scott Ferguson <prettyfly.productions@gmail.com> writes:
> 
>> On 28/06/11 19:15, lee wrote:
>>>
>>> I'm glad it helped you and Peter.  Now the question is how to actually
>>> solve the problem that one can boot from only one of the disks in a
>>> RAID-1 array.  The point is to still be able to run the system when a
>>> disk fails.  Should the one you boot from fail and you halt the system
>>> to replace it, how do you boot?
>>>
>>>
>> Insert usbkey with backup grub - boot from usbkey.
> 
> How do you make such an USB key?  It would be nice to have in case
> anything fails, yet it shouldn't be needed.
> 
> Being able to boot despite one of the disks in the RAID-1 has failed is
> one of the advantages of having a RAID-1 I don't want to miss.  USB-keys
> are small and can be very hard to find.  Perhaps I shouldn't even make
> such an USB-key because if I do, it won't take long for the disk to fail
> and the USB-key will, of course, have disappeared: Murphys law ...
> 
> 
Example where grub2 is installed to the mbr and /boot is located on the
first primary partition formatted as ext3.
Create a primary partition on the usbkey larger than the space taken by
/boot.
Format the partition as ext3. Copy /boot/* to the new partition on the
usbkey.
Ensure the usbkey is not mounted:-
# grub-setup --force /dev/usbkey_device

NOTE: the last command executes very fast.

There appears to be a way to get grub-setup to do the copying for you -
I just haven't taken the time to figure it out yet. :-/

Also worth a look is grub-mkrescue which can create floppy and cd images.

I use some scripting to do this, create a package list, and backup key
config files, to a USB-key after most builds. dd is then used to backup
the USB-key so that many different backup/recovery/rebuild setups can
easily be stored - and quickly re-written to a USB-key.

Cheers

-- 
"I just have one of those faces.
People come up to me and say, "What's wrong?"
Nothing.
"Well, it takes more energy to frown than it does to smile."
Yeah, you know it takes more energy to point that out than it does to
leave me alone?"
~ Bill Hicks


Reply to: