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

 

 

 

How do i copy over efi boot to multiple drives

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
User avatar
qbwdp
Posts: 4
Joined: 2024-02-17 05:04

How do i copy over efi boot to multiple drives

#1 Post by qbwdp »

I am building a raid 5.

On the drive i make two partitions. One is 4095 FAT partition for efi boot, which stays outside of raid 5 on all 4 drives.
Second is a raid partition which i later create lvm on.

All this confuses people, they think i am trying to put efi on a raid5 also. So for now lets just forget raid altogether.

All i want to know if how do i copy the efi boot to the rest of my drives sdb1,sdc1,sde1 which also have a efi boot partition. After the install the bootloader is only copied to sda. I want all the drives to be bootable just in case sda goes bad.

Do i use grub-install /dev/sdb or some tool, or dd the 4095 onto the other drives? Please let me know if anyone else has done this successfully.

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: How do i copy over efi boot to multiple drives

#2 Post by pbear »

What I do is copy the EFI partition with GParted. Have tested in the context of backup-and-reinstall. Where things might get dicey in your scenario is NVRAM. I'd expect it to be grumpy about four identical PARTUUIDs (be aware, that's what NVRAM uses, not regular UUIDs; compare efibootmgr -v with sudo blkid). Moreover, I'd expect any clone solution (including dd) to have the same issue.

Out of curiosity, if sda (for example) goes south, what are the boot loaders on the other drives trying to boot? Perhaps a rEFInd USB drive will suit your purpose.

mrmazda
Posts: 340
Joined: 2023-06-02 02:22
Has thanked: 9 times
Been thanked: 44 times

Re: How do i copy over efi boot to multiple drives

#3 Post by mrmazda »

UEFI BIOS are much smarter than legacy BIOS. They know how to read FAT filesystems and load files from them. No special copy method is required for backing up or copying. What you shouldn't want is cloned FAT filesystem UUIDs. Thus, a freshly formatted FAT 32 ESP should do just fine by simply copying the tree from the original. How much trouble they may be to boot from may depend on how smart your particular UEFI BIOS actually is. The better ones have setup UI that's understandable. Efibootmgr is your friend in managing where the UEFI BIOS should be looking for those boot files if BIOS setup is less competent than one hopes for.

Debian only puts a tiny number of smallish files on an ESP. A normal default installation alongside a Windows installation sharing the 100M ESP typically created for Windows shouldn't be expected to result in as much as 10% of space on ESP to be used by the two installations' required files.

User avatar
pbear
Posts: 329
Joined: 2023-08-27 15:05
Location: San Francisco
Has thanked: 1 time
Been thanked: 57 times

Re: How do i copy over efi boot to multiple drives

#4 Post by pbear »

Fair point. Moreover, copying at file level solves the duplicate UUID problem. That said, copying an EFI partition can make sense in the context of system backup, especially if dual booting with Windows, precisely because it preserves the UUID and PARTUUID (the latter being what's referenced in NVRAM). If one doesn't need to preserve UUIDs, it's probably easier to reinstall Grub and edit fstab.

Post Reply