3

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:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

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).

3 Answers3

2

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.

Edit: If you put GRUB_SAVEDEFAULT=true, the savedefault line will be added automatically when you run update-grub

todpike
  • 21
1

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
1

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.

Mukund
  • 2,122