grub-choose-default – Control Grub Default through a GUI

Sponsored Link
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.

Cross Platform

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. grub-set-default currently needs this 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.

Install grub-choose-default in ubuntu

sudo aptitude install grub-choose-default


Sponsored Link

You may also like...

6 Responses

  1. leeing says:

    I find it really helpful~

  2. Rami says:

    How can I install grub 1.98?

    I have the one in the ubuntu 9.10 repo (1.97).

  3. Brett Howard says:

    Sometimes I swear it really is easier to do this via the console… Don’t be afraid to learn to do these things via the console. The console is what makes Linux so powerful!

  4. David Mohr says:

    This article is misleading… the text describes grub-choose-default 0.6, while the repository only includes 0.2. That’s not going to work well, unless someone installs outdated grub versions.

    Rami, I’ve added a PPA to the homepage which includes grub 1.98. Since I’m not running Ubuntu, I haven’t tested it, but I don’t expect any problems (it’s just a backport of lucid’s grub version).

    Brett, of course you can set the default using the command line. It’s not about being afraid, it’s about convenience. Clicking an icon, then the right button is just so much faster than typing out the name of the boot entry or figuring out its index.

  5. David Heremans says:

    Thanks, I have recently switched from lilo to grub and have since been wondering what the alternate to the ‘lilo -R’ command was 🙂

  6. David Heremans says:

    I have recently switched from lilo to grub, and have been wondering since what the alternative command for ‘lilo -R’ was.
    Thanks for the info! (altohough I find the CLI much simpler and straight-forward then this little GUI tool)

Leave a Reply

Your email address will not be published. Required fields are marked *