Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to edit GRUB Menu ?

  1. #1
    Join Date
    Jan 2009
    Location
    Dhaka, Bangladesh.
    Beans
    12
    Distro
    Ubuntu 9.10 Karmic Koala

    Unhappy How to edit GRUB Menu ?

    Hello EveryOne...

    I am using ubuntu 9.10 and Windows XP in dual booting in one HDD. After fresh install of ubuntu my GRUB Menu was like below-

    Ubuntu, Linux 2.6.31-14-generic
    Ubuntu, Linux 2.6.31-14-generic (recovery mode)
    Memorytest (memtest86+)
    Memorytest (memtest86+, (serial console 115200)
    Windows Vista (loader) (on /dev/sda1)
    I choose the first option for using ubuntu and the last one for Windows XP.
    After somedays of use and update ubuntu. My GRUB Menu was like below-

    Ubuntu, Linux 2.6.31-15-generic
    Ubuntu, Linux 2.6.31-15-generic (recovery mode)
    Ubuntu, Linux 2.6.31-14-generic
    Ubuntu, Linux 2.6.31-14-generic (recovery mode)
    Memorytest (memtest86+)
    Memorytest (memtest86+, (serial console 115200)
    Windows Vista (loader) (on /dev/sda1)
    First two option was added. again i choose the first option for using ubuntu and the last one for Windows XP. Again after somedays of use and update ubuntu. My GRUB Menu was like below-

    Ubuntu, Linux 2.6.31-16-generic
    Ubuntu, Linux 2.6.31-16-generic (recovery mode)
    Ubuntu, Linux 2.6.31-15-generic
    Ubuntu, Linux 2.6.31-15-generic (recovery mode)
    Ubuntu, Linux 2.6.31-14-generic
    Ubuntu, Linux 2.6.31-14-generic (recovery mode)
    Memorytest (memtest86+)
    Memorytest (memtest86+, (serial console 115200)
    Windows Vista (loader) (on /dev/sda1)
    Again first two option is added.

    My question is any way to edit the GRUB Menu ? and can i make a munu like below-
    Ubuntu, Linux 2.6.31-16-generic
    Windows Vista (loader) (on /dev/sda1)
    If it is possible.. Please help me, how to do that. Otherwise my 15" monitor become full with boot options.

  2. #2
    Join Date
    Aug 2005
    Location
    Camp Hill
    Beans
    106
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to edit GRUB Menu ?

    You can edit your grub boot menu by running
    Code:
    sudo gedit /etc/default/grub
    from the terminal. After any edits you'll need to run
    Code:
    sudo update-grub
    but I'd really recommend reading the documentation first https://help.ubuntu.com/community/Grub2

    The extra entries dont hurt anything (and its good to have atleast one older kernel listed so if the new one isnt so stable you can roll back to the old one) other than just more information to arrow through
    I try to keep it simple | http://www.cgkreality.com/ | Time to toss the dice

  3. #3
    Join Date
    Jan 2008
    Beans
    32

    Re: How to edit GRUB Menu ?

    I don't know how to edit the newfangled GRUB to get rid of old kernels, but you can always uninstall them via Synaptic (search for linux-image - make sure you don't uninstall the newest one. And some say to always keep an extra old one at hand in case something goes wrong with the newest one) - GRUB will then update itself.

  4. #4
    Join Date
    Dec 2009
    Location
    Phoenix, AZ
    Beans
    2
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to edit GRUB Menu ?

    Quote Originally Posted by argosreality View Post
    You can edit your grub boot menu by running
    Code:
    sudo gedit /etc/default/grub
    from the terminal. After any edits you'll need to run
    Code:
    sudo update-grub
    but I'd really recommend reading the documentation first https://help.ubuntu.com/community/Grub2

    The extra entries dont hurt anything (and its good to have atleast one older kernel listed so if the new one isnt so stable you can roll back to the old one) other than just more information to arrow through
    Can I use the same way to have Windows Vista to start first, then Ubuntu as second? I did notice a box pops up; is that were you edit the GRUB?

  5. #5
    Join Date
    Jan 2009
    Location
    Dhaka, Bangladesh.
    Beans
    12
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to edit GRUB Menu ?

    @ argosreality:
    Thanks You for the link and suggestion.

  6. #6
    Join Date
    Dec 2009
    Beans
    2

    Re: How to edit GRUB Menu ?

    Great thread and thanks for the info, I was worried that my install had gotten mangled with all the new bits appearing in the boot menu after the updates.

  7. #7
    Join Date
    Aug 2005
    Location
    Camp Hill
    Beans
    106
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to edit GRUB Menu ?

    Quote Originally Posted by lostongps View Post
    Great thread and thanks for the info, I was worried that my install had gotten mangled with all the new bits appearing in the boot menu after the updates.
    New entries wouldn't bork anything. However, some SATA controllers have an annoying habit of reordering the hard drives (like mine) which can make for some very...fun boot experiences!
    I try to keep it simple | http://www.cgkreality.com/ | Time to toss the dice

  8. #8
    Join Date
    Sep 2006
    Location
    South East Wisconsin
    Beans
    18
    Distro
    Ubuntu 6.06

    Re: How to edit GRUB Menu ?

    Seems to me (correct me if I am wrong) in Grub 2 you need to edit /boot/grub/grub.cfg that is where the menu options are set for OS's below is a copy of mine.. I really wish the folks at Ubuntu could find a way to allow updates to the Kernel yet not just keep adding to the menu list in grub, I have no problem editing it (for example making Windows default boot item or removing past kernel options) but my less geeky friends don't and it gets quite long with each kernel update.

    Any way.. Here is grub.cfg and then grub from /etc/default/grub


    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    if [ -s /boot/grub/grubenv ]; then
    have_grubenv=true
    load_env
    fi
    set default="0"
    if [ ${prev_saved_entry} ]; then
    saved_entry=${prev_saved_entry}
    save_env saved_entry
    prev_saved_entry=
    save_env prev_saved_entry
    fi
    insmod ext2
    set root=(hd0,5)
    search --no-floppy --fs-uuid --set e8aa1796-a7c6-4b1f-b8c8-b823a33209a0
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=640x480
    insmod gfxterm
    insmod vbe
    if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
    fi
    fi
    if [ ${recordfail} = 1 ]; then
    set timeout=-1
    else
    set timeout=10
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/05_debian_theme ###
    insmod ext2
    set root=(hd0,5)
    search --no-floppy --fs-uuid --set e8aa1796-a7c6-4b1f-b8c8-b823a33209a0
    insmod tga
    if background_image ; then
    set color_normal=black/black
    set color_highlight=magenta/black
    else
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    fi
    ### END /etc/grub.d/05_debian_theme ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry "Windows 7 (loader) (on /dev/sda1)" {
    insmod ntfs
    set root=(hd0,1)
    search --no-floppy --fs-uuid --set 7e5ac9cc5ac9817f
    chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry "Ubuntu, Linux 2.6.31-16-generic" {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,5)
    search --no-floppy --fs-uuid --set e8aa1796-a7c6-4b1f-b8c8-b823a33209a0
    linux /boot/vmlinuz-2.6.31-16-generic root=UUID=e8aa1796-a7c6-4b1f-b8c8-b823a33209a0 ro Ipv6.disable=1 quiet splash
    initrd /boot/initrd.img-2.6.31-16-generic
    }
    menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,5)
    search --no-floppy --fs-uuid --set e8aa1796-a7c6-4b1f-b8c8-b823a33209a0
    linux /boot/vmlinuz-2.6.31-16-generic root=UUID=e8aa1796-a7c6-4b1f-b8c8-b823a33209a0 ro single
    initrd /boot/initrd.img-2.6.31-16-generic
    }

    ### BEGIN /etc/grub.d/30_os-prober ###
    ## menuentry "Windows 7 (loader) (on /dev/sda1)" {
    ## insmod ntfs
    ## set root=(hd0,1)
    ## search --no-floppy --fs-uuid --set 7e5ac9cc5ac9817f
    ## chainloader +1
    ## }
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # 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.
    ### END /etc/grub.d/40_custom ###

    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.


    Here is the other one.

    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="Ipv6.disable=1 quiet splash"
    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=640x480

    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true

    # Uncomment to disable generation of recovery mode menu entrys
    #GRUB_DISABLE_LINUX_RECOVERY="true"

  9. #9
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: How to edit GRUB Menu ?

    "Seems to me (correct me if I am wrong) in Grub 2 you need to edit /boot/grub/grub.cfg"

    That would be an exercise in futility. See https://help.ubuntu.com/community/Grub2

  10. #10
    Join Date
    Jan 2009
    Location
    Dhaka, Bangladesh.
    Beans
    12
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: How to edit GRUB Menu ?

    i have got the link for knowing about GRUB 2 Basics in this forum. it help me to solving my problem.
    Thank you all for helping me.

Page 1 of 2 12 LastLast

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
  •