Malformed file warning on boot

About 1/3 of the time that I boot my laptop, I get an error message that says

Error: Malformed file.
Press any key to continue...

I press a key, and then my computer boots up and I can't discern any negative effects.

It's kind of disconcerting, and does delay the boot process.

How do I resolve this error and ensure my system is stable?


It is a bug in Grub, see Launchpad bug #1311247 - error: malformed file, press any key to continue. The upstream bug report is at bug #42134: loadenv.c – check_blocklists – algorithm for block overlap check is wrong. There does not seem to be a reliable workaround - you will just have to wait for it to be fixed.


A lot of users have this problem, including myself.

Found a piece of text that solved the issue for me and hopefully others as well.

edit /etc/default/grub and add:

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
GRUB_SAVEDEFAULT=true

After saving the file update grub:

sudo update-grub

Re-start the computer and the issue might be gone :-)

Recently I found out that ACPI settings in the BIOS may also cause "malformed file" message during boot. My computer does not shut down completely and therefore I was messing around with the ACPI settings. It is interesting to see that this warning has multiple root causes