How to make windows boot loader as default login in dual boot?
In this tutorial we will describe how to make your windows boot loader as the default login in dual boot mode or configuring grub to automatically select windows:
—-Ubuntu and most other Linux distributions now use the GRUB2 boot loader. You can change its settings to select a default operating system, set a background image, and choose how long GRUB counts down before automatically booting the default OS.
—–the main configuration file of most linux OS is the /boot/grub/grub.cfg file. It is automatically created by running the ‘sudo update-grub’
Your own GRUB settings are stored in the /etc/default/grub file. Edit this file to change GRUB2 settings. Scripts are also located in the /etc/grub.d/ directory. There is also an os-prober script that checks the systems internal hard drives for other installed operating systems “Windows, other Linux distributions, Mac OS X, and so on ” and automatically adds them to GRUB2 menu.
When you run the update-grub command, GRUB automatically combines the settings from the /etc/default/grub file, the scripts from the /etc/grub.d/ directory, and everything else, creating a /boot/grub/grub.cfg file that’s read at boot.
In other words, to customize your GRUB2 settings, you’ll have to edit the /etc/default/grub file and then run the sudo update-grub command.
EDIT THE GRUB CONFIGURATION FILE
Open the /etc/default/grub file for editing in a text editor. For this run the following command
– For editing this file u must be root user
sudo nano /etc/default/grub
Choosing the Default OS: Change the GRUB_DEFAULT= line. By default, GRUB_DEFAULT=0 uses the first entry as the default, change the number to 1 to use the second entry, 2 to use the third entry, or so on. You could also use GRUB_DEFAULT=saved and GRUB would automatically boot the last operating system you chose each time you boot. You can also specify a label in quotes. For example, if you had an operating system named Windows 7 (loader) in your OS list, you could use GRUB_DEFAULT= Windows 7 (loader)
Save a Default Operating System: If you choose GRUB_DEFAULT=saved, you also need to add a GRUB_SAVEDEFAULT=true line, otherwise it won’t work.
For making your changes to work u should run sudo update-grub after u have saved the edited file.