Note: This program is only for the current grub version (1.98+), and does not work with grub-legacy (0.xx). Older grub-choose-default versions work with grub-legacy, see GrubChooseDefaultLegacy.
Control Grub Default through a GUI
Do you have a dual boot system? Isn’t it annoying when you want to reboot from Linux into Windows or vice-versa, and you have to wait for the machine to shut down, the BIOS to initialize just so that you can now select the OS that you want to boot into?
grub-choose-default gives you a GUI that you can use to easily select the next default for grub and you can go and grab a snack while your computer reboots without having to wait for anything.
It’s a very simple program that just reads your grub menu entries and then lets you click on the one you want to be the next default.
How It Works
Since grub2 reached version 1.98, setting the default boot entry through the “grub environment” is supported. From Linux, the grub-set-default command is available again, just as before with grub-legacy. Under Windows grub’s code is used to edit the environment directly.
grub-choose-default is available both for Linux and Windows. It should also work on other Unices, but has not been tested (user reports are welcome).
Under Linux it reads /boot/grub/grub.cfg and sets your choice using grub-set-default.
Under Windows you need to get access to your Linux /boot. If you are running ext2/3, then you can use Ext2IFS, which gives you access to your ext2/3 partitions as regular drives under Windows. Although this software doesn’t work perfectly under Windows 7, there are usable workarounds. See README.win32 in the sources, or read the introductory text of the installer for further information. Grub-set-default currently needs direct file access and thus does not work with /boot on reiserfs or other filesystems (unless someone can point me to a similar FS driver as Ext2IFS).
Then grub-choose-default searches all your drives for boot/grub/grub.cfg or a grub/grub.cfg. The grub directory can be specified in the configuration file, which is located in the Profile folder’s “Application Data” subdirectory grub-choose-default. Add the line ”grub_dir=D:\grub” to the end of the file, and remember to escape backslashes.
Ending the Session
Most of the time you will want to reboot after setting the new grub entry. How to end a session is specific to the desktop environment in Linux, and in the reboot/ directory are example scripts of how to end a session. The user can install the script of his choice in $XDG_CONFIG_DIR/grub-choose-default/reboot.
- GTK 2.16+
- GIO (on Windows)
- Python (for building from source)
The page for the old version of grub-choose-default, which is compatible with grub 0.xx, can be found at GrubChooseDefaultLegacy.
grub-choose-default is released under the GNU GPL v2. The NSIS installer script is using GNU GPL v3, and the waf scripts the EXPAT license.
The development version can be found at http://github.com/squisher/grub-choose-default .
Ubuntu packages for karmic are at https://launchpad.net/~bugs-da/+archive/grub-choose-default/
- 2014-04-22 – Version 1.1
Improved grub.cfg parsing. Sub-menu support.
- Sources: grub-choose-default-1.1.tar.bz2, SHA1
- Cleaned up tarball was released 2014-04-27, the previous version’s SHA1 was 50f14db42b7f1a04381455627083562583604b54
- Windows Installer: Not ready yet, please bug me if you are interested.
- 2010-08-14 – Version 1.0
Support to set default for next reboot only. Allow workaround for Windows 7.
- Sources: grub-choose-default-1.0.tar.bz2, SHA1
- Windows Installer: grub-choose-default-1.0-win32-setup.exe, SHA1
- 2010-05-30 – Version 0.9
Better error reporting. Note: at 19:06 MET a corrected tarball was uploaded.
- Sources: grub-choose-default-0.9.tar.bz2, SHA1
- Windows Installer: grub-choose-default-0.9-win32-setup.exe, SHA1
- 2010-05-17 – Version 0.8
Bugfix release, 0.7 would still crash on some systems.
- Sources: grub-choose-default-0.8.tar.bz2, SHA1
- Windows Installer: grub-choose-default-0.8-win32-setup.exe, SHA1
- 2010-05-11 – Version 0.7
Bugfix release, 0.6 would crash on most systems.
- Sources: grub-choose-default-0.7.tar.bz2, SHA1
- Windows Installer: grub-choose-default-0.7-win32-setup.exe, SHA1
- 2010-04-19 – Version 0.6
Rewrite in C/Gtk supporting grub2. Note that the release tarball was replaced on 2010-04-21 as the previous version had a minor packaging error.
- Sources: grub-choose-default-0.6.tar.bz2, SHA1
- Windows Installer: grub-choose-default-0.6-win32-setup.exe, SHA1
Comments, bug reports, etc. are very welcome. Please look for my email address in the included README file.
What a cool program ! Running dual boot with Ubuntu 12.04 LTS x64 and Windows XP. Unfortunately under Windows XP I cannot see all the grub menu entries. Grubchoosedefault only displays Windows XP and memory test entries. Any ideas how to change this, so I can choose Ubuntu as next startup ?
nevermind ! It works like charm. I was mistakingly using the 0.6 version …
Any chance of getting the compiled windows version of the latest (1.1?) grub-choose-default?
I don’t have a dev setup on a Windows box or VM right now. But I’ll try to set something up. Is there a decent filesystem driver for Windows again? Last I checked they mostly failed to work under Win7 (and it’s probably worse in Win8).
Was looking for the exact feature your program is offering. Found this to access ext2/3/4: http://www.paragon-drivers.com/extfs-windows/ — gonna give it a try
I seem to access the linux partition fine from windows with that paragon tool, though it seems to be user-mode access (similar to FUSE), so I’m not sure that’s ok with your program. I tried with the previous 1.0 version and it simply crashes. Any thought ? (windows server 2008 R2 aka the Win7 server version if you’re not familiar with that)
This looks like just what we’re looking for. Is there a windows installer available for v1.1? And does this work on Fedora (and if so, how does one compile it)? Thanks!
I need to work on a Windows version — it should be straight forward, as long as there is a working driver for accessing the /boot filesystem. No idea if it’s packaged for fedora, compilation is the usual ‘./configure && make all install’.
I tried the windows installer with windows 8 and ext2fsd (because my linux partition is ext3) but it does not work.
That’s too bad because rebooting from linux to windows is easy with grub-reboot !
I’d really like to see a windows version working :) :)
my grub.cfg have a function for saving default OS which I didn’t investigate but for now that prevent me for just using a .bat to copy over another configuration file for each OS.