Web lists-archives.com

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

Felix Miata wrote:

Did you look for any significant differences between the working and non-working grub.cfgs? Does Grub see your SSD as an NVMe device and need to embed a different binary or load a different module for it?

I think you've caught it! Here is what seems to me the most interesting diff:

< set root='hd1,msdos5'
> set root='hd0,msdos1'

The difference in the partition number (msdos5 vs msdos1) is expected because, when I did the clean install, I did not carry over the Windows partitions. The difference in the drive identifier is more interesting instead. Why does grub identified the old HDD as hd1 but the SDD as hd0? I've never had more than one drive installed in the notebook (it's a sure bet, because it doesn't have room for two drives). Moreover, the old disk is a plain disk only, not a hybrid:


Anyway, that's likely the reason why grub couldn't find its files on the SSD. Misleading error message though.