Web lists-archives.com

Re: "Invalid arch-independent ELF magic" in grub after SSD migration

On Wed, 2017-02-22 at 09:18 +0100, Lucio Crusca wrote:
> I booted a live Ubuntu from CD media, checked with fdisk that every
> partition is starting 4K aligned and used the following command to
> copy the disk contents:
> dd if=/dev/sda of=/dev/sdb status=progress bs=4K

Did you unmount all partitions on /dev/sda and /dev/sdb first?
Ubuntu live CDs have a habit of mounting every partition it sees at
startup which will result in a corrupt disk copy. 

The above method is how I clone disks, but I do verify the copy
immediately after with something like:

cmp -n <byte-size-output-by-dd-command> /dev/sba /dev/sdb