EFI boot fails after block copy to new device

cmonty14

Well-Known Member
Mar 4, 2014
343
5
58
Hello,

I had a severe issue with OS disk (using BTRFS) and must replace it.
This means I started block copy using dd from old disk to new SSD; I performed the following steps:
1. block copy with dd from old to new device
2. extend root partition
3. resize BTRFS of relevant partition

Then I started repairing with Live CD and chroot.
This means I run these commands in chroot mode:
1. grub-install --recheck --boot-directory=/boot /dev/sdbb
2. update-grub

This created file /boot/efi/EFI/debian/grubx64.efi.
However, comparing this ESP directory with other cluster nodes there are some files missing:
Code:
# ll /boot/efi/EFI/debian/
total 1573
-rwxr-xr-x 1 root root     128 Nov 16 14:16 grub.cfg
-rwxr-xr-x 1 root root  286720 Nov 16 10:21 grubx64.efi
-rwxr-xr-x 1 root root 1322936 Nov 16 14:13 shimx64.efi

Checking the content of file /boot/efi/EFI/debian/grub.cfg shows this:
Code:
# cat /boot/efi/EFI/debian/grub.cfg
search.fs_uuid 83bb6881-9787-4a7e-8e1a-44128c0d5aac root hd2,gpt2
set prefix=($root)'/@/boot/grub'
configfile $prefix/grub.cfg

So, my first question is:
Why is this file /boot/efi/EFI/debian/grub.cfg missing on my defect cluster node after running the 2 repair steps?

The next question is related to output of update-grub:
Code:
Adding boot menu entry for UEFI Firmware Settings ...
###### - Grub-btrfs: Snapshot detection started - ######
# Info: Separate boot partition not detected
Failure (dbus fatal exception).
Failure (dbus fatal exception).
Failure (dbus fatal exception).
# Found snapshot: 2022-10-31 06:59:17 | @snapshots/1258/snapshot
# Found snapshot: 2019-09-08 06:27:01 | @snapshots/104/snapshot
# Found snapshot: 2019-08-23 17:05:28 | @snapshots/52/snapshot
# Found 3 snapshot(s)
###### - Grub-btrfs: Snapshot detection ended   - ######
done

Please check attached screenshot for more details of this output.

Is this a faulty update-grub execution?

After rebooting the server I get this error and server fails to boot:
Boot Failed - debian: [...]

Please check attached screenshot for details.

THX
 

Attachments

  • 2022-11-17_09-13-38.png
    2022-11-17_09-13-38.png
    45.6 KB · Views: 14
  • 2022-11-17_09-12-05.png
    2022-11-17_09-12-05.png
    81.5 KB · Views: 15
  • 2022-11-17_08-47-35.png
    2022-11-17_08-47-35.png
    161.7 KB · Views: 14
Last edited:
I guess it could be due to old boot record in EFI vars pointing to your old disk. Sometimes grub-install unable to set up boot variables. I saw this twice recently on HP Proliant servers. In such instance I would recreate the record with efibootmgr. Also double check that uuids of the root partition are the same in grub.cfg and output of blkid.
 
I guess it could be due to old boot record in EFI vars pointing to your old disk. Sometimes grub-install unable to set up boot variables. I saw this twice recently on HP Proliant servers. In such instance I would recreate the record with efibootmgr. Also double check that uuids of the root partition are the same in grub.cfg and output of blkid.
I have attached a screenshot that documents UUIDs of affected server.
What I can see is that UUIDs are correct.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!