Web lists-archives.com

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




On Wed, Feb 22, 2017 at 04:35:16PM +0100, Lucio Crusca wrote:
> Il 22/02/2017 15:39, Eero Volotinen ha scritto:
> >Try using clonezilla: http://clonezilla.org/
> 
> I can try, but I'd prefer understanding what I'm doing wrong, if possible.
> 
> 
I am not sure I can explain why this would be necessary (theoretically, 
it wouldn't) but you might want to try manually recreating the partition 
structure on the SSD and then using dd (or just cp actually) to copy 
each partition.

So say you have 3 partitions, re-create them on the target disk and then 
copy each of them from HDD to SDD.

Or, go one step further and create both partitions and filesystems on 
the SSD, mount HDD and SSD filesystems and then cp -a the contents from 
HDD filesystems to SSD.

Some months ago I migrated the two disks in my main Jessie machine from 
HDDs to SSDs, and I used the last option above. The consensus on this 
list at the time was that that was the best way to do it. It's certainly 
the most tolerant of subtle differences between source and target disk. 
It does require that grub be re-installed on the target disk, but with 
everything copied over the grub.cfg will be in place so the install is 
easy. 

There was some discussion on this list of how I went about it at the 
time, you can see that in the archives.

Hope that helps

Mark