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

Closed
opened 2023-10-26 22:38:25 +02:00 by nazar-pc · 7 comments
nazar-pc commented 2023-10-26 22:38:25 +02:00 (Migrated from github.com)

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.

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 2023-10-27 07:11:10 +02:00 (Migrated from github.com)

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.

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 2023-10-27 11:09:04 +02:00 (Migrated from github.com)

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.

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 2023-10-27 11:19:32 +02:00 (Migrated from github.com)

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.

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 2023-10-27 11:30:57 +02:00 (Migrated from github.com)

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

Wow, that is a bit surprising and confusing at the same time, I didn't know about it. Thanks for explaining!
nazar-pc commented 2023-10-27 11:31:15 +02:00 (Migrated from github.com)

But why does the article recommends RAID1 anyway then?

But why does the article recommends RAID1 anyway then?
asciiprod commented 2023-10-27 11:35:24 +02:00 (Migrated from github.com)

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

It's still a working solution and for everything but Ubuntu there are no other (easy) options for redundancy available.
tsipizic commented 2025-05-09 13:34:46 +02:00 (Migrated from github.com)

Thank you for the clarification on all these issues. In that case what is the recommended action when replacing broken hard drives? Is the command below sufficient, after preparing the new drive with the same partition table?

mkfs.fat -F16 -i $(blkid -o value -s UUID /dev/nvme0n1p1| sed 's/-//g') /dev/nvme1n1p1
dpkg-reconfigure grub-efi-amd64 (selecting both ESP)

Maybe the Exchanging hard disks in a Software-RAID article should be updated for UEFI systems.

Thank you for the clarification on all these issues. In that case what is the recommended action when replacing broken hard drives? Is the command below sufficient, after preparing the new drive with the same partition table? ``` mkfs.fat -F16 -i $(blkid -o value -s UUID /dev/nvme0n1p1| sed 's/-//g') /dev/nvme1n1p1 dpkg-reconfigure grub-efi-amd64 (selecting both ESP) ``` Maybe the [Exchanging hard disks in a Software-RAID](https://docs.hetzner.com/robot/dedicated-server/raid/exchanging-hard-disks-in-a-software-raid/) article should be updated for UEFI systems.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage#91
No description provided.