Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 10296  / 2 Years ago, fri, october 14, 2022, 6:14:18

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_DEFAULT="saved"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="true"
GRUB_TIMEOUT="10"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# 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 ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# 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'
#GRUB_GFXMODE="1024x768x24"

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

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

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

GRUB_SAVEDEFAULT="true"

More From » 11.10

 Answers
3

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

[#38767] Saturday, October 15, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oargrou

Total Points: 336
Total Questions: 105
Total Answers: 113

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
oargrou questions
Thu, May 13, 21, 16:38, 3 Years ago
Wed, Jul 21, 21, 01:38, 3 Years ago
Sat, May 15, 21, 17:39, 3 Years ago
Tue, May 24, 22, 14:58, 2 Years ago
Sat, Mar 19, 22, 05:22, 2 Years ago
;