Prologue
This guide works for Proxmox VE 5.4 and higher.
In this guide we will replace a failed boot disk, and reinstall the bootloader on it.
Warning: Running the wrong command here can definitely destroy your system. Make sure you have recent and external backups.
This guide uses [source] and [target] as placeholders for devices in /dev/disk/by-id/, as seen in the screenshots.
If you need to replace a disk that's not used for booting, you can skip the proxmox-boot-tool commands.
Also adjust the partitions in the commands; you can use lsblk -f /dev/disk/by-id/[target] on your target disk, to get an overview.