Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have win 7 and linux mint 14 installed. Is it possible to modify the GRUB Menu to show Windows as the first option instead of Linux, which it currently does. Mainly so that during boot it starts Windows by default.

share|improve this question
Gosh...linux 14?? When did it get released, moreover when was linux-13 released? moreover.... :D I guess you mean Ubuntu 14. – beginer Jul 14 '14 at 12:34
linuxmint.com/rel_nadia_whatsnew.php Linux 14 => Linux mint 14 – sunbabaphu Jul 14 '14 at 12:35
Anthon Earlier in the question it was mentioned Linux 14 , which made me wonder when did Linux kernel version 14 get released. – beginer Jul 14 '14 at 13:18
@beginer sorry I missed that edit. – Anthon Jul 14 '14 at 16:25
@Anthon hah :D cheers man.... – beginer Jul 14 '14 at 18:29
up vote 4 down vote accepted

If the order of your boot menu is important (and not just that Windows boots by default), and you don't have anything bootable besides Linux Mint and Windows (like OSX, BSD) you can do:

cd /etc/grub.d
mv 30_os-prober 09_os-prober

as the alphabetical order of the files in /etc/grub.d, determines in what order they are processed. Then you run sudo update-grub¹ to generate the /boot/grub/grub.cfg file, which determines the menu ordering.

If you just want to have Windows boot you can also change /etc/default/grub and change the entry




and run sudo update-grub. 4 is the normal entry for Windows after 0 for Mint, 1 for the submenu with older versions of Mint, 2 for memcheck and 3 for memcheck via a serial interface. Your setup might be slightly different, but you can count (starting from 0) while in the grub menu, or just try and change if your guestimate is off.²

There is third alternative you might want to consider, and which I myself prefer. This is to to change your /etc/default/grub so that it will automatically boot the system you last selected, if you don't select a different menu entry by hand. For that you change the line




and run sudo update-grub

¹ I tended to forget the name of the update-grub command often trying grub-TAB and hope the resulting expansions showed me the grub-something command I needed to run. That was until I realised that it says what to do at the top of /etc/default/grub file I was editing anyway. Of course once I found out how to look the command name up, I never forgot....
² As @derobert indicated, you can also use a string that matches the menu entry you want to select. This is the only documentation I have found about that feature.

share|improve this answer
Note that GRUB_DEFAULT can be a string as well, the full title of the menu entry. This will be much more robust than presuming Windows is always option #4. – derobert Jul 14 '14 at 17:16
@derobert that is good to know. The robustness of did vastly increase some time ago (at least on Ubuntu) when the sub-menus were used to stow the 'old' kernels, but explicit is better. The non-robustness of hard-coding was one of the reasons for me to use GRUB_SAVEDEFAULT – Anthon Jul 14 '14 at 17:21
Thanks! i tried only the second option, and it worked!.. just one thing: i used sudo update-grub instead of sudo update=grub... i dont know if both will work. – sunbabaphu Aug 24 '14 at 12:40
@sunbabaphu update=grub was a typo, I corrected it, thanks for pointing it out. – Anthon Aug 24 '14 at 12:53

You can follow the steps given in Linux Mint itself. Linux Mint tutorials.

share|improve this answer

It is pretty simple , first you have to locate the grub.cfg file, in Ubuntu it will be under /boot/grub/grub.cfg, make sure you take a back up of this file before editing.

Open the file with any text editor of your choice in sudo mode, eg sudo vi path/grug.cfg

In this file there will be menu entries , which represents each item in the boot menu. Find the menu entry corresponding to windows - note a menu entry is a set of lines.

Find a line called GRUB_DEFAULT. Now there are two ways of doing this. 1)change the value of GRUB_DEFAULT to corresponding position of windows menu item like 0 , 1 or what ever it is. 2)or cut paste the windows menu item to the corresponding position of the current value in grub_default.

CAUTION : Don't corrupt this file, if something goes wrong , replace this file with the backup.

menuentry 'Ubuntu, with Linux 3.13.0-30-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-30-generic-recovery-3aaa1f6c-e78d-4b56-bb71-a250d1338ea6' {
                insmod gzio
                insmod part_msdos
                insmod ext2
                set root='hd0,msdos1'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3aaa1f6c-e78d-4b56-bb71-a250d1338ea6
                  search --no-floppy --fs-uuid --set=root 3aaa1f6c-e78d-4b56-bb71-a250d1338ea6
                echo    'Loading Linux 3.13.0-30-generic ...'
                linux   /boot/vmlinuz-3.13.0-30-generic root=UUID=3aaa1f6c-e78d-4b56-bb71-a250d1338ea6 ro recovery nomodeset
                echo    'Loading initial ramdisk ...'
                initrd  /boot/initrd.img-3.13.0-30-generic
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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