I have a dual boot on my computer of Windows 7 and Xubuntu 12.10. The Linux boot is 1st and the Windows 2nd. I would like to reverse the boot order in the GRUB menu. I need to know the steps to go about editing GRUB. I do most of my work on Windows and need it to be 1st so I can boot up and not watch it.


I dont know if you can change the order of the menu in an easy way, but you can set the default entry.

In terminal

sudo -H gedit /etc/default/grub

I don't know what your grub menu looks like but let's say you have:

  • Ubuntu
  • Memory test
  • Windows 7

in this case, if you want Windows 7 to boot by default you replace GRUB_DEFAULT=0 with GRUB_DEFAULT=2

Save the file and in terminal:

sudo update-grub

and reboot

  • should be gksu gedit
    – endolith
    Mar 11 '14 at 0:36
  • also 13.10 doesn't have etc/default/grub?
    – endolith
    Mar 11 '14 at 1:15
  • 2
    Is there a way to know the number assigned to the OS without having to reboot and see the order at boot? Apr 7 '16 at 15:18
  • 1
    This doesn't allow you to edit menu entries, just things like the timeout. The other answer has what you want. Apr 25 '16 at 6:01

The menu entry of "Windows 7" in /boot/grub/grub.cfg may look like this:

menuentry "Windows 7 (/dev/sda1)" { #it's depend on your config

You can also write GRUB_DEFAULT="Windows 7 (/dev/sda1)" to /etc/default/grub to avoid the order problem in grub.cfg.

  • Just what I was looking for today! Thanks a lot bro :)
    – Spirit
    Dec 7 '13 at 13:34
  • 9
    The grub.cfg file is auto-generated, is it really advisable to edit it? Apr 7 '16 at 15:17
  • @HammanSamuel "GNU GRUB Manual 2.04 > 6.1 Simple configuration handling" (link) it says "changing the order of menu entries or changing their titles may require making complex changes to shell scripts stored in /etc/grub.d/. This may be improved in the future. In the meantime, those who feel that it would be easier to write grub.cfg directly are encouraged to do so (see Booting, and Shell-like scripting), and to disable any system provided by their distribution to automatically run grub-mkconfig." May 13 at 13:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.