Results 1 to 4 of 4

Thread: 10.04, is there a way to re-arrange the Grub?

  1. #1
    Join Date
    Dec 2007
    Location
    Eaton, CO
    Beans
    39
    Distro
    Kubuntu 11.04 Natty Narwhal

    10.04, is there a way to re-arrange the Grub?

    Hello All,
    I currently have Windows 7 with 9.10 installed but will be updating my ubuntu as soon as I get off work today.
    I'm wondering though, as Win7 is my main system that I operate under, is there a way to change the order of the op systems in the grub? If so, how? I'm a complete noob on linux so all help is appreciated.

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 10.04, is there a way to re-arrange the Grub?

    As usual there are few ways to do it. I guess you want Win7 to be default, you could do that even without rearranging the positions. But any new kernel update would still "push" Win7 downwards.

    The main Grub2 config files are in /etc/grub.d folder and the main are 10_linux (for ubuntu), 20_memtest86+ and 30_os-prober (for detecting other OSs). The number in front gives the order, so the grub menu by default looks like Ubuntu-Memtest-Win.

    My preferred way:
    Open terminal (Applications-Accessories)

    Create new os-prober file with number between 06 and 09, with:
    sudo cp /etc/grub.d/30_os-prober /etc/grub.d/06_os-prober

    Remove the execute bit from the initial file:
    sudo chmod -x /etc/grub.d/30_os-prober

    If you want to remove memtest from the menu (if not skip):
    sudo chmod -x /etc/grub.d/20_memtest86+

    To update the grub.cfg:
    sudo update-grub

    You should now have:
    Win7
    Ubuntu
    Memtest

    Any kernel updates will add them after Win7 entry.

    You control the default OS choice in /etc/default/grub (you can open it with sudo gedit), in GRUB_DEFAULT=n. If n is 0, it means the first in the menu, 1, the second, etc.
    Instead of a number you can also use the full name like "Windows 7 loader...." and in that case it doesn't matter in which order they are in the menu.

    With what I wrote above if you keep the default GRUB_DEFAULT=0 Win7 should be on top of grub menu and default OS.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Oct 2009
    Location
    Elgin, IL USA
    Beans
    2,534
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 10.04, is there a way to re-arrange the Grub?

    There is another way, which does not really change the order, but makes whatever you booted last the default. gksu gedit /etc/default/grub (or you can use sudo nano)

    #GRUB_DEFAULT=0
    GRUB_DEFAULT=saved

    Then sudo update-grub

    Then any time you make a selection from the grub menu, that selection is the default the next time you boot. So if you boot Windows, that will be the default for next boot or reboot. If you are in Linux, a reboot would reboot Linux.

  4. #4
    Join Date
    Dec 2007
    Location
    Eaton, CO
    Beans
    39
    Distro
    Kubuntu 11.04 Natty Narwhal

    Re: 10.04, is there a way to re-arrange the Grub?

    Thanks guys (or gals), worked like a charm!

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
  •