I cannot boot into GRUB. I see this:

Alloc magic is broken at XXXXXX Press any key

but when I do nothing happens. Holding shift doesn't do anything either.

The last time I could use my machine I changed stuff in /etc/grub.d, but I chrooted into the system, reverted everything and successfully ran update-grub.

What can I try?

If anyone wondering: Ubuntu 12.04.1, Installation media was (I guess) 11.10, it's an i5-first generation kernel, 4GB RAM, memtest was okay.

  • 1
    You should run memtest to verify, that faulty main memory isn't the root cause of this. Apr 6, 2015 at 19:26

7 Answers 7


A Boot-Repair Live USB can be used to repair Grub. You can download the ISO from the Ubuntu Wiki. Then, use Unetbootin to create a Live USB from the ISO file you downloaded. After you boot from the USB, the Boot Repair utility will pop up. Just click on the Recommended Repair button, and Boot-Repair will repair Grub for you.

  • 1
    I did that. Changed nothing. It did give come "advice", but nothing which should prevent GRUB from starting, and nothing which wouldn't be the same since the original installation.
    – mrs_sheep
    Sep 3, 2012 at 15:01

This is not a software issue, The alloc magic broken error is a result of bad memory chips.


I have solved this.

I used Rescatux and mainly SG2D to chainboot into my regular system. I then ran update-grub again and was wondering again why it would list everything twice, when it occurred to me to check the grub.cfg (just read, not write!).

I then found out that the supposedly "reverted" changes to the GRUB-config were still there preventing grub from starting.

(I had named the not-working ones .n for "new" assuming they would be ignored (like .bak))

SO: is it a valid bug to be posted, that reinstallation of GRUB does not clear the config dir?

  • AFAIK, reinstalling packages typically does not replace or clear their config files by default, by design, so it would be a feature request if you wanted it to be changed...
    – Zanna
    Aug 25, 2017 at 9:35

perhaps the iso file was made in a 32-bit computer, and the error comes from trying to boot it form a 64-bit one!!?

I had that issue! and I guess that was the cause!


I had the same problem, but with a different cause. I my case I had to do a boot repair of windows (download iso from MS; go into repair; go into terminal; bootrec /fixboot for details google.)

Hope this helps someone.


I started having the same issue when using the latest version of Rufus and iso of Ubuntu 16 (Paladin 7.08). I used the previous version of Rufus (3.8) and in worked for me. Although I had another error (with graphics), but that’s another story. Hope that helps someone.


This error can also happen when you have chosen the option to encrypt the entire disk when installing Ubuntu. If this is the case and you have secure boot enabled, there is no need to disable secure boot. Just go into BIOS and search for the option which allows you to setup a trusted file for EFI boot. One of these files will be shimx64. Choose that file and save and exit BIOS. Get into BIOS again, and you'll see the shim option in the boot priority menu. Move it to the topmost position. Save and exit BIOS. This time, it'll boot fine. The shim is a preloader that connects to grub.

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.