You are not logged in.

#1 2023-05-01 09:41:09

mat
Member
Registered: 2023-05-01
Posts: 2

Dual disks for booting, and dual ESP

Hi,

I am planning the installation of a server using two hard drives for the system, using a ZFS pool to do the mirroring, so, each drives would two partitions, first one would be the ESP, say, 1GB, and the rest would be in a partition for ZFS mirror pool.

Imagining that I have a mkinitcpio hook that would sync both disks ESP whenever there is an update, so that both always contain the same thing.

What I am wondering is, how do I get both ESP to work, say, I run this:

efibootmgr --bootnum 0002 --create --disk /dev/disk/by-id/id-for-disk-1 --part 1 --label "Arch"  ...

From my understanding, only the first disk would be bootable, and if it dies, the second disk would contain all the information but it would not be bootable.

So, do I need to create two entries with efibootmgr, or is there a "better" way that I have not thought of?

Offline

#2 2023-05-01 10:18:31

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Dual disks for booting, and dual ESP

You could place the relevant bootloader EFI loaders at /EFI/Boot/bootx64.efi on both EFI system partitions then delete all NVRAM entries and rely on the removable loader location instead. That way both disks should be bootable without needing any NVRAM entries at all.


Jin, Jîyan, Azadî

Offline

#3 2023-05-02 09:39:12

mat
Member
Registered: 2023-05-01
Posts: 2

Re: Dual disks for booting, and dual ESP

Head_on_a_Stick wrote:

You could place the relevant bootloader EFI loaders at /EFI/Boot/bootx64.efi on both EFI system partitions then delete all NVRAM entries and rely on the removable loader location instead. That way both disks should be bootable without needing any NVRAM entries at all.

Mmmmm, I see what you mean, but, I think I need the nvram entries, I need to pass zfs=zroot/ROOT/default and a couple other things as kernel parameters.

Offline

#4 2023-05-02 15:37:39

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Dual disks for booting, and dual ESP

Kernel parameters can still be passed to systemd-boot, GRUB, or even a unified kernel image. Just be sure to place the relevant EFI loader at the removable loader location. I think systemd-boot already does that automatically (which wrecks OpenBSD dual-boot systems); use the --removable option with the grub-install command to do the same thing. Or just copy grubx64.efi over manually.


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB