Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have three hard drives installed on my machine, they are arranged chronologically in boot priority in my BIOS:

  • 64 GB SSD Windows Seven | NFTS
  • 120 GB HDD Ubuntu 11.10 | DAT4
  • 500 GB HDD Storage For Both | NFTS

What I am looking to do is make it so that GRUB will boot Windows 7 as my primary OS and always offer the option of Ubuntu. Currently, GRUB is on the MBR of the 120 GB HDD (Second in boot priority); and always boots Ubuntu by default. The only method I have found to getting Windows 7 to boot automatically is by physically detaching the HDD. I am running a custom built machine, 64-bit architecture LGA 1155 Mother Board; let me know if you need any other system information.

I am hoping to boot GRUB and have Windows 7 as the default option.

share|improve this question
... I think this is a duplicate of this!… – fossfreedom Mar 27 '12 at 14:24
I had looked at that question @fossfreedom but my partitions we're not logical partitions on the same HDD - - they are actually individual Hard Drives and I didn't know if this was a hardware issue or a GRUB issue. – RSX-1327 Mar 27 '12 at 14:26
...yep - it will work - however no worries. Just keep in mind Oli's warning that you'll need to change your grub each time a kernel update is made. – fossfreedom Mar 28 '12 at 19:57
up vote 3 down vote accepted

From Ubuntu run cat /boot/grub/grub.cfg | grep menuentry. Starting from zero, count down to the Windows entry, so if it's the eighth entry, you count to 7.

Then edit grub:

sudoedit /etc/default/grub

Change the GRUB_DEFAULT=0 line to GRUB_DEFAULT=X where X is the number you counted to. ControlX, then Y to save and exit. Then run:

sudo update-grub

And when you reboot that entry should be selected.

Note: This method didn't used to be recommended because the list would grow as more kernels were added in updates but now Ubuntu has a more fixed kernel list. If you manually add extra entries in the future you may find that you need to change which is set as the default.

share|improve this answer
Worked perfectly! I was rushing so fast; I accidentally changed GRUB_DEFAULT to 5 which was my Windows Recovery partition! Thank you! – RSX-1327 Mar 27 '12 at 14:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.