In Ubuntu, the boot order is controlled with GRUB. Do the following:
sudo cp /etc/default/grub /etc/default/grub.bak(backup of the conf file, only superuser can do it)
sudo gedit /etc/default/grub(edit the conf file, only superuser can do it)
- Save and close the file in gedit.
sudo grub-set-default xx, where
xxis the number of the boot menu item you want to start be default. The first item has number 0. After doing
update-grub, you’ll see a list of all OS’s that will be included in the menu, so you can count them (start with 0 and count all lines starting with
memtest, if you have it in the menu, takes two lines in the menu, while
update-grub shows only one. Windows is the last item. So add one to the number to start with Windows.
This solution is taken here.