1

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.

RSX-1327
  • 195
  • ... I think this is a duplicate of this! http://askubuntu.com/questions/52963/how-do-i-set-windows-to-boot-as-the-default-in-the-boot-loader/52990#52990 – 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

1 Answers1

3

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.

Oli
  • 293,335
  • 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