Code: Select all
error: invalid arch-independent ELF magic.
I've looked online for this sort of error message, and it seems like there's something wrong with the boot.s file that defines the magic number and other information for grub to boot from, but this doesn't explain why it runs in a VM fine.
Thus, I'm guessing it's a hardware issue, especially since I'm using a modern x86_64 laptop, not an old x86 32 bit computer, though most things in osdev seem to be backwards compatible, so I don't think that should be an issue... (?)
This is my first OS so I've never had to mess about getting grub to work before, so I'd appreciate help with finding what's causing the error, especially since it's happening for me even on the meaty skeleton example.
I'm using i686-elf-gcc version 14.1.0, i686-elf-as version 2.42 and grub version 2.06, if that's significant. I don't believe any of those are outdated.