3

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.

  • You may need to bless it - check out the man page. – njboot Jun 11 '17 at 12:56
  • @njboot Seems like bless is a Mac/BSD tool? But bless hinted me to this page: help.ubuntu.com/community/… Do I need to do something with efibootmgr? – Jonatan Kallus Jun 11 '17 at 13:52
  • Next time don't use dd like that; it will take forever and then some. Instead, use cat. Or if you must use dd ensure you're using a decent block size, such as dd bs=32M... – roaima Jun 11 '17 at 16:03
  • @roaima dd with default block size wasn't noticeably slower than Clonezilla, which I assume use decent defaults. – Jonatan Kallus Jun 11 '17 at 16:16
0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.