Results 1 to 9 of 9

Thread: Change Grub Boot order

  1. #1
    Join Date
    Mar 2011
    Beans
    8

    Change Grub Boot order

    Hello,

    Absolute beginner here. I am trying to change the default gnu grub boot order to first go to windows 7. I entered gksudo gedit /boot/grub/menu.lst and it opened up the file but the file was blank. It didn't show me the 5 or 6 possible choices. What should I do? Thanks

  2. #2
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Change Grub Boot order

    You are probably using Grub2, which uses different configuration files.

    I'd recommend Grub Customizer if you like GUI. If you prefer manually editing files, go to the "Tasks" link. The "Basics" link will probably tell you more than you want to know about Grub 2.

    All are linked in my signature line.
    Back to Xorg...

    Retired.

  3. #3
    Join Date
    Mar 2011
    Beans
    8

    Re: Change Grub Boot order

    I don't think I prefer to do it manually, it was just the first response when I googled it. Thanks for the links. I'll take a look.

  4. #4
    Join Date
    Dec 2010
    Location
    Earth
    Beans
    151
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Change Grub Boot order

    sudo gedit /boot/grub/grub.cfg

    GRUB_DEFAULT=0
    or
    default=0

    EDIT THIS TO NUMBER WHICH WINDOWS IS

    like if windows is the fourth option in the boot menu edit this to

    GRUB_DEFAULT=3
    or
    default=3

    Read these

    http://ubuntuforums.org/showthread.php?t=1306670
    http://ubuntuforums.org/showthread.php?t=1195275
    Last edited by highspider; March 18th, 2011 at 08:03 PM.
    In a perfect world my college professors would allow assignment as .odt openoffice.org files! And code as Eclipse projects.

  5. #5
    Join Date
    Apr 2009
    Location
    Houston, TX
    Beans
    916
    Distro
    Ubuntu Development Release

    Re: Change Grub Boot order

    I found Startup Manager to work fine for me, and it did the trick and I am using Grub2...just a suggestion, it's also a GUI interface which you might be more comfortable with.
    Earl S. Sharp----------------------------------------
    Ubuntu User # 27653 |Linux user # 491157 | LPI # 183649
    Please mark threads as solved...

  6. #6
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,470
    Distro
    Ubuntu Development Release

    Re: Change Grub Boot order

    Code:
    grep menuentry /boot/grub/grub.cfg
    Will show you your menu entry list in grub2 so as to pick right Number for GRUB_DEFAULT
    Last edited by garvinrick4; March 18th, 2011 at 08:14 PM.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:


  7. #7
    Join Date
    Oct 2008
    Beans
    3,509

    Re: Change Grub Boot order

    Quote Originally Posted by garvinrick4 View Post
    Code:
    grep menuentry /boot/grub/grub.cfg
    Will show you your menu entry list in grub2 so as to pick right Number for GRUB_DEFAULT
    I came across this command the other day which nicely lists and numbers your grub menu entrys.
    Code:
    grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
    Code:
    glen@MavMusic:~$ grep menuentry /boot/grub/grub.cfg | cut -b 1-11 --complement | cut -d "'" -f1 | cut -d "\"" -f 1 | nl --starting-line-number=0
         0	Ubuntu, with Linux 2.6.35-27-generic
         1	Ubuntu, with Linux 2.6.35-27-generic (recovery mode)
         2	Ubuntu, with Linux 2.6.35-25-generic
         3	Ubuntu, with Linux 2.6.35-25-generic (recovery mode)
         4	Ubuntu, with Linux 2.6.35-24-generic
         5	Ubuntu, with Linux 2.6.35-24-generic (recovery mode)
         6	Windows NT/2000/XP (loader) (on /dev/sda1)
         7	LinuxMint GNU/Linux, with Linux 2.6.32-5-686 (on /dev/sdb1)
         8	LinuxMint GNU/Linux, with Linux 2.6.32-5-686 (recovery mode) (on /dev/sdb1)
    @ MRRangel
    Run the above command to get the number for your windows entry.

    Then use
    Code:
    gksudo gedit /etc/default/grub
    to change the boot order.


    Change the line
    Code:
    GRUB_DEFAULT=0
    to correspond to the number for your windows entry.
    Save and close and then run
    Code:
    sudo update-grub
    Last edited by stinkeye; March 18th, 2011 at 08:44 PM.

  8. #8
    Join Date
    Mar 2011
    Beans
    8

    Re: Change Grub Boot order

    High Spider & all, the udo gedit /boot/grub/grub.cfg entry and change did the trick. Thanks all for your input.

  9. #9
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Change Grub Boot order

    Quote Originally Posted by MRRangel View Post
    High Spider & all, the udo gedit /boot/grub/grub.cfg entry and change did the trick. Thanks all for your input.
    That method will work but you should know it will not survive any update of Grub2. It will be overwritten the next time there is a kernel or grub update.

    The more permanent method is to change the setting in /etc/default/grub or use one of the GUI apps mentioned, which will make the change in the appropriate file.
    Back to Xorg...

    Retired.

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
  •