1.First,Remember which system need to boot at first.if the windows order is 3

2.backup  grub file before we edit it.

#cd /etc/default

#sudo mv grub grub.back

#edit this line

GRUB_DEFAULT="0"
change it to GRUB_DEFAULT=saved


3.sudo update-grub


Default boot order,

4.sudo grub-set-default 2