Results 1 to 6 of 6
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-23-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 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.
- 08-23-2012 #2
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 http://linuxcounter.net/
- 08-24-2012 #3Just Joined!
- Join Date
- Jan 2009
- Posts
- 10
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!
- 08-24-2012 #4
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"...
- 08-24-2012 #5Linux Newbie
- Join Date
- Nov 2009
- Posts
- 120
alx,
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
- 08-24-2012 #6Just Joined!
- Join Date
- Mar 2009
- Location
- Santa Cruz, California
- Posts
- 76
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:
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=20
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.


Reply With Quote
