[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UEFI + Raid

On 05/09/2017 05:44 PM, Pascal Hambourg wrote:
Le 09/05/2017 à 01:48, Sam Smith a écrit :

I have installed Debian Stretch on my first system using UEFI. I used a
two disk Raid 1 + LVM configured during install time to mount / on
(among other things).

But now I need to figure out how to add redundancy to the software raid
1 since I believe boot entries are only added to one disk during
installation time?

I did it with Wheezy and wrote a post about it in a french forum. But it
isn't very useful if you cannot read french, and it does not take into
account new fancy grub-install options available since Jessie :

According to
https://wiki.debian.org/UEFI#Missing_features there doesn't seem to be
much options. Is my only option to copy the FAT32 EFI system partition
from the first disk to the second disk and then use efibootmgr to add it
(the second disk) as a boot entry?

No, you have other options.
Manually install a copy of the GRUB EFI core image in the EFI removable
path of each disk. This location does not require to add an EFI boot
entry with efibootmgr.
Or use grub-install with --removable and --efi-directory for each disk.
Or use grub-install with --efi-directory and --bootloader to install a
copy of GRUB wherever you want and add an EFI boot entry for it.

Maybe you could also create a RAID 1 array with superblock at the end
and use it as the EFI system partition. Never tried it.

And will any subsequent kernel or
grub updates affect the system partition and thus require another
copy/sync to the second disk?

Kernel update : no, it just affects the /boot contents.
GRUB package update : yes.

Thanks for the tips.

I tried to use "grub-install -v --target=x86_64-efi --bootloader-id=grub /dev/sdb"

But as far as I could tell everything was installed to the first disk still (sda) and /boot/efi/EFI/ then had two entries, the old 'debian' one and then new 'grub' one.

"efibootmgr -v" showed:

> Boot000E* grub HD(1,GPT,3ec825d3-e2f7-4491-b4a5-321032b0ab8c,0x800,0x79800)/File(\EFI\grub\grubx64.efi) > Boot000F* debian HD(1,GPT,3ec825d3-e2f7-4491-b4a5-321032b0ab8c,0x800,0x79800)/File(\EFI\debian\grubx64.efi)

Basically on the same disk. I used "efibootmgr -b E -B" to delete the extra entry I had just made.

Next I just manually did

> dd if=/dev/sda1 of=/dev/sdb1
> efibootmgr -c -d /dev/sdb -p 1 -w -L 'debian backup' -l '\EFI\debian\grubx64.efi'

And now "efibootmgr -v" shows:

> Boot000E* debian backup HD(1,GPT,96aa190b-b6c0-4753-ab6f-171ccc37b745,0x800,0x79800)/File(\EFI\debian\grubx64.efi) > Boot000F* debian HD(1,GPT,3ec825d3-e2f7-4491-b4a5-321032b0ab8c,0x800,0x79800)/File(\EFI\debian\grubx64.efi)

I guess that will work, though I haven't rebooted yet. What I find weird is that grub in legacy mode will install to all hard drives in the system, or at least it would prompt you for what hard drives you wanted it to be installed to. Why can't grub with efi just automatically do that same?

Samuel Smith

Reply to: