Announcement

Collapse
No announcement yet.

GRUB 2: A Guide for Users

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

    #31
    Re: GRUB 2: A Guide for Users

    Grub2 also supports other resolutions than the default 640x480.
    Utterly useless feature, of course, but pretty with a nice big splash image in the background. Now the seconds spent in the menu are full of eye-candy.

    Steps to make it happen:
    (All disclaimers apply when messing with grub2, make sure you have an alternative method to boot)

    1. press 'c' in grub to get to the grub command line.

    2. run 'vbeinfo' to get a list of supported resolutions on your hardware.

    3. edit /etc/default/grub and uncomment line:
    #GRUB_GFXMODE=640x480
    and change it to your chosen resolution.

    4. Create a background image in your resolution and save it as .tga (targa), save it to /boot/grub/

    5. Edit /etc/grub.d/05_debian_theme, line 16 to match
    for i in {/boot/grub,/usr/share/images/desktop-base}/nameofyourimage.{png,tga} ; do
    (6. Optional, change the text colors in 05_debian_theme on lines 39-40, I set mine as
    set color_normal=light-gray/black
    set color_highlight=white/dark-gray
    (black is transparent as a background))

    7. Run 'sudo update-grub'
    (the output should include 'Found Debian background: yourimage.tga')

    8. Next boot should have a prettier grub

    Comment


      #32
      Re: GRUB 2: A Guide for Users

      Thanks, kubicle, nice post

      In the Table of Contents, SECTION 4, I added a section:

      . . .
      . . .
      Boot menu: Adding or removing an OS entry
      Boot menu: Create a custom boot entry
      Boot menu: Making your own custom grub.cfg
      Boot menu: Changing resolution, text colors, setting background image

      And then in the text, in a brief paragraph, I put a reference to your Post #30 here.
      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

      Comment


        #33
        Re: GRUB 2: A Guide for Users

        Thank you very much for this howto! I did not find it yesterday when I was desperately searching for ways to get my system up again after a failed install of grub2.

        The installation of grub2 is still not as polished as it could be. In my opinion, the installation really needs to be foolproof and if the user forgot to make a choice, the installation should stop and ask for it.

        This is one of those situations where I think a well laid out graphical installer would be a good tool. One can never get too careful with an installation that has the potential of bricking your system.

        Actually, a nice interface that first showed you what you have now, then listed the options for grub2 and allowed you to make appropriate changes would be nice. Maybe combined with the partition manager?
        Regards,
        Oceanwatcher
        Blog: http://www.wisnaes.com/
        Pictures: http://www.oceanwatcher.com/
        Software tips (in Norwegian): http://www.datahverdag.com/

        Comment


          #34
          Re: GRUB 2: A Guide for Users

          I totally agree with your ideas about having a good GUI interface. It's really not very practical having the average user do these things--edit scripts, run update-grub to get os-prober, or use grub-install (you happen to be way above average! ) (I don't program anymore or I'd give it a shot writing a GUI.)

          More advanced users/administrators, and hobbyists may very well need some nuts and bolts to tweak things just right for special/advanced use, or for troubleshooting.
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #35
            Re: GRUB 2: A Guide for Users

            Yes, maybe the thing to do would be to im[rove kgrubconf, which is nice to have around but only useful if you know what to do. We need a higher level of abstraction, along the lines of what Oceanwater was saying. If only I stopped dreaming and started coding

            Comment


              #36
              Re: GRUB 2: Custom boot menu

              Customizing the boot menu

              Editorial (mine)

              I don't think we all should be editing the scripts that drive GRUB 2 configuration. Script writers, of course, excepted. Furthermore, if you re-install GRUB 2 (sudo grub-install /dev/sdX), any custom edits you made will be overwritten and you'll have to re-do or restore your edits (e.g., copy/paste from backups).

              I think the devs should eventually develop GRUB 2 to include easy-to-use facilities for making a reasonable set of custom edits to your boot menu. That could be done through /etc/default/grub. Or, perhaps, someone could come up with a Very Reliable (TM) GUI.

              End of editorial comments.



              Now, on to business ...

              As explained in the how-to, grub.cfg determines the boot menu you see on the screen, and it is generated by files in /etc/default/grub and the scripts in /etc/grub.d.

              The script 10_linux generates menuentries for kernels on the same partition as the current (default) OS (the partition where the grub.cfg is located that controls the boot menu). The script 30_os-prober controls the menuentries of OSs (Linux and Windows) located on other partitions.

              One way you can customize the boot menu is to simply disable the execution of the automatic scripts in /etc/grub.d, then build your own custom grub.cfg. The tools for doing that are straightforward and are covered by the how-to, or see: GRUB 2 Basics at http://ubuntuforums.org/showthread.php?t=1195275 .

              Another way to customize the boot menu is by editing the script files in /etc/grub.d. That is covered by a new how-to, also by drs305:

              Grub 2 Title Tweaks, by drs305
              http://ubuntuforums.org/showthread.php?t=1287602

              Highlights

              1 Quote: "This thread offers tweaks to the Grub 2 10_linux and 30_os-prober files in /etc/grub.d. The purpose is to change the way Titles are displayed on the Grub 2 menu."

              2 Quote: "To inhibit the display of recovery options on the primary partition, uncomment or add this line to /etc/default/grub: GRUB_DISABLE_LINUX_RECOVERY=true"

              3 Quote: To inhibit the display of memtest86+ entries from the main partition, make the /etc/grub.d/memtest86+ file non-executable by running this command:
              sudo chmod -x /etc/grub.d/20_memtest86+

              4 Quote: D. Removing MEMTEST+86 and Single User Entries (from other partitions)
              Grub 2 provides the ability to hide memtest86+ and recovery mode (single user) entries for the default partition (see below). I have not found a similar ability to inhibit the display of these entries found by 30_os-prober on other partitions. To tweak the files to hide memtest86+ and recovery modes for other partitions: [etcetera -- see the Tweaks how-to]

              5 Quote: E. Removing a Specific Kernel (from other partitions)* [found by 30_os-prober on other partitions, etcetera -- see the Tweaks how-to]

              An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

              Comment


                #37
                Re: GRUB 2: A Guide for Users

                I tried to add a background image and change resolution of grub and following the instructions in this thread it was really easy. A little image editing tip for those with widescreen monitors:

                I checked what resolutions my graphics card supported and was actually a little surprised to see that 1024x768 was the highest resolution. And as I have a widescreen monitor on my laptop running at 1280x800 images would look a bit weird unless you use this trick:

                Open the image you want to use and crop it to 1280x800. In Photoshop you can easily do this by setting a specific resolution for the crop tool. The ppi setting is not important, in fact you can set it to any number you want. It does not change anything (only for printing) :-)

                Then go to resize the image. In the dialogue box, you need to turn off the function that keep the image proportions correct. Often marked by a little chain between the with and the height numbers of pixels. Click on it to "break" it.

                The just type in 1024 and 768 in their respective boxes and resize it. You will now have an image that is slightly squeezed horizontally. But when your boot menu shows, it will be stretched across the whole monitor and look just like it should.
                Regards,
                Oceanwatcher
                Blog: http://www.wisnaes.com/
                Pictures: http://www.oceanwatcher.com/
                Software tips (in Norwegian): http://www.datahverdag.com/

                Comment


                  #38
                  Re: GRUB 2: A Guide for Users

                  Nice work Oceanwatcher

                  For now, as we get organized with the new GRUB 2, I added in Section 4:
                  Boot menu: Background image editing tip for those with widescreen monitors

                  and then in the text of Section 4, I cited & referenced your post.


                  Boot menu graphics seems to be a popular topic. Maybe someone should do a how-to on it for GRUB 2. We have one for GRUB Legacy, by dibl:
                  Grub Splash Image, how-to, dibl
                  http://kubuntuforums.net/forums/inde...opic=3088532.0

                  I'm not sure how to use that one in such a way that people clearly see the GRUB 2 application.

                  I'll leave this whole thing to your guys to do if anyone cares to!

                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #39
                    Re: GRUB 2: Dual Boot, 2 HDDs

                    Dual booting, 2 HDDs

                    Wow, it _did_ work.
                    But ...
                    Wow, I got the "GRUB Loading _" message for 60-90 seconds while my hard drive was active, until I got the grub.cfg boot menu on the screen!!! Long time.

                    -- D915GAVL Intel board
                    -- 2 HDDs
                    -- SATA sda: Windows XP and an unused GRUB partition
                    -- SATA sdb: 15 partitions, several OSs
                    -- First BIOS boot drive: sda
                    -- GRUB 2: Installed from 9.10 on sdb3 to the sda MBR (= the first BIOS boot drive)
                    -- grub.cfg (in sdb3): Perfect; all OSs present and accounted for (and several copies of Memtest!)

                    So, it works OK on my machine, but something is amiss with the long loading time for GRUB 2 boot.img --> core.img?

                    Just an fyi, is all. Not too big a deal right now, probably just a bit buggy at the GRUB 2 beta 3 stage. Anyone else notice this?


                    EDIT 10-16-09:
                    Bug #420933
                    https://bugs.launchpad.net/ubuntu/+s.../?loggingout=1
                    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                    Comment


                      #40
                      Re: GRUB 2: A Guide for Users

                      There is a delay for me on a USB drive, maybe around 15 seconds? It isn't while loading grub, but rather, from the time I select a kernel and the time it appears to be loading it. Although, this could be just that the kernel is loading but there is no feedback to the user.

                      But I thought, even if this is a real issue, it is an issue with USB media:
                      http://www.phoronix.com/forums/showp...24&postcount=6

                      (Kano is a Debian dev). This is scary. I googled for "slow grub-2" for my issue and I didn't find any obvious fix or workaround in general for this.

                      FWIW: I am not customizing grub2 at all.

                      Comment


                        #41
                        Re: GRUB 2: A Guide for Users

                        I've gota try the setting of Image for Grub. Since redoing my machines, I miss my grub background. I do have to make note about GRUB2. Initially it did not detect my WINXP on my second (and not primary) HD. After a recent kernel update, it did, and here is the kicker that I like, it actually handled WINXP "wanting to be the first HD/partition" crap. That was nice. I didn't even have to edit anything. The old GRUB had the "KGRUBEditor" tool, which was very nicely written. Hope someone can do that for GRUB2.

                        Comment


                          #42
                          Re: GRUB 2: A Guide for Users

                          @ lmilano, "There is a delay for me on a USB drive, maybe around 15 seconds? It isn't while loading grub, but rather, from the time I select a kernel and the time it appears to be loading it. Although, this could be just that the kernel is loading but there is no feedback to the user."

                          Yes, I have always gotten that delay using USB live flash drives, and it can vary from 5 s to 20 or 30 s, depending I guess on everything Personally, I would not worry too much about that sort of delay.
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment


                            #43
                            Re: GRUB 2: A Guide for Users

                            re the time delay I referred to in Reply #38:
                            Another GRUB 2 user (at another forum) just informed me that this is a known bug/issue and is being worked on. Apparently, occurs when there is more than one hard drive.
                            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                            Comment


                              #44
                              Re: GRUB 2: A Guide for Users

                              Originally posted by Qqmike

                              Yes, I have always gotten that delay using USB live flash drives, and it can vary from 5 s to 20 or 30 s, depending I guess on everything Personally, I would not worry too much about that sort of delay.
                              ah, even on grub legacy? Thanks! I will put that install on the ssd as soon as i have a little time. I am also confident it will be no issue (and in the worst case it's just a little delay that I am sure will be fixed on a later update)

                              Comment


                                #45
                                Re: GRUB 2: A Guide for Users

                                "ah, even on grub legacy?"

                                Yep. Sometimes it is so pronounced that in my how-to's I'll tell folks not to hit the reset button until giving things a change to pop & boot! At least, that's been my experience.
                                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                                Comment

                                Working...
                                X