Announcement

Collapse
No announcement yet.

Grub Splash Image -- How To Link

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

    Grub Splash Image -- How To Link

    Here's the authoritative source of information on the subject:

    http://ruslug.rutgers.edu/~mcgrof/grub-images/

    and a little example of what you can do with a photo is attached -- this .gif graphic (in its .png form) meets the file specs to be converted to xpm.gz format and displayed as the boot menu background.


    ALSO, Herman has a lot of great info on the subject (thanks, Qqmike!):

    http://users.bigpond.net.au/hermanzone/p15.htm#splash

    8)
    Attached Files

    #2
    Re: Grub Splash Image -- How To Link

    Hey dible, nice one.
    I got that working as well.
    What i would really like is GfxBoot to work.
    It hasn't worked since feisty. :P Wonder why and or how to get it back.

    Tried this to no avail:
    http://ubuntuforums.org/showthread.php?t=208855

    Any ideas?
    HP Pavilion dv6 core i7 (Main)
    4 GB Ram
    Kubuntu 18.10

    Comment


      #3
      Re: Grub Splash Image -- How To Link

      On a hunch, I checked Adept, and gfxboot is in mine (64-bit) -- do you have it? I see several themes, but not KDE. Give it a go, and tell us what happens!

      Comment


        #4
        Re: Grub Splash Image -- How To Link

        Give it a go, and tell us what happens!
        Yeah, right. I am the mad scientist that tests the eternal life serum on himself and turns into mr. hyde

        But for the good of all I'll do it

        Edit:
        Okay this is what I did and what I got:
        Code:
        sudo apt-get remove grub
        Installed gfxboot and the zen theme with synaptic.

        Copied the gfxboot-theme-zen file to /boot/grub and added this line to the menu-lst:
        gfxmenu /boot/grub/gfxboot-theme-zen
        doing
        Code:
        sudo grub
        gives: command not found

        a reboot gives me the default black/white boot screen.

        Update!
        Installing gfxboot will NOT work. You have to install grub-gfxboot:http://quasarfreak.googlepages.com/g....97-5_i386.deb

        Since the gfxboot-themes offered by synaptic don't work either (they are not in the CPIO format), I downloaded this gfxboot message:
        http://ubuntuforums.org/showpost.php...0&postcount=54
        unpacked it and copied the CPIO file to /boot/grub and added this line to the menu.lst:
        gfxmenu /boot/grub/message.kubuntu
        Then do:
        Code:
         sudo grub-install hd0
        hd0 should be changed depending on your system!!

        Pretty neat and slick.

        Now all I have to do is figure out how to convert a edited gfxboot message back into CPIO format.

        Update2

        Okay to edit I did this:
        I made a new directory /Home/Eycandy/Kubuntugrub (or whatever)
        I then went into the directory where my CPIO was located opened a terminal here and did:
        Code:
        cpio -i < /home/Eyecandy/Kubuntugrub
        this will unpack the contents of the cpio file and put it in ........../Kubuntugrub

        now you can play with the backround and other stuff but watch out what you delete because the are some placeholders that really need to be there.

        When you are finished you can now open a terminal and do:
        Code:
        sudo ls . |cpio -o > /boot/grub/message.kubuntu
        (replace with your own name)

        if that doesn't work you will have to open up /home.../Kubuntugrub (or whatever) in kdesuso konqueror and do it from there.
        HP Pavilion dv6 core i7 (Main)
        4 GB Ram
        Kubuntu 18.10

        Comment


          #5
          Re: Grub Splash Image -- How To Link

          Yep, dibl, that's the original source alright: http://ruslug.rutgers.edu/~mcgrof/grub-images/

          Very interesting site--nice insight into how the Linux community works; good historical background; nice presentation of what's required.

          bigpond cites this site, too, @
          http://users.bigpond.net.au/hermanzone/p15.htm#splash
          As Herman @ bigpond points out, some of the stuff at the original rutgers site was written with Red Hat in mind. So herman does it using Ubuntu & GIMP. He also gives other neat forum references and explains some nuances, details, and why's. Other how-to's I saw are basically consistent with the original rutgers source.

          I'd like to add my experience and notes for Kubuntu users here, in case someone runs into some of the issues I encountered while doing this. Including some things other how-to's are incorrect on or are not clear about.

          ----- Three things you need to install a GRUB boot splash image:

          (1) You need to have the proper image file:
          -- an image file should be in .xpm file extension (format);
          -- the image should be 640x480 pixels (640 width, from left to right; 480 height, from top to bottom);
          -- the image should be no more than 14 colors (i.e., maximum);
          (2) Put this image file in the /boot/grub directory where the menu.lst is that controls the boot menu when you boot your PC (but see below for other places);
          (3) Edit your ("main") menu.lst to include a line that commands GRUB to load the splash image:
          splashimage=(hdx,y)/boot/grub/name_of_your_image

          That's all.

          ----- Notes about these 3 things:

          (1) You need to have the proper image file.

          If you already have an image file in another format, e.g., .jpg, you can use an image editor like GIMP to convert it to .xpm, and to scale it to 640x480, and to change it to 14 colors maximum.
          Optional: After doing this, and having the converted image, you can compress the converted image file to gzip format (.gz) easily by right-clicking on the file, Compress As, and choose the basic .gz extension. You do not need to do this, but it might make the loading go faster--you can experiment.

          GIMP: if you don't have it, you can get it using Adept Manager:
          K-menu > System > Adept Manager; Type gimp in the Search window; Click the > symbol to the left of gimp; Click Request Install; At the top, click Apply Changes
          Or:
          K-Menu > Add/remove programs, Click on Graphics; locate GIMP image editor; click to put an X in the box; then click Apply Changes at the bottom
          Nice thing is that after doing this, you can find it at:
          K-menu > Graphics > GIMP Image Editor.

          USING GIMP to get the proper image file.

          Let's say your file is named myimage.jpg, and it is on your Desktop. In case you mess up, make a copy of this original: Right-click on it, Copy to, Home, Desktop, here, and give it a modified name, say 2myimage.jpg. Then right-click on 2myimage.jpg, Open with ... GIMP.
          Then in the GIMP pane where the image is shown, do the following:
          To scale it to 640x480: At the top, Image > Scale Image, and change the width to 640 and the height to 480 pixels. then click Scale.
          To specify 14 colors maximum: Image > Mode > Indexed; maximum number of colors: change to 14; dithering: None.
          To convert to .xpm and save as such: In GIMP, where the image is shown, File > Save As, Select File Type by extension, select xpm (XBitMap image), make sure it shows Desktop (where to save it), click Save, and you will find 2myimage.xpm on your Desktop. If you wish, compress it to gzip (.gz) format as explained above, and if you do that, you'll have a file on your Desktop named 2myimage.xpm.gz, and that's the file you will use.

          (2) Put this image file in the /boot/grub directory where the menu.lst is that controls the boot menu when you boot your PC; and
          (3) Edit your ("main") menu.lst to include a line that commands GRUB to load the splash image.

          >>> Seems to be some confusion about this in some of the How-to's, and the original site also makes a claim that may no longer be the case (and is not the case for Kubuntu, GRUB 0.97, with my Intel BIOS dated 2005).

          (2) Put this image file in the /boot/grub directory where the menu.lst is that controls the boot menu when you boot your PC;

          *** NOTE: Where *can* you put the image file?
          You can put the image file anywhere (I think).
          (To test this, my "main" /boot/grub/menu.lst is in sdb1 = (hd1,0). I put the image to use for the splash image in another drive & partition, at sda2 = (hd0,1). And it worked fine.)

          But let's keep this simple here and put it in the /boot/grub folder. If you are going to collect several of these images, you may wish to create a special subdirectory for them (under /boot/grub, and you must do so as root).
          *** The /boot/grub folder I'm referring to is your "main" one, the one that controls the boot menu you see when you boot your PC. For most people this is the same place you installed Kubuntu to, the same partition on your PC.
          *** If you use a separate dedicated GRUB partition (or, for advanced users, a true separate /boot partition) to boot your various operating systems, as I do, then the /boot/grub directory will be in that partition.
          *** To find out how GRUB names the partition where /boot/grub/menu.lst is, open Konsole, type sudo grub, at the grub prompt grub>, type find /boot/grub/menu.lst; the (hdx,y) that is returned is what you want; if there is more than one, select the one corresponding to the location of your "main" partition that you set up to control the boot menu.
          NOTE: GRUB names hard drives and partitions starting from zero. So, the first hard drive is hd0, and the first partition is partition 0.

          (3) Edit your ("main") menu.lst to include a line that commands GRUB to load the splash image.
          As root, edit your ("main") menu.lst to include this line:
          splashimage=(hdx,y)/boot/grub/ 2myimage.xpm

          where (hdx,y) is GRUB notation for the location of the "main" menu.lst we are talking about here--it's the (hdx,y) that comes from the statement grub> find/boot/grub/menu.lst (see the discussion above). If you use a separate partition for GRUB (or, more advanced, for /boot), then that is the (hdx,y) you need in the splashimage statement. (Example, if your "main" /boot/grub/menu.lst is on the second hard drive, the third partition, then you need (hd1,2); if your menu.lst is on the first hard drive, the first partition, it is (hd0,0); if your menu.lst is on the first hard drive, the second partition, then you need (hd0,1).)

          *** Where to place the splashimage command line? Seems to be some confusion about this, too.
          There may be many places in /boot/grub/menu.lst where you can put that line. Why not simply put it at the very beginning of menu.lst, after the introductory comments?
          # A bunch of introductory comments
          # da-da-da & etcetera

          splashimage=(hdx,y)/boot/grub/ 2myimage.xpm[.gz]
          timeout 10
          default 0

          # etc, etc.


          ----- Getting the work done: CLI or GUI
          Referring back to the 3 things you have to do to make this work, you have to copy 2myimage.xpm (or, 2myimage.xpm.gz) into the directory /boot/grub, and you must edit /boot/grub/menu.lst (in the correct partition, as explained above). Both these tasks must be done as root (i.e., with root privileges).

          -- CLI: Notes about using the command line interface (CLI)--Konsole--in Kubuntu
          To open menu.lst, as root, in the text editor Kate, (so you can include the splashimage line), you can use
          kdesu kate /boot/grub/menu.lst
          or
          kdesudo kate /boot/grub/menu.lst
          When you copy the image into /boot/grub/menu.lst, you must do so as root, and so use sudo cp.
          -- GUI: Notes about using the graphical user interface (GUI)--Konqueror--in Kubuntu
          You can edit /boot/grub/menu.lst and copy the image into /boot/grub, as root, if you open Konqueror as root, and then navigate to /boot/grub. To open Konqueror with root privileges, issue the following command at Konsole:
          kdesu konqueror
          or
          kdesudo konqueror
          After you open Konqueror as root, you can copy your image file into /boot/grub by copy/paste, or drag-and-drop. And open /boot/grub/menu.lst, do your edits (adding the splashimage line), then File > Save, and File > Quit.
          *** When the command kdesu or kdesudo doesn't go:
          If it hangs up and doesn't open Konqueror, try again (close Konsole, then re-open it, and try again). If it hangs again, close out all open windows, save your work, restart X (Control+Alt+Backspace), and try again. If all else fails, close out, save your work, and restart the PC, and try again.


          ----- Troubleshooting: "Failed to read splash image (hdx,y)/boot/grub/etc-etc...Press any key to continue"
          If you get this error upon re-booting when you test your splash image, check these tips:

          -- Check the device reference (hdx,y) to be sure it is correct in the line
          splashimage=(hdx,y)/boot/grub/name_of_your_image_file
          -- Did you spell the file name correctly in that line? Example: 2-myimage.xpm.gz is with one dash after the "2", so if you type 2--myimage.xpm.gz, GRUB will not be able to open it.
          -- Check all spelling and syntax and punctuation in the splashimage line.
          -- Make sure your image file is actually in /boot/grub (or wherever it should be).
          -- In our example, it should read /boot/grub, not /grub; check your situation this way.
          -- Make sure your image file satisfies the conditions: .xpm (or .xpm.gz), 14 colors, and 640x480.
          (Example: I tried 480x640 and it failed; it failed, in fact, for 4 hours of failed testing; shame on me.)


          For general GRUB troubleshooting and error analysis, see either Herman's bigpond reference (above) or
          How To GRUB Methods - Toolkit
          http://kubuntuforums.net/forums/inde...opic=3081671.0
          Scroll down to Reply #23: GRUB Errors -- common errors and what causes them and how to fix them
          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

          Comment


            #6
            Re: Grub Splash Image -- How To Link

            Good info -- thanks Qqmike!

            Note: I have had some success getting images to load that are 16-color. Try it!

            Comment


              #7
              Re: Grub Splash Image -- How To Link

              Startup-manager is also a nice little tool It is in the repos.
              HP Pavilion dv6 core i7 (Main)
              4 GB Ram
              Kubuntu 18.10

              Comment


                #8
                Re: Grub Splash Image -- How To Link

                Preview with Tab-completion - - -

                I forgot to mention that I tested the "preview" feature. Of course, it worked fine

                You can put a bunch of splash images in your directory (e.g., in /boot/grub or in /boot/grug/splashes), boot up, when you see your boot menu, press the "c" key to get a GRUB prompt, grub>, and start testing your splashes:

                grub> splashimage /boot/grub/splash-1
                (and press Enter)
                Then press ESC (or "c" again), and try another:
                grub> splashimage /boot/grub/splash-2

                No need to re-boot.
                No need to remember or to know how to spell:
                Neat thing is that Tab-completion works, so you don't have to memorize or write down the names of your splashimage files.

                Just type
                grub> splashimage /boot/grub<Press Tab key now>
                and GRUB shows you all the files in that directory. If some have complicated, long names, like 21-MyFavSplashii-211-CA, us Tab-completion again:

                grub> splashimage /boot/grub/My<Press Tab key now>

                and GRUB will complete that line for you:

                grub> splashimage /boot/grub/21-MyFavSplashii-211-CA

                (and all you do is press Enter to accept it).


                ----------

                Fintan, I've heard about start-up manager, but haven't looked into it.
                Can't recall now what it does.
                An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                Comment


                  #9
                  Re: Grub Splash Image -- How To Link

                  Can you chain splash images in sequence?

                  EDIT!!! Sorry, I made a mistake in my original experiment and in my original post here. To make this as helpful as possible for people, I have rewritten this post so it reads correctly for some one else trying this. See my post below (Reply #11 for my confession and comments ).

                  Based on an experiment I did, the answer is Yes you can.

                  Specifically, here's the test:

                  sda: Windows drive – first BIOS boot-drive
                  sdb: Linux drive
                  sdb1: Separate GRUB partition, containing the “main” menu.lst, with this GRUB set up in the MBR of the sda drive.
                  sdb5: Kubuntu 7.10.

                  The menu.lst in sdb1 is simple and calls the other OSs on sdb.
                  For example, the menu.lst of sdb1 has the following boot entry for sdb5 Kubuntu 7.10:

                  title Kubuntu on sdb5, called from GRUB on sdb1.
                  configfile (hd1,4)/boot/grub/menu.lst

                  (when this entry is selected, configfile causes the menu.lst in sdb5 to be shown, from which one selects Kubuntu 7.10)

                  I set up a splash image in sdb1 (the GRUB partition) and a splash image in sdb5 (Kubuntu partition).

                  Result:
                  GRUB showed both splash images in sequence: the first upon booting (using the GRUB partition sdb1), and the second after you select Kubuntu on sdb5.
                  An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                  Comment


                    #10
                    Re: Grub Splash Image -- How To Link

                    I still don't have a grasp on setting a separate partition for /boot. That said, and having just read your comments on "Can you chain splash images in sequence?", I am loading separate splash images in my setup.

                    I have two Kubuntu installations: Feisty and Gutsy. Feisty's root partition is on /sda1 and Gutsy's root partition on /sda2. In each OS's /boot/grub directory, I created a subdirectory called splashimages, in which I have my compressed splash image file. The image for for Feisty is different than the one I have for Gutsy.

                    Each of my menu.lst files has the following entry, immediately following the ## ## End Default Options ## line:

                    (this one from Gutsy's menu.lst)
                    splashimage=(hd0,1)/boot/grub/splashimages/romulan.xpm.gz

                    (this one from Feisty's menu.lst)
                    splashimage=(hd0,0)/boot/grub/splashimages/tattoo.xpm.gz

                    The last entry in each menu.lst file contains the following:

                    (this one from Feisty's menu.lst)
                    title Kubuntu Gutsy boot menu
                    configfile (hd0,1)/boot/grub/menu.lst

                    (this one from Gutsy's menu.lst)
                    title Kubuntu Feisty boot menu
                    configfile (hd0,0)/boot/grub/menu.lst

                    When I first boot my laptop, I'm presented with Feisty's boot menu and splash image (tattoo.xpm.gz). When I select to boot Gutsy, the configfile entry redirects the loader to (hd0,0)/boot/grub/menu.lst which presents me with Gutsy's boot menu and splash image. I can opt to go back to Feisty's boot menu and again, I'm presented with Feisty's boot menu and splash image.
                    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


                      #11
                      Re: Grub Splash Image -- How To Link

                      Snowhog: “I still don't have a grasp on setting a separate partition for /boot. “

                      That part is easy enough. Except I don't use a separate /boot—that should only be needed to solve certain BIOS limitations (GRUB Error 18) or for some advanced purpose.

                      I'm referring to a separate GRUB partition, which contains only the GRUB files; but it must be set up in /boot/grub fashion (nothing in /boot except /grub; i.e., no kernel & initrd files). Used with configfile calls, it's the easiest way to control a bunch of distros on the the system, and to update/change the configuration of OSs/partitions. (A separate, true /boot is quite another matter and must be set up right (e.g., with groot), and managed differently.)

                      How To GRUB Methods - Toolkit
                      http://kubuntuforums.net/forums/inde...opic=3081671.0
                      --- How to make a separate “GRUB boot partition.” (Dedicated to the GRUB files and make your PC boot from those GRUB files.) Reply #10


                      As for chaining these images, I'll check it again. I'm suspicious that perhaps I left hash marks # in when I should have removed them or some such (it was a long day, which is another story—let's just say, Linux Tip of the Day I:s Do not drag your /tmp file into the Trash bin, never, ever, even if you can't resist the urge to experiment . . . ).
                      An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                      Comment


                        #12
                        Re: Grub Splash Image -- How To Link

                        OK. I made a mistake and I edited my post (above) to reflect the correction.

                        It DOES work – you can chain splash images in boot-call sequences.

                        Here's the error I made the first time around:
                        In my menu.lst on sdb5 (Kubuntu partition), I used the standard statement:
                        spashimage=(hd1,4)/boot/grub/sdb5-LucyL.xpm
                        It's standard except that “splashimage” is misspelled as spashimage.

                        (Besides being pooped last night (after re-installing a Kubuntu OS on my machine after borking the previous after dragging /tmp to the Trash), the splash image in question is of the intriguing actress Lucy Lui, which if you saw the image, you would understand how I might have been somewhat distracted from syntax details.)


                        Snowhog, As for details . . .

                        You mentioned for your setup, “Each of my menu.lst files has the following entry, immediately following the ## ## End Default Options ## line:”

                        Clarification:

                        (1) Just so we don't confuse anyone, it is not necessary to put your splashimage (patched GRUB statement) there. You can put it (probably) in many places, but to be safe and manageable and clear, I put them up front so you see them first, say in front of timeout and default:

                        splashimage=(hdx,y)/boot/grub/name_of_image.xpm.
                        timeout n
                        default m

                        (I've also put them after default and after timeout, etc.)

                        Splash images, with their various nuances, are known to be a cause of error, so this makes debugging a bit easier.

                        (2) To make all this work, there is no need to compress your splash image as .gz.
                        It doesn't hurt, of course. In fact, it saves space, it might load faster (?), and GRUB is set to automatically decompress such files. As far as I know, there is no limit on the size of your splash image file, although I'm sure we could run those tests into the ground as well.


                        That's it for me on the subject. That's what I know.

                        Look what you started dibl!
                        Which is why I resisted doing my own splash image 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

                        Working...
                        X