Web lists-archives.com

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




Il 22/02/2017 17:40, Tixy ha scritto:
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?

Yes I did. But, even if I didn't, I fail to understand how that could break grub.

Ubuntu live CDs have a habit of mounting every partition it sees at
startup which will result in a corrupt disk copy.

Just to play it safe, I'm going to make the copy again using sysrescuecd.


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

Thanks for the hint, I'll do that too.