rear / rear

Relax-and-Recover - Linux bare metal disaster recovery and system migration solution (cfr. mksysb, ignite)
http://relax-and-recover.org/
GNU General Public License v3.0
940 stars 255 forks source link

ERROR: Failed to create 'Relax-and-Recover' UEFI boot entry #3287

Closed LordSpectre closed 3 months ago

LordSpectre commented 3 months ago
abbbi commented 3 months ago

seems to fail during efibootmgr

++ efibootmgr
++ grep -q Relax-and-Recover
+++ grep -w /boot/efi /proc/mounts
+++ awk '{print $1}'
++ efi_disk_part=/dev/nvme0n1p2
+++ echo /dev/nvme0n1p2
+++ sed -e 's/[0-9]//g'
++ efi_disk=/dev/nvmenp
++ test /dev/nvmenp
+++ echo /dev/nvme0n1p2
+++ sed -e 's/[^0-9]//g'
++ efi_part=012
++ test 012
+++ efibootmgr
+++ grep BootOrder
+++ cut -d : -f2
++ efi_boot_order=' 0005,0000,0001,0002,0003,0004'
++ test 0005,0000,0001,0002,0003,0004
++ efibootmgr -c -d /dev/nvmenp -p 012 -L Relax-and-Recover -l '\EFI\BOOT\rear.efi'
Could not prepare Boot variable: No such file or directory
++ Error 'Failed to create '\''Relax-and-Recover'\'' UEFI boot entry'

during mkrescue rear attempts to create special boot entry for booting the recovery console. grub-mkstandalone which creates the rear.efi exits OK, i guess maybe the wrong nvme target is used in the call to efibootmgr:

efibootmgr -c -d /dev/nvmenp

that looks suspicious to me

Maybe related to: https://github.com/rear/rear/pull/3267

You could try without

https://github.com/rear/rear/commit/018913e04c34e314c0ad75db300eb26d8a798e0e

or use latest release version (2.6)

LordSpectre commented 3 months ago

Great find, thank you, this 018913e solved the issue and now rear (always 2.7) is able to create uefi boot entry without error

jsmeix commented 3 months ago

@abbbi thank you for your help!

jsmeix commented 3 months ago

@LordSpectre I assume you meant that with the changes in https://github.com/rear/rear/commit/018913e04c34e314c0ad75db300eb26d8a798e0e now rear is able to create uefi boot entry without error.

I ask because @abbbi had written 'without' in his https://github.com/rear/rear/issues/3287#issuecomment-2241171166

You could try without
https://github.com/rear/rear/commit/018913e04c34e314c0ad75db300eb26d8a798e0e
LordSpectre commented 3 months ago

I assume you meant that with the changes in 018913e now rear is able to create uefi boot entry without error.

Exactly, what I did is follow the instruction on 018913e. So, change the 940_grub2_rescue.sh as reported in the commit itself.