I would like my RAID10 to survive the failure of the bootdisk. I want to write grub to the MBR of each disk in the array so that in the case of a failure the array will still boot on the remaining members.

I have a 4 disk array, so in theory I only need 2 grub MBRs, but I don't see the harm in putting the bootloader on all 4.

Grub folder is: /boot/grub Root is: (md0)/

Step by step, how do I install grub on each drive?

  • I accomplished this under ubuntu natty using the automatic partitioning. Unfortunately I can't really write a decent answer because the install did all the heavy lifting. On a high level a small partition was created that grub uses to store data, and then grub was installed on the mbr of both disks. – Antonius Bloch May 27 '11 at 19:19

I see you've already figured out how to accomplish this from a high level interface, but for the sake of anybody else who would like to learn how to configure software RAID10, I'll link to a fantastic article that goes into great depth on how to accomplish this. Rather than copy the article verbatim, I'll link to it instead. I used this article as a guide to set up RAID 10 for a file server; it also explains how to configure GRUB to successfully boot after a disk failure.

  • 1
    Still this is mostly a link only answer and as links become unavailable, it might loose its appeal after some time. Could you edit it to include the essential steps included in the article? – Konrad Gajewski Aug 2 at 20:05

I usually don`t do this with grub. The problem - which is not addressed in the referenced article is:

If you loose sda (=hd0) your previous sdb (=hd1) will become sda (=hd0) which confuses grub: It was installed to sdb/hd1.

I use dd from one partition to the other to copy the whole boot-partition (including grub-setup).

And don`t forget to set up your bios so it will continue to boot in case of a drive failure. ;-)

  • 2
    Provided you install and setup GRUB on both drives used for the RAID 0 configuration and also reference the lowest possible drive (hd0) in the config file, there won't be a problem, since even if hd0 fails, hd1 will take its place and become hd0. – Richard Keller May 31 '11 at 20:23
  • Is this grub legacy or grub2 you are talking about? – Antonius Bloch Jun 1 '11 at 13:01
  • My experience is with using GRUB legacy - I'm not sure whether there would be any difference using GRUB 2. – Richard Keller Jun 1 '11 at 13:47
  • I think modern Grub is getting past this problem using the partition UUID to identify the disk/partition regardless of device name changes. – Antonius Bloch Jun 4 '11 at 16:47
  • "modern" = grub2 ? That would be a real reason to switch to grub2. – Nils Jun 4 '11 at 20:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.