Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

This question was already asked once but it hasn't helped me in my trouble.

I have Ubuntu and Windows 7 on my laptop. Usually I use Windows 7 but GRUB always boots Ubuntu by default. My /ect/default/grub contains the following lines:


I did run sudo update-grub after I changed the values for these variables. Also I made sure that my grubenv file existed and had right permissions (with save_env GRUB command).

And still... it doesn't work! GRUB alwas intends to load Ubuntu despite I choosed Windows last time.

What else do I lose sight of?

BTW, I don't have neither RAID nor LVM volumes (at least I don't have LVM manager installed).

share|improve this question
possible duplicate of How to get grub2 to remember last choice? – stephenmyall Dec 21 '12 at 20:22
It's not a duplicate. I gave the link to the question you have mentioned. And the answer doesn't solve my case. So it's rather an extension of the quetion. – krokoziabla Dec 22 '12 at 8:21

You can use Grub Customizer for the work it's very simple, just check the box to remember last choice, install it with the commands:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
share|improve this answer

Press Alt+F2 type gksudo gedit /etc/default/grub press Enter and enter your password.

you will see this line GRUB_DEFAULT=0

You can change the default from 0 to any number, corresponding to the entry in the Grub bootup menu (first entry is 0, second is 1, etc.) so if windows 7 is the 4th entry enter the value to 4

Make your changes, press Ctrl-S to save and Ctrl-Q to exit.

Important: Open a terminal with Ctrl-Alt-T and type sudo update-grub to apply the changes you just made.

share|improve this answer
But I don't need Windows 7 always to boot. And I will not see GRUB_DEFAULT=0. As I have said, in my /etc/default/grub GRUB_DEFAULT=saved. – krokoziabla Dec 22 '12 at 8:18
check out this page it explains the situation you are facing – Mukund Dec 22 '12 at 9:47
Thank you for the link. Unfortunately it describes the steps I have performed already. Only one thing was new to me - GRUB_SETDEFAULT=true didn't work for LVM and RAID /boot partition. I checked whether lvm manager was installed on my Ubuntu - it wasn't. And also I don't have any RAID volumes on my laptop. – krokoziabla Dec 22 '12 at 13:22
It is important having /boot lvm based. check out this "[link][^2]".[^2]:… – Mukund Dec 24 '12 at 9:19

My situation was similar. I had a custom grub entry (using a 40_custom file in /etc/grub.d) for a chromium OS install. I had set GRUB_DEFAULT=saved and GRUB_SETDEFAULT=true, but it never saved the entry. Turned out that I needed to manually put a "savedefault" line into the 40_custom file in order for that entry to save the default. Works like a champ now.

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.