6

I've created a virtual machine with Ubuntu (having TinyOS). The problem arises when I start the machine. I immediately get a black screen with written:

GRUB loading.
error: invalid arch independent ELF magic
grub rescue>

What kind of a problem is it, and more importantly how can I solve it? I tried it on my laptop which has Windows 7 64 bit, and so I also tried it on my Ubuntu partition and also with Ubuntu, once I launch the virtual machine I get the same error!

  • 1
    What architecture(s) do your host and guest have? This may simply be a case of 64-bit support not being enabled for virtual machines. – Joseph R. Mar 26 '13 at 20:22
  • im running virtual box on a window 7 64 bit, while the TinyOS ubuntu is 32 bit! – Hassan Samii Mar 27 '13 at 9:25
  • Then you may be looking at the opposite case. Check the processor settings of the virtual machine. Are you trying to install 32-bit TinyOS on a 64-bit VM? It doesn't seem that the installation should fail though... – Joseph R. Mar 27 '13 at 19:40
5

This happens when the GRUB core image (the boot loader's first stage) is built for a different CPU architecture than the modules that it tries to load from /boot/grub. (Here's the check you're running into, modulo slight typographical changes that have been made since then; it's called from here.) This suggests a serious error when installing the OS. It doesn't directly relate to 64-bit support in the VM or anything like that, although it's of course possible that that kind of thing might have confused the OS installer into doing the wrong thing somehow.

Since you asked this several years ago, it's possible that you've solved it by now, that you've given up, or that simply reinstalling with a newer version of Ubuntu will help. But if none of those things are true:

  • Ensure that the disk image was clean before you installed the virtual machine guest. This sort of thing might happen if you have bits of GRUB left over from a previous installation.
  • Make sure you aren't doing anything funny like trying to boot the guest using a boot loader that wasn't installed by the guest OS installation.
  • Make sure the process of installing the guest was as simple as possible. There usually isn't much reason to have something like a complicated partitioning setup in a VM guest, and that sort of thing just introduces ways that things can go wrong.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.