Hi everyone,
Here is my configuration :
- 1 EFI-only motherboard;
- 4 disks with each 1 EFI System partition and 1 RAID partition;
- The 4 RAID partitions are part of a RAID10 array where / is mounted.
And here is how I handle grub-install:
- I comment /boot/efi in fstab;
- Then, for each of the 4 EFI system partitions, I manually mount it on /boot/EFI, run grub-install, unmount it, and so on;
- Finally, for each of the first 3 EFI system partitions, I create an EFI entry with efibootmgr (the last EFI partition is handled by the last execution of grub-install).
My question is as follows: Is there a better way to do this ? Maybe some syntax in some configuration file to specify that grub-efi should be installed on multiple disks ?
Thanks!
Regards,
Thomas M.
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
RAID, EFI and grub-install
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: RAID, EFI and grub-install
AFAIK there is no configuration file to handle this. I have tried to use RAID 1 on EFI partitions, with superblocks 1.0 at the end of the partitions so that the UEFI firmware can read them. But IIRC grub-install (or was it efibootmgr ?) does not like when /boot/efi is a RAID array instead of a plain partition.
However you can avoid the hassle of mounting and unmounting EFI partitions and running efibootmgr. Instead you can permanently mount the EFI partitions on /boot/efi{,1,2,3} and, for each extra invocation of grub-install,
- specify the EFI partition with --efi-directory=/boot/efi${n}
- specify the EFI boot entry label with --bootloader-id=altboot${n}
You can also ask to install a copy of GRUB in the removable media path (which does not require an EFI boot entry) with --force-extra-removable
However you can avoid the hassle of mounting and unmounting EFI partitions and running efibootmgr. Instead you can permanently mount the EFI partitions on /boot/efi{,1,2,3} and, for each extra invocation of grub-install,
- specify the EFI partition with --efi-directory=/boot/efi${n}
- specify the EFI boot entry label with --bootloader-id=altboot${n}
You can also ask to install a copy of GRUB in the removable media path (which does not require an EFI boot entry) with --force-extra-removable
Re: RAID, EFI and grub-install
Thanks for the tip, I did not know that! However, the idea behind multiple EFI partitions is having (at least) the same level of redundancy for the boot phase as well. You lose this with GRUB on a removable media.You can also ask to install a copy of GRUB in the removable media path (which does not require an EFI boot entry) with --force-extra-removable
Well, that's too bad It's weird though that neither grub nor any Linux distribution have thought of a way to handle this. IMHO, that would be a legit usage and a banal feature for many users.AFAIK there is no configuration file to handle this
I thought of that but it does not seem very safe: if for some reason one of the EFI partition is modified outside the context of the RAID1 array (by the EFI ?), it will be handled by the kernel as if it were corrupted. I don't know what might happen in this situation.I have tried to use RAID 1 on EFI partitions, with superblocks 1.0 at the end of the partitions so that the UEFI firmware can read them
Indeed, that seems to be much more practical! I will do that from now on, thanks for the idea!However you can avoid the hassle of mounting and unmounting EFI partitions and running efibootmgr. Instead you can permanently mount the EFI partitions on /boot/efi{,1,2,3} and, for each extra invocation of grub-install,
- specify the EFI partition with --efi-directory=/boot/efi${n}
- specify the EFI boot entry label with --bootloader-id=altboot${n}
Regards,
Thomas M.
-
- Global Moderator
- Posts: 3049
- Joined: 2017-09-17 07:12
- Has thanked: 5 times
- Been thanked: 132 times
Re: RAID, EFI and grub-install
The "removable media path" can be present on any EFI partition, not only on removable media. It is used by a UEFI firmware to find a fallback bootloader.Thomas_M wrote:the idea behind multiple EFI partitions is having (at least) the same level of redundancy for the boot phase as well. You lose this with GRUB on a removable media.
It is not a GRUB nor Linux thing, it is a UEFI thing. UEFI does not handle boot redundancy.Thomas_M wrote: It's weird though that neither grub nor any Linux distribution have thought of a way to handle this.
Re: RAID, EFI and grub-install
Mmmmh... I cant' see any drawback with that. I'll give it a try, thanks!The "removable media path" can be present on any EFI partition, not only on removable media. It is used by a UEFI firmware to find a fallback bootloader.
True, but with no improvement in sight on that subject, both of them could choose to take matters into their own hands.It is not a GRUB nor Linux thing, it is a UEFI thing. UEFI does not handle boot redundancy.
Your solution for example (/boot/efi${n}), just add a script that supersedes grub-install and execute the later for each EFI partition with the arguments you mentioned, and it may work just fine (or maybe the script needs to be a bit more complex in order to handle cases I haven't thought about but in the end, it will work).
Anyway, I'm getting lost in my own digression . Thanks again for your help!
Regards,
Thomas M.
Re: RAID, EFI and grub-install
This has been addressed in Ubuntu. The postinst script has been modified to detect efi partitions and ask which one(s) to install grub to. Unfortunately it doesn't look as if this change had been ported to Debian.