Move GRUB_GFXMODE to /etc/default/grub and remove hardcode from /etc/grub.d

Asked by Joshua R. Poulson on 2010-04-13

Significantly easier configuration of graphics modes can be effected by putting the following into /etc/default/grub

Example from my system, Dell Inspiron 8600:
# 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=1280x800
GRUB_VIDEO_BACKEND=nvidia

and changing /etc/default/grub.d/00_header to be the more generic:

case x${GRUB_TERMINAL_OUTPUT} in
 xgfxterm)
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`

    cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
  set gfxpayload=keep
  insmod gfxterm
  insmod ${GRUB_VIDEO_BACKEND}
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
EOF

...

The Login Screen Settings Administration tool hardcodes gfxmode settings into this file instead of this method. If people try to fiddle with the settings to get a more interesting console, they are often hosed.

In addition, some tool (again, I think it's the Login Screen Settings tool) is inserting "VGA=791" into /etc/default/grub and this setting has been deprecated!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Joshua R. Poulson
Solved:
2010-04-13
Last query:
2010-04-13
Last reply:
2010-04-13

This is a questions forum, not suggestions. You are posting in the wrong place. You want:

http://brainstorm.ubuntu.com

Thanks

Joshua R. Poulson (jrp) said : #2

Ok, this suggestion is now Brainstorm #24421.