When I boot into Linux, I get this:

Error: unknown command 'gfxmode'. Pressing any key continues

It takes about 5 secs to boot after that. Pretty slow compared to 11.10, I think. Anyway, my Ubuntu is 12.04 and it just updated today and changed the grub with grubcustomizer. Anyway, I don't want any gfx interface or resolution on the grub customizer, but it keeps giving that error even if it isn't marked in grub customizer.

I found some help here, in this question: Error: unknown command 'gfxmode'. Pressing any key continues

I found the line it mentions in the 00_header. But Set is found in front of the gfx there, so that isn't actually the problem.

This is my /etc/default/grub:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

  • Could you post your /etc/default/grub, please? – Jakob May 4 '12 at 7:18

Open /etc/grub.d/proxifiedScripts/linux :

gksu gedit /etc/grub.d/proxifiedScripts/linux

Next, search for gfxmode $linux_gfx_mode in that file.

Comment out the line, with a # like(just in-case you need it):

#gfxmode $linux_gfx_mode

That will fix the problem but if you want to fix gfxmode Edit the line so that it says:

set gfxmode=\$linux_gfx_mode

Save the file.

  • Note: there could be older script files in the same directory that also perpetuate the error. I made the above change, only to find grub was still balking on the "gfxmode" line. In the /etc/grub.d/proxifiedScripts dir I also found a file named "linux~1". Apparently, any script files in that dir get executed. In any case, when I edited the same line the same way in the "linux~1" file as well and updated grub, the problem went away. My guess is that "linux~1" is an older copy of the script and that I probably ought to have simply deleted it (or chmodded it non-executable).

Then you will need to update grub using the command:

 sudo update-grub
| improve this answer | |
  • 2
    could you throw some info on what is the script for? and what am I removing if I delete the line?? and later If I change again any entry with grub customizer if it will happen again.? Thanks. – kiraitachi May 4 '12 at 22:22
  • I have this: sharetext.org/DXZU what of the 2 lines of the gfx mode do I delete?? – kiraitachi May 5 '12 at 18:00
  • 1
    your post solved it, thanks ^^, but Im worried about what it does...cant find any useful info. – kiraitachi May 5 '12 at 20:28

I use boot-repair software to reinstall the GRUB.

Then the problem resolved.

You can see my comment on this bug.


| improve this answer | |

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.