Possible Duplicate:
Error on boot: unknown command 'gfxmode'. Pressing any key continues

A few days ago, I installed Ubuntu 12.04. I changed the order of systems on the list of boot loader (I use Windows Vista and Ubuntu on one computer). I also changed, by the way, the appearance of the selection screen (resolution). All this with the Grub Customizer. After reboot and after the list of systems to choose was shown, I got a message: „Error: unknown command 'gfxmode'. Pressing any key continues ... ". Ubuntu starts even without pressing any key. The problem is repeated each time when I run Ubuntu. How to solve it?

marked as duplicate by Eliah Kagan, RobotHumans, jokerdino, RolandiXor, ish Aug 12 '12 at 21:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I solved the problem deleting the line:

"gfxmode $linux_gfx_mode"

in "/etc/grub.d/40_custom" file


The grub customizer forgot to put set before gfxmode. Go into /etc/grub.d and run the following command to find out which file has the gfxmode entry: grep gfxmode * Then use whatever text editor you like to just put set in front of it.

A little background on this is that gfxmode is a variable, so it has to be set with the set command, but the customizer tried to use it as a command.


I use boot-repair software to reinstall the GRUB.

Then problem resolved.

You can see my comment on this bug.


  • 2
    Please do not repeat the same answer on different posts. If one answer can solve two questions, then the latest question is a duplicate of the first. In such a case, flag the question as a duplicate and we will handle the rest. – RolandiXor Aug 12 '12 at 0:11
  • @Roland Taylor OK.I noticed. – Meteor Aug 27 '12 at 8:47

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