Full clone of encrypted disk not bootable on other computers

backupbootabledduefi

I have made a full disk clone of my encrypted S2 disk to an external USB disk with

dd if=/dev/nvme0n1 of=/dev/sdb status=progress

The S2 disk was not mounted when cloning, I used a live distribution on a USB stick.

When I reboot the computer boots from the USB drive. But when plugging the USB drive into other computers (I have tried 3) the drive is not bootable. I suspect the S2 disk is somehow used during the boot process?

How can I make the USB drive bootable?

I tried to make the first partition bootable with parted

parted set 1 boot on

but that did not help. Alos, fdisk complained about "GPT PMBR size mismatch", but that seems to have been fixed by running parted.

There are some other questions concerning disk cloning on Stack Exchange, but they don't seem to have the problem that the disk is not bootable at all.

EDIT: I have now tried cloning with Clonezilla, but get the same problem.

EDIT2: @njboot's comment make me suspect this problem is related to UEFI boot.

Best Answer

I made a little bit of progress on this, so here is a partial answer. I used this answer https://askubuntu.com/a/380564/210203.

In one of the partitions on the external drive, I copied EFI/debian/grubx64.efi to EFI/BOOT/bootx64.efi. I also had to activate (hybrid) UEFI boot on the computers where I tried to boot from the backup.

Both laptops now boot from the backup disk. They hanged at different places in the boot process though. I don't know if caused by missing drivers or perhaps getting access to the encrypted partition.

I may try later to physically remove the disk I am trying to backup and see if that computer boots from the backup.

Related Question