Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #178149

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

From Lucio Crusca <lucio@sulweb.org>
Newsgroups linux.debian.user
Subject Re: "Invalid arch-independent ELF magic" in grub after SSD migration
Date 2017-02-25 10:20 +0100
Message-ID <teGGd-5Fx-5@gated-at.bofh.it> (permalink)
References <tekFI-6GV-21@gated-at.bofh.it> <telBM-7lx-5@gated-at.bofh.it> <temeu-7NY-9@gated-at.bofh.it> <teqBr-2zF-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


tomas@tuxteam.de wrote:
> 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 also good evidence of (a), because cmp reported no errors 
(besides, I had also checked dmesg and smartctl of both drives).

> There's nothing magical about the boot sector [...]
> I have some dim memories of some helpful firmware [...]
> But hard/firmware vendors are known to do strange things: go check
> your BIOS whether some funny RAID thingie is enabled.

Not really much in the BIOS screens of Dell laptops. That does not 
exclude the BIOS is doing some "helpful magic" behind the scenes 
nevertheless.

deloptes wrote:

> Usually grub-install helps. I assume the problem is due to different disk
> architecture or precisely how the PC would access SDD - so might be
> hardware vendor related. Are you sure it points to the same piece of data
> or sector/block when giving control to grub loader? I vote for
> grub-install.
I lack the skills to understand how grub (or the BIOS firmware if grub 
hands the task to it) could access SSD any different than HDD, given 
that, as far as I know, the SATA protocol is just the same. However it 
is indisputably true that my knowledge does not reach far enough.

> In such a case I do boot from live usb stick, chroot and perform grub
> install.

Tried that too, to no avail.

Mark Fletcher wrote:
 > 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.

I ended up installing a clean Debian base system (same version as the 
one I was trying to migrate, Linux Kernel 4.9, Grub 2.02~beta3), just to 
make sure Debian had no compatibility issues with my SSD and that my SSD 
had no compatibility issues with my notebook. To my surprise, that 
worked like a charm. I can only infer there actually is some "magic" 
going on behind the scenes and that "magic" must be there in the debian 
installer.

Then I copied partition contents over with cp run in a live 
systemrescuecd, except /boot, /dev /proc and /sys. It more or less 
worked (some apt-fu needed to fix a few package state issues).
I'm now writing from the SSD-migrated Debian GNU/Linux system.

I hate to workaround problems without understanding them, this is a loss.

Thanks everyone for your support anyway.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

"Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-22 09:30 +0100
  Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-22 14:30 +0100
    Re: "Invalid arch-independent ELF magic" in grub after SSD migration Eero Volotinen <eero.volotinen@iki.fi> - 2017-02-22 15:50 +0100
      Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-22 16:40 +0100
        Re: "Invalid arch-independent ELF magic" in grub after SSD migration Mark Fletcher <mark27q1@gmail.com> - 2017-02-23 00:00 +0100
          Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-23 11:30 +0100
            Re: "Invalid arch-independent ELF magic" in grub after SSD migrationy Mark Fletcher <mark27q1@gmail.com> - 2017-02-23 12:20 +0100
  Re: "Invalid arch-independent ELF magic" in grub after SSD migration Tixy <tixy@yxit.co.uk> - 2017-02-22 17:50 +0100
    Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-22 19:00 +0100
      Re: "Invalid arch-independent ELF magic" in grub after SSD migration Tixy <tixy@yxit.co.uk> - 2017-02-22 21:20 +0100
        Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-22 21:50 +0100
          Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-23 00:30 +0100
  Re: "Invalid arch-independent ELF magic" in grub after SSD migration Richard Hector <richard@walnut.gen.nz> - 2017-02-23 11:10 +0100
  Re: "Invalid arch-independent ELF magic" in grub after SSD migration Stefan Monnier <monnier@iro.umontreal.ca> - 2017-02-23 15:10 +0100
  Re: "Invalid arch-independent ELF magic" in grub after SSD migration Jonathan Dowland <jmtd@debian.org> - 2017-02-23 15:30 +0100
    Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-23 16:10 +0100
      Re: "Invalid arch-independent ELF magic" in grub after SSD migration Stefan Monnier <monnier@iro.umontreal.ca> - 2017-02-23 16:50 +0100
        Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-24 10:50 +0100
          Re: "Invalid arch-independent ELF magic" in grub after SSD migration "Thomas Schmitt" <scdbackup@gmx.net> - 2017-02-24 11:50 +0100
            Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-24 12:30 +0100
              Re: "Invalid arch-independent ELF magic" in grub after SSD migration deloptes <deloptes@gmail.com> - 2017-02-24 17:10 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-25 10:20 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration Felix Miata <mrmazda@earthlink.net> - 2017-02-25 10:30 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-25 10:40 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration Lucio Crusca <lucio@sulweb.org> - 2017-02-25 11:30 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration <tomas@tuxteam.de> - 2017-02-25 10:40 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration "Thomas Schmitt" <scdbackup@gmx.net> - 2017-02-25 11:30 +0100
                Re: "Invalid arch-independent ELF magic" in grub after SSD migration deloptes <deloptes@gmail.com> - 2017-02-25 14:40 +0100
    Re: "Invalid arch-independent ELF magic" in grub after SSD migration Stefan Monnier <monnier@iro.umontreal.ca> - 2017-02-23 16:40 +0100

csiph-web