Web lists-archives.com

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

Hash: SHA1

On Thu, Feb 23, 2017 at 07:53:45AM +0900, Mark Fletcher wrote:
> 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.

In the OP's context this doesn't make much sense. From the OP's mail

  dd if=/dev/sda of=/dev/sdb [other params elided]

That would copy boot sector, partition table and everything. If

 (a) the one (or the other) disk isn't broken
 (b) no one else is concurrently writing to the copied disk

everything should work. And from the thread up to now, I gather that
there's at least good evidence against (b).

There's nothing magical about the boot sector or partition table, it's
just data which happens to be located (typically, these days) "before"
the partitions proper. Unless...

I have some dim memories of some helpful firmware (was it disk? was it
BIOS? Didn't I say "dim"?) "protecting" the user of rogue software
writing to the boot sector. This was, AFAIR, the heyday of boot sector
viruses and hopefully long gone.

But hard/firmware vendors are known to do strange things: go check
your BIOS whether some funny RAID thingie is enabled.

- -- tomás
Version: GnuPG v1.4.12 (GNU/Linux)