Announcement

Collapse
No announcement yet.

HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

    Sorry for all the shouting in the subject line - but I'm very pleased with myself.

    It seems I have found the magic bullet to getting grub-pc (aka grub2) to work WITH graphic screen, 1280x1024, working hi-res 1280x1024 color tty consoles!

    Background: I've been futzing with grub-pc since karmic trying to get a nice background and font at my screen's resolution with working console modes also. I've read lots of posts, seen lots of various ways - including using a different screen driver just to load plymouth - and everything has worked in one area but not another. Besides that - I hate 640x480 consoles. Why have this large expensive (well, it was back when I bought it!) cool lcd and run it at 640x480?

    I felt grub-pc should be able to do what I wanted - I was right!

    Notes: I am using grub-pc version 1.98-1ubuntu6 installed from Lucid. I use a dedicated grub partition (have for years) and I have seven bootable installs on my system some of which are on RAID partitions. I obviously have a more complicated than average setup and I make NO GUARANTEES that any of the below will work on anyone else's system. Attempt this at YOUR OWN RISK and have a boot-able CD handy. I have only tested this booting to Lucid but will report back on Karmic, Arch, openSUSE, Sabayon, and PCLinuxOS.

    The edits:Since I use a dedicated partition and since update-grub doesn't really work as well as it should , I build my own grub.cfg. This is not the intended way to do it and I hope that someday - update-grub will work properly.

    Here's the nitty-gritty:

    The required lines and variables in grub.cfg:

    These are in my header section:
    if loadfont (hd0,2)/boot/grub/themes/fonts/10x20.pf2 ; then
    set gfxmode=1280x1024x24
    set gfxpayload=1280x1024
    insmod gfxterm
    insmod vbe


    Note that the font directory is different from what yours will need to be. The four lines after are the keys.

    These are in my theme section:
    insmod png
    if background_image /boot/grub/backgrounds/background.png ; then
    set color_normal=green/black
    set color_highlight=magenta/black
    else
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    fi


    In this instance, the backgrounds location is one I created to hold my background files. I use and generic "backgroung.png" and link it to whatever file I want to display. Currently, I use a lovely photograph of my wife sunbathing al-natural so there is NOT a screen shot included with this post!

    With the above edits, I got a nice 1280x1024 screen image, "sexy" background, and a larger and nice looking font. But the console mode eluded me. My TTY's were working, but little teeny colored scratches crammed into the top one inch of the screen replaced the readable text. I could actually log in and do things, but it was totally blind.

    Finally I discovered this on the ubuntu forums:
    This is amended to the end of the "linux" line of each menu entry
    gfxpayload=true

    and lo and behold, the console TTY's are now a lovely 1280x1024 with colored prompts. Accidentally - the plymouth splash looks better too.

    Next step will be to figure out how to put a background image in the consoles!

    As far as your system:


    Add gfxpayload=true to /etc/defaults/grub in this line:

    GRUB_CMDLINE_LINUX="gfxpayload=true"

    and that will add it to each linux kernel update-grub finds. You may have to do the other edits manually or figure out where in the 00_header and 05_debian_theme files the edits need to go.


    Please Read Me

    #2
    Re: grub-pc working GRAPHICAL, working HI-RES TTY, and PLYMOUTH SPLASH!!!

    Ok, here's the "correct" way do do this. This works on my Lucid install with grub-pc version 1.98. Verify your grub-pc version first.

    NO GUARANTEES: Keep backup copies of all files you edit AND /boot/grub/grub.cfg so you can get booting again if something gets messed up. I warned you!

    What we're doing:
    • We're adding a variable named GRUB_KEEPMODE and telling grub to use it for your boot and TTY's. In this example, I will use 1280x1024 and 1280x1024x24. You should substitute your correct mode.
    • We're creating a directory for our own background files and putting in a background image at our new resolution.
    • We're changing the default font to a larger one to make it more readable. I used 10x20.pf2. Look in /boot/grub/themes/fonts for other choices.


    Directory Creation
    Open a terminal and type: sudo mkdir /boot/grub/themes/backgrounds
    Copy a file of the correct size for your background (same resolution as you've selected for GFXMODE) to
    /boot/grub/themes/backgrounds/background.XXX
    NOTE* replace the XXX with your file type. You can use png, jpg, or tga.

    File Edits
    File: /etc/default/grub
    line: GRUB_CMDLINE_LINUX=""
    change to: GRUB_CMDLINE_LINUX="gfxpayload=true"

    line: #GRUB_GFXMODE=640x480
    change to: GRUB_GFXMODE=1280x1024x24

    File: /etc/grub.d/00_header
    line: if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
    add new line below: GRUB_KEEPMODE=1280x1024
    add new line below: GRUB_FONT_PATH=/boot/grub/themes/fonts/10x20.pf2

    line: set gfxmode=${GRUB_GFXMODE}
    add new line below: set gfxpayload=${GRUB_KEEPMODE}

    File: /etc/grub.d/05_debian_theme
    line: WALLPAPER="/usr/share/images/desktop-base/moreblue-orbit-grub.png"
    change to: WALLPAPER="/boot/grub/themes/backgrounds/background.png"

    Optional:
    File: /etc/grub.d/05_debian_theme
    line: COLOR_NORMAL="black/black"
    line: COLOR_HIGHLIGHT="magenta/black"

    change to your color choices from this list
    Foreground and Background: black, blue, green, cyan, red, magenta, brown, light-gray
    Only Foreground: dark-gray, light-blue, light-green, light-cyan, light-red, light-magenta, yellow, white

    I suggest you create /boot/grub/themes/backgrounds/background.png as a symlink to a file. Then if you want to change your background, you need only change the symlink rather than editing and doing update-grub all over again.

    Good luck and enjoy!

    EDIT: Themes and fonts are here http://code.google.com/p/burg/downloads/list

    Please Read Me

    Comment


      #3
      Re: HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

      In my case this line throws an error...

      line: #GRUB_GFXMODE=640x480
      change to: GRUB_GFXMODE=1280x1024x24

      ...because of the x24 addition. I don't see any grub or Plymouth splash screen. If I remove it, then I'm able to see both of them being displayed on screen as expected... except for the P-splash image that is displayed at a lower resolution, 640x480. I also noticed that the grub screen refresh rate isn't the one I use while working on LL. I hope there's a way to modify some script to correct this.
      Multibooting: Kubuntu Noble 24.04
      Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
      Win XP, 7 & 10 sadly
      Using Linux since June, 2008

      Comment


        #4
        Re: HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

        Did you verify your grub version? Are you able to get to your TTY's (ALT-F1)? If yes, are they 640x480 or higher? Also - you did the GRUB_CMDLINE_LINUX="gfxpayload=true" right?

        You can find available modes for your video card with

        sudo hwinfo --framebuffer

        don't try one that your monitor won't support.

        Attach you grub.cfg file and I'll have a look-see and fix my instructions if need be.

        Please Read Me

        Comment


          #5
          Re: HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

          Just tested that entry again on a different install - worked here.

          I did notice on my virtualbox lucid install the above instructions work except for the TTY's still default to 640x480.

          Could be a video card issue. I'm still researching it.

          Please Read Me

          Comment


            #6
            Re: HOWTO: grub-pc GRAPHICAL, HI-RES TTY, and PLYMOUTH SPLASH!!!

            Well, that mode is supported as you can see below.

            Code:
            Mode 0x0301: 640x480 (+640), 8 bits
             Mode 0x0311: 640x480 (+1280), 16 bits
             Mode 0x0312: 640x480 (+2560), 24 bits
             Mode 0x0303: 800x600 (+800), 8 bits
             Mode 0x0314: 800x600 (+1600), 16 bits
             Mode 0x0315: 800x600 (+3200), 24 bits
             Mode 0x0305: 1024x768 (+1024), 8 bits
             Mode 0x0317: 1024x768 (+2048), 16 bits
             Mode 0x0318: 1024x768 (+4096), 24 bits
             Mode 0x0307: 1280x1024 (+1280), 8 bits
             Mode 0x031a: 1280x1024 (+2560), 16 bits
             Mode 0x031b: 1280x1024 (+5120), 24 bits
             Mode 0x0320: 1600x1200 (+1600), 8 bits
             Mode 0x0322: 1600x1200 (+3200), 16 bits
             Mode 0x0324: 1600x1200 (+6400), 24 bits
             Config Status: cfg=new, avail=yes, need=no, active=unknown
            Multibooting: Kubuntu Noble 24.04
            Before: Jammy 22.04, Focal 20.04, Precise 12.04 Xenial 16.04 and Bionic 18.04
            Win XP, 7 & 10 sadly
            Using Linux since June, 2008

            Comment

            Working...
            X