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 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! Thanks.

share|improve this question
Have you tried restoring Grub? – Mendhak Dec 2 '12 at 16:26
can you please tell me how to? im new to ubuntu – Megaeverything Dec 2 '12 at 17:41

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.

share|improve this answer
one problem... when i type "sudo gedit /etc/default/grub" the file is blank... and when i type "sudo gedit /boot/grub/grub.cfg" theres only 1 windows 7 entry and there’s nothing above it except for a bunch of code... – Megaeverything Dec 4 '12 at 0:25
boldBUMPbold – Megaeverything Dec 10 '12 at 16:54
You should be able to add GRUB_DEFAULT=0 to your /etc/default/grub file and just save and close. If there is nothing above your windows 7 entry i presume that it should be number 0 in the order. – DrA7 Dec 12 '12 at 20:58

Do you have Windows and ubuntu in two different hard drives? You have to go into the boot settings in your BIOS and then set the HDD containing GRUB as the primary one and the one with windows 7 as the secondary one. Just switch the order of the 2 HDDs.

share|improve this answer
no there on the same hard drive – Megaeverything Dec 3 '12 at 18:45
Then you should repair your grub, try following DrA7's answer. – dan_s Dec 3 '12 at 18:55
his comment dosnt help. i have no config file... – Megaeverything Dec 5 '12 at 20:38
It's simple just follow the instructions for Boot-repair. – DrA7 Dec 12 '12 at 21:00

Well just do this:

As your computer start press


And then you will have a menu just choose what you want the linux or the windows.


Or just edit your BIOS

share|improve this answer

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.