Ubuntu – Dual boot to windows 7

dual-bootgrub2windows 7

i just installed ubuntu 12.10 alongside windows 7 but now my computer automatically boots to ubuntu. i want windows 7 as my default operating system. when i start up my laptop it shows me no settings or any screen asking me what operating system to use. the ONLY way for me to boot into windows 7 not is to hit f12 at startup to bring up which to boot from, select my hard drive then bring up the grub loader in ubuntu, then select windows 7 loader. when i go into msconfig in windows 7 ONLY windows 7 is listed under the operating systems… i see no ubuntu at all. please help this is really annoying!

Best Answer

It sounds like you're dual booting Windows 7 and Ubuntu from the same hard drive. If that is the case you can go into Ubuntu and edit your grub settings by opening a terminal and pressing CTRL+ALT+T.

There you can inputsudo gedit /etc/default/grub This will open the grub settings changer and the topline should read GRUB_DEFAULT=0 saying that your default OS is the first one (0-th one) in the list.

To find out number what your Windows 7 installation is you can open another terminal window and input sudo gedit /boot/grub/grub.cfg. (It is not recommended that you edit this file as your edits will be erased from here if grub is updated) Here you can see number what your W7 installation is. Just press CTRL+F and search for windows 7. Now count the number of menuentries above and you will have your magic number.

Going back to the /etc/default/grub file change the number of GRUB_DEFAULT=0 to whatever number your W7 installation is. Save and close.

Now open up a new terminal window and run sudo update-grub.

You can now reboot and by default it should boot into your W7.

If this does not work you can also try Boot-Repair and Grub-customizer.

Good luck.

Related Question