Fire up a terminal and first type:
fgrep menuentry /boot/grub/grub.cfg
This lists all the bootable operating systems on your machine. Now copy the entry you want to be default which is in your case Windows 7 (loader) (on /dev/sda1)
. Note I have assumed it is the sda1 partition, if not please copy Windows 7 (loader) (on /dev/sda2)
. Copying in the terminal can be done by Shift+Ctrl+C.
Now, type:
sudo gedit /etc/default/grub
Now, find the line which says GRUB_DEFAULT=0
and replace it with GRUB_DEFAULT=Windows 7 (loader) (on /dev/sda1)
or /sda2
if that is the case.
Close gedit and come back to the terminal and type:
sudo update-grub
That's it!
Note: The reason I gave such a long answer in contrast to davidgo
's shorter answer is that when you do kernel updates, you'll have those older kernel versions in the lines below so X=5 might mean Windows now but some Ubuntu version later. This ensures no more tinkering even with kernel updates.
Source