Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    How do I change the boot order in grub 2?

    So basically my bios is set up to boot before I wake up in the morning so I have everything ready, the issue here is that I work more on Windows than my current Linux distro installed, so every time I have to reboot and select Windows manually. While searching I bumped intro something similar to what I'm looking but sadly it didn't work with grub 2, so how do I do this (excluded Grub Customizer, a way through console would be preferred)? Thank you for your time.

  2. #2
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    You use 'grub2-set-default' from the command line to specify which item you want as the default - specify it by its menu title (read it out of the /boot/grub2/grub.cfg if needed) and then rebuild your grub.cfg with 'grub2-mkconfig -o /boot/grub2/grub.cfg'.
    Linux user #126863 - see

  3. #3
    IMHO, an even easier solution is to download and install the package startupmanager (I'm sure it's available for Debian and derivatives (ubuntu and all the rest), not so sure about others)
    when you run it you'll see a nice and simple GUI to tweak grub2. select which OS you want as default, how long you'd like to wait, resolution of the menu screen...
    good luck!

  4. $spacer_open
  5. #4
    Linux Newbie reginaldperrin's Avatar
    Join Date
    Oct 2010
    Christchurch, New Zealand
    You can also get a nice grub editor called Grub Customizer from here: HOWTO: Grub Customizer - Ubuntu Forums

    hope this helps

    Edit: Though I have just seen your text "excluding Grub Customizer"...

  6. #5

    Edit the "menu..." file in /boot/grub... The default OS is indicated in there so just set the windows up as the default OS and away you go.

    Cheers - AK

  7. #6
    Just Joined!
    Join Date
    Mar 2009
    Santa Cruz, California
    An even easier way is to edit /etc/default/grub

    sudo vi /etc/default/grub

    and edit the value of GRUB_DEFAULT to select the menu line you want - the value is probably around 6 or 7 or more:


    And then run update-grub (sudo update-grub).

    The other lines are to make the boot menu visible and set the timeout for it long enough that you can see which line you want to select. All the tools you need come with Linux; you don't need to add any special utilities.

    It's generally not a good idea to edit files in /boot/grub/ yourself, as update-grub is run automatically when various system updates are done, and files in that directory get updated.

    Another way is to create a special file in /etc/grub.d with the commands for booting Windows, and name it so it's processed before the file that scans the system when update-grub is run. Google for information about Grub 2 - it's a little complicated. Its name should begin with a number a bit below 30_os-prober, it should have a similar structure to 41_custom, and its commands for booting Windows can be found by looking in /boot/grub/grub.cfg for the menuentry clause which already boots Windows.

Posting Permissions

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