Announcement

Collapse
No announcement yet.

Setting background image in GRUB2

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

    Setting background image in GRUB2

    Hello all,
    Many things have changed on Kubuntu 16, specifically, I'm unable to set a background image on the GRUB2 screen.

    I emphasize, this is not GRUB, but GRUB2.
    My system:
    4.15.0-42-generic #45~16.04.1-Ubuntu SMP Mon Nov 19 13:02:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    All articles I've found online refer to editing /etc/default/grub, then running sudo update-grub in terminal.

    I know for a fact this does not always work, because my /etc/default/grub contains:
    Code:
    GRUB_DEFAULT=0
    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=" "
    Clearly, GRUB_TIMEOUT=10 but when I boot, there is no display at all of the GRUB2 screen, unless I hit the left Shift key.

    On the other hand, I edited /boot/grub/grub.cfg (I know it's supposed to be generated automatically) and set the following:

    Code:
    set_background_image "/home/ravital/Pictures/moraine-lake.png"
    set menu_color_normal=light-cyan/black
    set menu_color_highlight=black/light-cyan
    On boot, I hit left-Shift, I get the pretty rectangle and GRUB2 List of options in light-cyan on black, the highlighted option in black on light-cyan, but no image.

    The image came from the grub splash images package in the repos (installed with synaptic), originally in .TGA format, I used gimp to export it to .png without making any changes. So I know it conforms to the limitations on the images GRUB2 imposes.

    Any ideas?

    TIA !

    #2
    From the Ubuntu community keyboards:Grub2/Displays - https://help.ubuntu.com/community/Grub2/Displays

    An example with the CC:

    Editing the /etc/default/grub. Adding the GRUB_BACKGROUND setting:



    Editing the /etc/grub.d/05_debian_theme. Adding the
    Code:
        echo "    set color_highlight=color1/color2"
    echo "    set color_normal=color1/black"
    and disabling the
    Code:
    echo "  true"


    Updating the grub:
    Code:
    sudo update-grub


    ...the image was found... Testing...



    Seems to work.

    Clearly, GRUB_TIMEOUT=10 but when I boot, there is no display at all of the GRUB2 screen, unless I hit the left Shift key.
    How to get to the GRUB menu at boot-time? - https://askubuntu.com/questions/1604...u-at-boot-time

    By '200_success'

    By default, GRUB will show the menu if there is a second operating system installed. If only Ubuntu is installed, then GRUB will generally load Ubuntu without showing the menu. To reconfigure GRUB to always show a menu:

    Edit /etc/default/grub:

    Set GRUB_HIDDEN_TIMEOUT= (no value after the = sign).
    Set GRUB_TIMEOUT=n to show the menu for n seconds.

    Run update-grub to regenerate /boot/grub/grub.cfg based on the /etc/default/grub settings.
    Note !

    There are many kind of docs. Some of the docs are only/mainly for the specific distribution.
    Use your distribution docs.
    Last edited by Rog131; Dec 05, 2018, 04:38 AM.
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      I'll respond point by point here, though the result might not be very coherent.
      Originally posted by r_avital View Post
      All articles I've found online refer to editing /etc/default/grub, then running sudo update-grub in terminal.
      Did you find the grub 2 manual? Quoting from it,
      those who feel that it would be easier to write grub.cfg directly are encouraged to do so
      I certainly "feel" that way, and perhaps you might too. I hand edit my own grub.cfg, and IMO it's far simpler that way. I have to stop several update mechanisms trampling on my grub.cfg.

      ...
      GRUB_TIMEOUT=10
      ...
      Clearly, GRUB_TIMEOUT=10 but when I boot, there is no display at all of the GRUB2 screen, unless I hit the left Shift key.
      The generated grub.cfg is so bloated and complicated that tweaking it can be difficult. I've cut mine back to just what I understand, so it works properly.

      set_background_image "/home/ravital/Pictures/moraine-lake.png"
      That doesn't look good, grub is not unix or linux. It doesn't see files the way Kubuntu does, and a typical Kubuntu install has /home on another partition or subvolume and grub won't see it as "/home"; it'll be something like "(hd1,gpt3)/ravital/...".

      The simple way is to copy the image to where grub.cfg is. If a grub path does not have a device, the bit in parentheses, the path is from the current setting of $root, and $root is set to where grub is, at first. I have grub installed to a btrfs subvolume called @grub, and use
      Code:
      background_image -m stretch /@grub/boot/grub/green_arch.jpg
      set menu_color_normal=yellow/black
      set menu_color_highlight=black/light-gray
      Note that's a particular command, not a set command.

      If you envisage having running multiple installs, even with a separate drive for each install, I would suggest giving grub its own partition (or subvolume with btrfs) and manually maintaining grub.cfg there. Otherwise, they fight over control of the boot, and do the wrong thing often.

      If you just want a pretty and readable boot loader menu, keeping it simple and plain at first might help.
      Regards, John Little

      Comment


        #4
        ? ,,,all that's required to have a background image in the grub menu is to put a .tga image in /boot/grub > run > "sudo update-grub" > and the next time you boot the image will be their.

        UNLESS a grub theme is being used , then the theme sets the background .

        VINNY
        i7 4core HT 8MB L3 2.9GHz
        16GB RAM
        Nvidia GTX 860M 4GB RAM 1152 cuda cores

        Comment

        Working...
        X