[Bug 1466150] Re: grub-install breaks when ESP is on raid
Tom Reynolds
1466150 at bugs.launchpad.net
Mon Dec 16 17:56:22 UTC 2019
While installing ESP on top of mdadm (metadata version <= 1.0) RAID-1 is
practically possible, supporting this is not: The UEFI specification
(version 2.8, sections 13.3.1.1, 13.3.3) defines the ESP as a FAT32 file
system which is located (directly) on a GPT partition. While this does
not seem to be part of the specification, some UEFI implementations
expect to be able to write to an ESP.
Having UEFI write to what it must assume is just a FAT32 file system,
but is really a mdadm RAID device in a RAID-1 array hosting a FAT32 file
system, is problematic. While technically possible, allowing direct
writes to a single RAID member violates RAID-1 and mdadm's expectations,
and will put the RAID array into an inconsistent state, requiring a re-
sync, which can only happen after mdadm detects the fact that this array
is inconsistent.
This conclusion has also been drawn in bug 1817066, which therefore
suggests an alternative approach for improved data security for ESP: to
support installing to multiple separate ESPs (located directly on GPT
partitions).
This said, the current bug report seems to be about several things:
* grub-install cannot gracefully handle the (unsupported / non
supportable) situation where the active ESP (FAT32 file system) is not
located directly on a GPT partition (on a GPT partitioned disk), invokes
efibootmgr with an empty -d (target device) argument; this can make
grub-install fail, can make the grub package installation fail (pending
dpkg configuration) and leave apt in a bad state, breaking installations
* Some Ubuntu installers may allow to create partition schemes where ESP
file systems are not located directly on a partition on a GPT
partitioned disk, but such layouts should not be supported by these
installers
* Release upgrades may fail to handle (unsupported / unsupportable)
partition schemes which contain a ESP which is not located directly on a
partition on a GPT partitioned disk (an error)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1466150
Title:
grub-install breaks when ESP is on raid
Status in grub-installer package in Ubuntu:
Triaged
Bug description:
I run a server with mirrored (RAID1) disks using grub-efi.
Root and /boot and /boot/grub are on mirrored partitions.
I have EFI partitions on both disks but it is not possible to RAID1
these as they are FAT32. On an EFI system grub-install will only
install to one of the EFI partitions and so after running install-grub
you have to remember to copy the EFI file across.
Could grub configuration and grub-install be amended to automatically
install to multiple disks?
Searching around there seem to be many people asking this question
without any elegant solution.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub-installer/+bug/1466150/+subscriptions
More information about the foundations-bugs
mailing list