Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have three identical disks with identical partitioning using the GPT partition table format:

# sudo parted /dev/sda p
Model: ATA WDC WD30EZRX-00M (scsi)
Disk /dev/sda: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  537MB   536MB   fat32        EFI System Partition  boot
 2      537MB   1611MB  1074MB               raid1boot             raid
 3      1611MB  3001GB  2999GB               primary               raid

The partitions holds:

  1. Files needed by UEFI for booting. Grub's stage 1 resides here.
  2. /boot using the ext2 filesystem in a RAID1 container with /dev/sda2 and /dev/sdb2 as active devices and /dev/sdc2 as a spare. Grub's stage 2 resides here.
  3. / and other mount points who all use ext4, inside LVM, inside a dm-crypt+LUKS container in a RAID1 container with /dev/sda3 and /dev/sdb3 as active devices and /dev/sdc3 as a spare.

The current status:

  1. The system boots and works fine!
  2. Partition 2 and 3 are fully fault tolerant by using RAID1 (one of the two active disks can break without data loss, but not both of them).
  3. The UEFI partition is not fault tolerant. The installation only installed its stuff to /dev/sda.

What I would like to know:

  1. How do I achieve full fault tolerance by manual work, where I am able to boot from any of my three disks /dev/sd[abc]? Remember that a GPT partition is identified by its GUID and that all partitions on a machine needs unique GUID`s.
  2. How do I tell Ubuntu to write stuff to all three disks each time a change is made to the EFI boot partition due to an update of Grub2? It would be nice to have a "set once" solution not requiring manual work in the future.
share|improve this question

1 Answer

  1. From an Ubuntu CD, install GRUB in sda1 by running Boot-Repair --> Advanced options --> GRUB location --> OS by default: sda3 --> Separate /boot partition: sda2 --> Separate /boot/efi: sda1 --> Apply , then install GRUB in sdb1 by running Boot-Repair --> Advanced options --> GRUB location --> OS by default: sdb3 --> Separate /boot partition: sdb2 --> Separate /boot/efi: sdb1 --> Apply , then install GRUB in sdc1 by running Boot-Repair --> Advanced options --> GRUB location --> OS by default: sdc3 --> Separate /boot partition: sdc2 --> Separate /boot/efi: sdc1 --> Apply . This way you will be able to boot even if one (or two) disk break.

  2. The files in the ESPs (sda1, sdb1, sdc1) won't need to be updated. When updating GRUB, you just need to update the /boot/grub/grub.cfg files by running sudo update-grub. (it may update the grub.cfg of only one disk, in this case copy the new grub.cfg to the 2 other disks)

share|improve this answer
Even though it's not changed often. How can you know that the grub64.efi file never will have to be updated? I understand that it's seldom, but never. It could contain a bug which is fixed just like other software. Or have I missed something? – Kent Oct 19 '12 at 13:34
How is using Boot-Repair different from simply running grub-install for sd[abc]1? Does it change the Grub2 menu entries in some way? – Kent Oct 19 '12 at 13:36
Boot-Repair does many additional checks, eg it will make sure your fstab is correctly setup. It won't change the entries except if you change the GRUB options in its Advanced menu. – LovinBuntu Oct 22 '12 at 10:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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