grub2 and a gamer’s problem.

As some of you may know, I am a gamer. Also, I am a software developer. I use Windows 7 for my gaming and Arch Linux for my dev work.

The problem I’ve ran into, and some of my friends have complained about as well, is that when you go to reboot to your Windows install you have to sit around and wait for the grub prompt, then select the right entry, then you are clear to walk away while it boots.

This is no longer a problem.

If you are running Grub2, there is a simple solution, if you are not, I recommend switching to it (Archers, the installer installs Grub1 there is a nice wiki page about Grub2 if you’d like to switch).

The solution makes it so we can choose what menu entry to boot before rebooting, then have it go back to the default before we set that on the next boot after that.

The start of this solution is enabling saving of defaults for grub. This requires changing /etc/default/grub:

GRUB_DEFAULT=0

to

GRUB_DEFAULT="saved"

Some distros have a update-grub command, Arch Linux is not one of them, so then you reinstall grub which is as simple as a: (replace sda with your boot drive)

sudo grub-install /dev/sda

Then you can do: (replace 3 with the number or name of your windows menu entry 0 indexed)

sudo grub-reboot 3
sudo reboot

And there ya go, you will boot into windows, and when you reboot it will go back to linux.

Enjoy,
Wraithan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s