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.

Kali Linux GRUB boot menu
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

Tagged with: , , ,
23 comments on “How to change the default boot order of GRUB on a Kali Linux dual-boot system
  1. Fabio says:

    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

  2. pal07 says:

    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 says:

      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.

  3. hui says:

    Terima kasih atas informasi ini

  4. Laiek says:

    It worked for me thanks for the information

  5. Rodrigo says:

    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″

  6. Rodrigo says:

    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.

  7. Daniele says:

    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.

  8. Walid says:

    hello i just installed kali linux into my computer, and when i try to run /etc/default/grub i get Persmision denied

  9. Thehairyhippy says:

    Worked perfect thanks

  10. Tharindu says:

    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 says:

      You must be doing something wrong! I tested this again on the latest release and it works. Maybe try using a different editor.

  11. Ethan says:

    Just manully go to the directory. It won’t ask for permission or anything

  12. Nick says:

    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.

  13. Mark says:

    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.

  14. yanger says:

    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?

  15. narendra singh says:

    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 says:

      Did you update-grub after modifications? If you’re not getting the grub menu you might have to re-install it.

  16. Aayush says:

    You just saved me from loosing my important data. Thanks a lot <3

  17. Amir says:

    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

Leave a Reply

Your email address will not be published. Required fields are marked *

*