hetzneronline / installimage

Bash scripts to universally deploy various distributions
Other
517 stars 143 forks source link

UEFI installation doesn't create RAID1 for ESP partition #91

Closed nazar-pc closed 10 months ago

nazar-pc commented 10 months ago

I just did fresh UEFI installation and found that ESP partition was created with the same UUID twice, once on each device, instead of creating RAID1 like https://docs.hetzner.com/robot/dedicated-server/operating-systems/efi-system-partition/ recommends.

This is fixable manually, but would be great to have installimage do it automatically.

asciiprod commented 10 months ago

Using RAID1 as outlined in the article is a bit of a hack. It works, but the right way is to actually have separate ESPs on every device. Ubuntu, which you have probably selected, supports this and installimage will install it this way.

nazar-pc commented 10 months ago

Both will need to be updated if GRUB is updated, does it also install some hook that copies files properly from one ESP partition to another? Not sure how that would be done if UUID of both partitions was the same and /etc/fstab was mounting partition by UUID. The hack in the article ensures both have up to date config and it was quite an effort to adjust partition table and OS accordingly before the first boot.

asciiprod commented 10 months ago

No, there is no hack that needs to be installed. As mentioned Ubuntu supports multiple ESPs natively. This means when grub is updated it gets installed on all configured ESPs. They get the same id so that at least one of them is always mounted.

nazar-pc commented 10 months ago

Wow, that is a bit surprising and confusing at the same time, I didn't know about it. Thanks for explaining!

nazar-pc commented 10 months ago

But why does the article recommends RAID1 anyway then?

asciiprod commented 10 months ago

It's still a working solution and for everything but Ubuntu there are no other (easy) options for redundancy available.