How to change the default boot order of GRUB on a Kali Linux dual-boot system
When you install Kali Linux or Backtrack on a Windows machine, GRUB is installed as the default boot manager. By default, GRUB is configured to boot the newly installed Linux installation after a countdown. In this article I am going to show you how to change the default boot OS back to Windows.
First, make a note of the number of boot options in the GRUB menu. In my setup I have 8 entries. You can see from the screenshot below that Windows is the last menu option. Now select and boot into your Linux OS and login as root.
Then open a terminal window and open the /etc/default/grub file using your preferred editor. For Kali Linux you can use:
Leafpad /etc/default/grub
Thirdly, Inside the grub file look for the line GRUB_DEFAULT= . This line defines the default boot entry which is normally set to 0. In most cases this 0 represents your Linux installation. Menu entries are counted from 0. Therefore, if your windows entry on the GRUB menu is 8 you should set this value to 7. Now save the changes and close your editor. Then return back to the terminal.
Finally, on the terminal type following to update the changes and reboot the system!
update-grub
That’s it! Now your Windows should boot after the countdown as the default OS.
Do you like this article or have suggestions ? Then please leave a comment and don’t forget to share, thanks.
Related:
Kali linux 2 post install setup tips
References:
https://help.ubuntu.com/community/Grub2#Custom_Menu_Entries
Fabio
September 6, 2014 - 6:23 pm
I did the same just a few days ago and it worked fine, so this article should be much appreciated. Keep in mind that there is also the possibility to lower grub’s countdown to speed-up booting.
Regards
Fabio
pal07
March 8, 2015 - 2:59 pm
i changed grub time to 0 , and set windows7 as defult os, so whenever i star my pc windows 7 , automatically booting , there is no linux showing,how to boot into linux ??
Sajeeva SA
March 8, 2015 - 3:25 pm
Hi pal07
Try booting from kali DVD/boot-flash drive and editing the /etc/default/grub file!
Also u can try pressing and holding the shift-key when grub is loading.
hui
May 26, 2015 - 9:45 pm
Terima kasih atas informasi ini
Laiek
August 5, 2015 - 6:49 am
It worked for me thanks for the information
Rodrigo
March 3, 2016 - 10:52 pm
This don’t work with me.
My PC is with Windows 10 and Kali
This is my version of Kali:
PRETTY_NAME=”Kali GNU/Linux Rolling”
NAME=”Kali GNU/Linux”
ID=kali
VERSION=”2016.1″
VERSION_ID=”2016.1″
Rodrigo
March 3, 2016 - 11:18 pm
Returning back now… I only could change the boot sequence editing the file in /boot/grub/grub.cfg
I just identify the ###BEGIN of Windows partition, and cut in the above of the partition of Kali.
Daniele
March 29, 2016 - 12:48 pm
Can someone help? I really need to change this but it doesn’t work. When I change the countdown time it works, but the boot order does not.
Sajeeva
April 5, 2016 - 12:42 pm
Hi Daniele
What do u have in the boot order? If u can list it here maybe I can help.
Regards
Walid
July 1, 2016 - 2:26 am
hello i just installed kali linux into my computer, and when i try to run /etc/default/grub i get Persmision denied
Sajeeva SA
July 1, 2016 - 3:39 pm
Hi Walid,
Make sure you’re loged in with root account when editing the file.
Thehairyhippy
July 2, 2016 - 8:54 pm
Worked perfect thanks
Tharindu
October 25, 2016 - 11:56 am
Hey, I try to it but i can’t access.. because terminal give me error message(access denied)… i’m also login root…
So can give me Solution for this…
Sajeeva SA
October 26, 2016 - 10:19 pm
You must be doing something wrong! I tested this again on the latest release and it works. Maybe try using a different editor.
Ethan
December 23, 2016 - 5:16 am
Just manully go to the directory. It won’t ask for permission or anything
el2t
January 21, 2017 - 6:36 am
thanks bro
Nick
May 8, 2017 - 12:45 am
This article really helped and now my PC gives options to boot into Kali before autobooting into Windows if no other option is chosen from the default menu. Want to avoid awkward questions when going through airport security or customs.
Mark
May 23, 2017 - 8:00 am
Works perfect!!
I’ve tried it before with the instructions from soneone else. He said I had to download and install a program. After that multiple things, but didn’t even work for me.
And few days after that I just followed your steps and it worked just like you said. And all that in less then 2 minutes.
Thanks for your help and your time to post this article.
yanger
October 28, 2017 - 9:05 am
i’m trying to adjust grub boot order to automatically choose Live USB Encrypted Persistence (option #5). Because the iso was ‘dd’d onto the system, would I have to rebuild the iso and re-dd it back onto it?
narendra singh
February 4, 2018 - 7:47 pm
i set windows 10 as grub default os nd grub timeout is 5 as before. Doing so my pc automatically boot up windows 10 without showing grub screen to boot kali linux..plz help me…
Sajeeva SA
February 5, 2018 - 5:51 pm
Did you update-grub after modifications? If you’re not getting the grub menu you might have to re-install it.
Aayush
April 9, 2018 - 6:51 am
You just saved me from loosing my important data. Thanks a lot <3
Amir
June 18, 2018 - 1:40 am
I installed kali linux kde 64bit
when i boot from it only page I could see it’s GRUB>
Anyone can help me?
by the way I’ve tryed easyBCD for managing boot loaders between windows and linux it didnt work