[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bootable raid1 on UEFI
From: |
Chris Murphy |
Subject: |
Bootable raid1 on UEFI |
Date: |
Sun, 2 Feb 2014 12:47:33 -0700 |
Simple case on BIOS: two disks that we want to boot linux from reliably even in
the face of a one disk failure.
Therefore /boot is on an md raid1 device. All of the md raid1 member disks have
sufficient MBR gap for grub-install to be executed on each disk. Only one
grub.cfg is needed at /boot/grub and as that single file is updated, it's
mirrored on all member disks. It's very straight forward with existing
grub-install and grub-mkconfig tools.
However, it's not so straightforward on UEFI with Secure Boot. I can manually
create an ESP on each member disk, and copy signed grubx64.efi to each ESP, and
place a grub.cfg [1] on each ESP that forwards to the "real"
/boot/grub/grub.cfg on the md device. But how does upstream intend this to be
done with existing tools?
Chris Murphy
[1]
# forward to real config
search --no-floppy --fs-uuid --set=root --hint-bios=hd$d,gpt2
--hint-efi=hd$d,gpt2 --hint-baremetal=ahci$d,gpt2
d7bc9d0e-7706-44f9-b1a7-ff24b7c360a7
configfile /boot/grub2/grub.cfg
$d is for each disk so that the hint is only looking for the fs-uuid on the
local disk first. The /boot/grub2/grub.cfg is on md raid1 (it could also be
raid10, or raid5 or Btrfs raid1, 10 so there are many other use cases.)
Alternatively the ESPs each have a "real" grub.cfg, both of which need to be
updated any time there's a kernel update, which is a problem because only one
ESP is mounted at /boot/efi.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bootable raid1 on UEFI,
Chris Murphy <=