Announcement

Collapse
No announcement yet.

How do Grub2 colors work?

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

    How do Grub2 colors work?

    I have understood how to use /usr/share/desktop-base/grub_background.sh to change the background image. But my background image is composed of light colors, so I need dark characters. I tried

    WALLPAPER=/usr/share/images/desktop-base/in06_0219_03541_sa640.png
    COLOR_NORMAL=black/light-gray
    COLOR_HIGHLIGHT=green/red

    What happened was, Grub displayed my wallpaper image, then overlaid it with a gray screen with black characters on them. What's with the overlay? What should I use to get the characters I want?

    More precisely, in

    COLOR_NORMAL=color1/color2

    what are color1 and color2 used for? Ditto for COLOR_HIGHLIGHT. Thanks in advance.
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    Re: How do Grub2 colors work?

    grub developers decided you didn't want colored text if you picked a background image.

    To fix this: Edit /etc/grub.d/05_debian_theme (you must be root) and look for these two lines;

    Code:
    echo "if background_image `make_system_path_relative_to_its_root "${1}"`; then"
    if [ -n "${2}" ]; then
    they should be lines 98-99. Add these two lines in between them;

    Code:
    echo " set color_normal=black/light-gray"
    echo " set color_highlight=green/red"
    and then run update-grub. That should put those colors when in when you have a background.

    Please Read Me

    Comment


      #3
      Re: How do Grub2 colors work?

      Oh, and in answer to your color question: foreground/background

      Please Read Me

      Comment


        #4
        Re: How do Grub2 colors work?

        Originally posted by oshunluvr
        grub developers decided you didn't want colored text if you picked a background image.
        Yes, this seems to be the case. In fact, /etc/grub/05_debian_theme says:

        "If we're using a user-defined background, use
        # the default colors since we've got no idea how the image looks like."

        This is backwards. If the user has defined the background image, he MUST know what it looks like and so grub2 SHOULD use the user's choice of colors.

        Also, I tried your suggestion, but I still got the default colors. Will look into this more later in the day. I suspect the added lines should come a bit farther on, but my kshell skills have become a bit rusty since I retired...

        Thanks for your input.
        'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

        Comment


          #5
          Re: How do Grub2 colors work?

          See Re: Grub2 Tweaks for Natty by Rog131 for what you are looking for.
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: How do Grub2 colors work?

            At the risk of derailing this thread, why must the Ubuntu gods seem to make it more and more difficult if I want to do something other than what they perceive is best? Grub/Plymouth is a perfect example. I have no need to stare at pretty little graphics during boot. I'm much happier when I see pure, wholesome text scroll up my screen. Sure, maybe it's too fast to comprehend every process, but goddammit I like that! With a bit of playing around inside /etc/default/grub it was possible to fulfill my desire. But no more. Now I see a few seconds of blank screen, a few seconds of blissful text, then a few more seconds of blank screen before KDM appears. Argh! Give me my boot-time geeky text, please!

            Comment


              #7
              Re: How do Grub2 colors work?

              Originally posted by steveriley
              Argh! Give me my boot-time geeky text, please!
              Editing /etc/default/grub and removing "quiet splash" from the default boot options...and running "sudo update-grub" works fine on my end (no plymouth splash, showing old-school boot messages instead).

              Comment


                #8
                Re: How do Grub2 colors work?

                Originally posted by kubicle
                Editing /etc/default/grub and removing "quiet splash" from the default boot options...and running "sudo update-grub" works fine on my end (no plymouth splash, showing old-school boot messages instead).
                Which is what I've done. And whereas in 10.04 that seemed enough -- beautiful "old-school" scrolling text during the entire boot process -- the same procedure now seems to reveal text during only the middle third of the boot process. Admittedly, that's a rough estimate of the timing, but still... I'm left wondering what, exactly my computer is trying to hide from me? hahahaha

                Comment


                  #9
                  Re: How do Grub2 colors work?

                  Originally posted by steveriley
                  Originally posted by kubicle
                  Editing /etc/default/grub and removing "quiet splash" from the default boot options...and running "sudo update-grub" works fine on my end (no plymouth splash, showing old-school boot messages instead).
                  Which is what I've done. And whereas in 10.04 that seemed enough -- beautiful "old-school" scrolling text during the entire boot process -- the same procedure now seems to reveal text during only the middle third of the boot process. Admittedly, that's a rough estimate of the timing, but still... I'm left wondering what, exactly my computer is trying to hide from me? hahahaha
                  Hmm...maybe plymouth grabs the display for a while, before "releasing" it to the console, are there boot messages actually missing? (or are they just shown a bit later?)...Have you edited the GFX mode settings in /etc/default/grub (switching modes mid-boot might also affect the messages)? And of course, the vt switch from vt1 to vt7 during boot may also affect the messages.

                  On my kubuntu laptop, I have disabled plymouth completely (a bit hackish way to do it) and it shows the boot messages from the start, but doesn't look like my desktop is missing any of the boot messages even though plymouth is still enabled on it (and it takes a while for the desktop to show the messages)

                  Comment


                    #10
                    Re: How do Grub2 colors work?

                    Originally posted by kubicle
                    Hmm...maybe plymouth grabs the display for a while, before "releasing" it to the console, are there boot messages actually missing? (or are they just shown a bit later?)...Have you edited the GFX mode settings in /etc/default/grub (switching modes mid-boot might also affect the messages)? And of course, the vt switch from vt1 to vt7 during boot may also affect the messages.
                    Here's my /etc/default/grub, abbreviated in places to avoid forum bloat:
                    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="acpi_osi=Linux acpi_backlight=vendor thinkpad-acpi.brightness_enable=1 pcie_aspm=force"
                    GRUB_CMDLINE_LINUX=""
                    
                    # 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=800x600x32
                    GRUB_GFXPAYLOAD_LINUX=keep
                    Originally posted by kubicle
                    On my kubuntu laptop, I have disabled plymouth completely (a bit hackish way to do it) and it shows the boot messages from the start, but doesn't look like my desktop is missing any of the boot messages even though plymouth is still enabled on it (and it takes a while for the desktop to show the messages)
                    I would love to learn (1) how you disabled Plymouth and (2) whether you think that might cause other side effects. Plymouth appears to have a number of (unnecessary) dependents that would essentially cause the uninstall of most of my OS if I try to remove it using Muon or apt-get. Is there another way to disable it?

                    Comment


                      #11
                      Re: How do Grub2 colors work?

                      Originally posted by steveriley
                      Here's my /etc/default/grub, abbreviated in places to avoid forum bloat:
                      Code:
                      GRUB_GFXPAYLOAD_LINUX=keep
                      I experimented a bit with the desktop, and setting:
                      GRUB_GFXPAYLOAD_LINUX=text
                      Shows boot messages from the start on it (although at a lower resolution until KMS kicks in and switches to a higher resolution, maybe putting the video driver in the initramfs would improve that)

                      I would love to learn (1) how you disabled Plymouth
                      I edited the plymouth upstart scripts in /etc/init/plymouth* (basically commenting out all the start/stop stanzas)
                      (2) whether you think that might cause other side effects.
                      It might (even though works fine on my laptop), so I can't really recommend it (unless you feel really adventurous)...you might leave your system unbootable so you should at least have an alternative boot method (like a livecd you can use to revert the changes).

                      Comment


                        #12
                        Re: How do Grub2 colors work?

                        Originally posted by kubicle
                        I experimented a bit with the desktop, and setting:
                        GRUB_GFXPAYLOAD_LINUX=text
                        Shows boot messages from the start on it (although at a lower resolution until KMS kicks in and switches to a higher resolution, maybe putting the video driver in the initramfs would improve that)
                        No real change. Choose the kernel from the menu, then four seconds of blank blue screen, two seconds of scrolling text, four more seconds of blank blue screen, and finally KDM. I know it's been a while now, so my memory may be somewhat inaccurate, but I seem to recall a time when I could get the boot process to spew its lovely status messages directly after hitting Enter on the kernel menu until the login manager appears. I griped about this back in January on the Ubuntu forum; a few folks tossed around some hackish ideas but nothing seems very straight-up.

                        I edited the plymouth upstart scripts in /etc/init/plymouth* (basically commenting out all the start/stop stanzas)...even though works fine on my laptop, I can't really recommend it (unless you feel really adventurous)...you might leave your system unbootable so you should at least have an alternative boot method (like a livecd you can use to revert the changes).
                        It's worth a shot, I don't mind playing around--it's how I learn best. But I'll wait until I'm not in the middle of a business trip

                        Comment


                          #13
                          Re: How do Grub2 colors work?

                          Bwahahaha, uncommenting the GRUB_TERMINAL=console line did it! Now I can see the lovely, ugly text. At 640x480 it reminds me of kindergarten writing, but at least I can see, if ever so briefly, what my computer is doing while it's doing what it's doing. It's these little victories that make life worth living, no?

                          Comment

                          Working...
                          X