Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 55

Thread: Customizing Grub2 boot menu

  1. #11
    Join Date
    Jul 2007
    Beans
    27

    Re: Customizing Grub2 boot menu

    I followed steps as in post 1, but grub2 post install script started to fail wit a message saying grub-pc wasn't configured. So I undid the changes, went into synaptic package manager, remove just about everything grub, reinstalled grub2 (+grub-pc, grub-common) and was able to install Grub2. After that I installed startupmanager (GUI Tool) to set up start up options. It works fine now, except that I am not able to get spash screen behind grub menu.

  2. #12
    Join Date
    May 2009
    Beans
    37

    Re: Customizing Grub2 boot menu

    it worked great now my grub looks absolutely nice

  3. #13
    Join Date
    May 2007
    Location
    On board my boat
    Beans
    483
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Customizing Grub2 boot menu

    Did everything as shown, worked great. I now have the grub splash I want and I can change it every day if I please (in fact, I bet there could be a script that does that for you if you set it up right). Screen resolution is funky, but I found the right one for my 1680X1050 monitor (it's 1080X675, whatever, it works.)

    I do have one question;
    Is there anyway to get rid of the box that surrounds the menu choices in Grub?
    Don
    Looks fine to me but then I don't know/care what you run

  4. #14
    Join Date
    Nov 2009
    Beans
    4

    Wink Re: Customizing Grub2 boot menu

    Hi,newbie here
    I found out that I need to edit this line to get the desired resolution..

    if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi
    to
    if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=1024x768 ; fi

  5. #15
    Join Date
    Apr 2008
    Location
    Campinas, SP - Brasil
    Beans
    355

    Re: Customizing Grub2 boot menu

    Edit: check the next post to see how to build this menu automatically.

    My tweak of the Grub2 menu is the following, and makes the menu look like this:

    Code:
    Ubuntu Karmic
    Windows Vista
    =============== Other non-standard options ===============
    Ubuntu, Linux 2.6.31-14-generic
    Ubuntu, Linux 2.6.31-14-generic (recovery mode)
    Memory test (memtest86+)
    Memory test (memtest86+, serial console 115200)
    Windows Vista (loader) (on /dev/sda1)
    Windows Vista (loader) (on /dev/sda2)
    What I have done is:

    1 - Copy the /etc/grub.d/40_custom to /etc/grub.d/06_custom
    (by being 06 it will be loaded before 10_linux and your custom
    options will appear at the top).

    2 - Edit the 06_custom file created adding the menu entries
    you want, copying exactly the content of the
    /boot/grub/grub.cfg file. You can copy exactly the entry from the grub.cfg file and change the title of the menuentry alone. My 06_custom file looks like this, then:

    Code:
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    menuentry "Ubuntu Karmic" {
          recordfail=1
          if [ -n ${have_grubenv} ]; then save_env recordfail; fi
          set quiet=1
          insmod ext2
          set root=(hd0,3)
          search --no-floppy --fs-uuid --set aecf5a37-4292-4545-9f7c-0dad8d118263
          linux /boot/vmlinuz-2.6.31-14-generic root=UUID=aecf5a37-4292-4545-9f7c-0dad8d118263 ro   quiet splash
          initrd      /boot/initrd.img-2.6.31-14-generic
    }
    menuentry "Windows Vista" {
          insmod ntfs
          set root=(hd0,2)
          search --no-floppy --fs-uuid --set 3056cb7d56cb4278
          chainloader +1
    }
    menuentry "=========== Other non-standard options ==============" {
          recordfail=1
          if [ -n ${have_grubenv} ]; then save_env recordfail; fi
          set quiet=1
          insmod ext2
          set root=(hd0,3)
          search --no-floppy --fs-uuid --set aecf5a37-4292-4545-9f7c-0dad8d118263
          linux /boot/vmlinuz-2.6.31-14-generic root=UUID=aecf5a37-4292-4545-9f7c-0dad8d118263 ro   quiet splash
          initrd      /boot/initrd.img-2.6.31-14-generic
    }
    Note that the third entry is exactly identical to first, and I use it only as a separator. I don't know how to put an empty entry for that.

    Ideally the first "Ubuntu Karmic" entry should be something more intelligent that updates automatically when a new kernel is found. I don't know how to do that yet.

    Edit: after changing the files you need to run update-grub, of course.
    Last edited by leandromartinez98; November 9th, 2009 at 09:05 PM.

  6. #16
    Join Date
    Apr 2008
    Location
    Campinas, SP - Brasil
    Beans
    355

    Re: Customizing Grub2 boot menu

    The present script will build the menu I presented in the previous
    post, but choosing the latest kernel automatically for the Ubuntu
    option at the top. It is a slightly adapted 10_Linux script, which
    shall be named 06_custom and put at the "/etc/grub.d" folder.

    Just needed checking if the Windows partition is defined correctly
    at the end, its menu entry should match your /boot/grub/grub.cfg
    menu entry for Windows.

    It cannot do much harm, to take back you only need to remove
    the 06_custom file from the /etc/grub.d directory. But since this
    is messing up with booting, I don't take responsibility for problems
    that may arise, I'm not an ultra expert on this.

    To use it:

    1 - Copy the 06_custom.txt file attached to

    /etc/grub.d/06_custom

    2 - Make it executable:

    sudo chmod +x /etc/grub.d/06_custom

    3 - Your present /boot/grub/grub.cfg file
    contains a menuentry for windows. Replace the content of
    the windows vista menuentry with the content of the menuentry
    of that file. Be careful with the following character: " and $.
    If they are present in the content of the menuentry, add
    a \ before it (\" and \$).

    4 - Update grub:

    sudo update-grub

    5 - Check the content of the /etc/grub/menu.cfg created.
    The first menuentry should be the newest Ubuntu kernel. The
    second is the windows partition. And this one must exactly
    match the windows partitions defined at the end, which
    is generated automatically.

    6 - Reboot.

    7 - If you don't like the result, just remove the

    /etc/grub.d/06_custom

    file and re-update grub with:

    sudo update-grub



    ----
    If this works well, you shouldn't have to worry anymore with the grub menu when the
    kernel is updated. The new kernel will be at the top and older ones will appear below
    as an non-standard boot option.
    Attached Files Attached Files
    Last edited by leandromartinez98; November 13th, 2009 at 01:24 AM.

  7. #17
    Join Date
    Jun 2009
    Location
    Earth
    Beans
    65
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Customizing Grub2 boot menu

    I'd just like to say I love the tutorial and plan to use it as soon as I can.


    Did you know this thread made Lifehacker?

    http://lifehacker.com/5398635/custom...ub-boot-screen
    I want patience, AND I WANT IT NOW!
    -Unknown
    Registered Linux User #494940

  8. #18
    Join Date
    Nov 2008
    Location
    Baildon, West Yorkshire
    Beans
    6
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Customizing Grub2 boot menu

    I think the following may have something to do with the issue you are having:

    Code:
        if is_path_readable_by_grub $i ; then 
          bg=$i
          case ${bg} in
            *.png)		reader=png ;;
            *.tga)		reader=tga ;;
            *.jpg|*.jpeg)	reader=jpeg ;;
    This would suggest grub is unable to read the directory you placed your background in, or that it's not in a format it will accept (png, tga or jpeg). I don't profess to be an expert in these matters so I'd be grateful to anyone who can corroborate this!

  9. #19
    Join Date
    May 2007
    Location
    On board my boat
    Beans
    483
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: Customizing Grub2 boot menu

    Quote Originally Posted by The2DQuartet View Post
    I think the following may have something to do with the issue you are having:

    Code:
        if is_path_readable_by_grub $i ; then 
          bg=$i
          case ${bg} in
            *.png)		reader=png ;;
            *.tga)		reader=tga ;;
            *.jpg|*.jpeg)	reader=jpeg ;;
    This would suggest grub is unable to read the directory you placed your background in, or that it's not in a format it will accept (png, tga or jpeg). I don't profess to be an expert in these matters so I'd be grateful to anyone who can corroborate this!
    If you want to get your Grub Splash screen from a directory that you do not need to "sudo" all the time just edit this:

    Code:
    for i in {/boot/grub,/usr/share/images/desktop-base,/usr/share/images/grub}/xxxxxxxxxx.{png,tga} ;
    to whatever directory you wish.
    Don
    Looks fine to me but then I don't know/care what you run

  10. #20
    Join Date
    Sep 2007
    Location
    Upstate NY/Alaska-winter
    Beans
    1
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: Customizing Grub2 boot menu

    Worked mostly as indicated, but there were a few differences in the files; I just figured it out by reading the code and knowing what you meant as opposed to following blindly. Thanks for a great little tweak. Works fine.
    N.

Page 2 of 6 FirstFirst 1234 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •