Grub2 and resolution in console mode.

Since I reinstalled my machine and I chose to put grub as a loader-2 (and even on machines where I installed as an upgrade), I always come the smoke in the ears due to the lack of information on how to set the resolution directly from the console on the same grub ...

The classic grub VGA = 791 in grub-2 is deprecated, and I must say that the wiki grub-2 is not maximum clarity ...

Yesterday, thanks to this post I finally resolved, it simplifies and reproduce it here as a historical memory, and to have a place to find it immediately when I'll need them again:

  • edit the file / etc / default / grub where there are default settings for grub and change the line:
  GRUB_GFXMODE = 640x480

This sets the screen resolution for the GRUB screen and only one (640 × 480 should be replaced with risuluzione you want, in my case I set to 1440 × 900 which is the native resolution of the display of my laptop).

  • edit the file / etc/grub.d/00_header and look for the line:
set gfxmode=${GRUB_GFXMODE} 

immediately after you add this line:

 set gfxpayload=keep 

this line of code instructs grub to pass the parameter that you chose for grub, even for the console.

You can set two different resolutions, one for grub and one for the console, simply by replacing the parameter "keep" the desired resolution for the console.

Of course after you make changes, you must regenerate the configuration file with a fine:

 update-grub2 

It is obvious that all these changes and commands must be done by root.

This entry was posted in Debian GNU / Linux , Linux and tagged , , . Bookmark the permalink .

2 Responses to Grub2 and resolution in console mode.

  1. Luke writes:

    I tried this solution on google so much since my dear grub2 in debian has gone and now I had adapted to the resolutions that I "suggested".

    Concordocon you that the grub wiki is not at all clear.

    Tonight I'll try to prove it.

    • gollum1 writes:

      Well, I hope you will be useful, and that everything works as it should. Grub2 on my father's I noticed that the configuration file is a bit 'different, but his is a stable ... we can just give a blind eye.

Leave a Reply

Email address will not be published. Required fields are marked *

*

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>