Tag Archives: dual boot

How to set Windows to boot as the default in the boot loader

Many people like to boot Windows as standard/default OS in dual-boot setup instead of Ubuntu, so in this tutorial, I will show you that how you can do this:

In a terminal, type this command to display all your grub entries:

fgrep menuentry /boot/grub/grub.cfg

Copy the underline entry – for example Windows 7 in this screenshot.

Edit the /etc/default/grub file:

sudo nano /etc/default/grub

Change the entry:



GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"

Note:paste the entry you want (including the quotes)

Then type:

sudo update-grub

That’s it, now Windows 7 will boot as default OS:

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂


Install Windows 7 alongside a pre-existing Ubuntu

I purchased a Dell Laptop last week for work related tasks and it was shipped with pre-installed Ubuntu 11.10. After receiving the laptop, I want to install the Windows 7 on another partition (To use it as my Primary OS). I start searching the internet and every guide I found suggest to install Windows and, after that, Ubuntu but I want to keep all these setting that it shipped with. In this tutorial, I will try to show you the procedure that I followed to achieve this goal:

First, back up your data and boot the system from Ubuntu desktop CD and select “Try Ubuntu” :

Press “Ctrl+Alt+T” for terminal and write this command:

sudo gparted

Select your desired parition to free up the disk space for winodws 7, Right click on it and select “Resize/Move“:

Mention the Size that you want to free:

Right-click on the free space and select “New“:

Select file system as “NTFS” and click on Add:

After that click on the tick mark sign and hit “Apply“:

Then reboot the system and install Windows into the NTFS partitions:

Then boot the Ubuntu CD again and re-install grub, first add the boot repair repository:

sudo add-apt-repository ppa:yannubuntu/boot-repair

Update the local package index with the latest changes made in repositories:

sudo apt-get update

Install and launch the boot repair by using this command:

sudo apt-get install -y boot-repair && boot-repair

Click on the recommended option:

It will take about 15 to 20 mins and if everything goes well, it will show you the success message:

After reboot, your system will present you with the grub menu:

Hope this will help you!

Please Remember me in your prayers!

Enjoy 🙂

%d bloggers like this: