After today's update, Ubuntu asked me to replace some files and I blindly accepted. After I restarted PC after the update, I saw duplicate entries in the grub menu:
Here's the image of the grub customizer.
Apparently, Grub Customizer can not save edited information.
Is there a way to remove duplicates from Ubuntu 12.04 grub menu and set Windows 7 on first position?
For permanent fix:
and Windows will be on top even after updates
While a
sudo update-grub2
should remove the duplicate enties, to bring the Windows menu-item at first position additionally do :sudo gedit /boot/grub/grub.cfg
Cut the portion of text starting from
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7...
to
}
### END /etc/grub.d/30_os-prober ###
and pest it just before
menuentry 'Ubuntu, with Linux..
save the file and reboot.
You have to perform steps(1-4) every time
grub-pc
package-update or a kernel-update happens to keep Windows menu-item at first place.i think you've already been helped. But just in case a newbie needs an easy way to change the order of the grub menu and even delete (careful here!!) entries, there is a nice GUI way in linux to do so, with the grub-customizer.
Go to the terminal and type:
Then look up the newly installed grub customizer, start it and you can move windows or ubuntu upwards / downwards in the list.
You can also remove old unused kernel packages and this effectively removes also the grub entries and frees harddrive space. To do that you need to check what kernels are installed using:
And then you can remove the kernel image using:
where version_number is the kernel version you want to remove. I recommend you leave at least two kernel versions available just in case something goes wrong.
I have just went from an upgrade from 11.04 to 12.04 LTS.
While I cannot find an "expected" listing of
/etc/grub.d/
for different OS versions anywhere, from another computer I have access to, the original 11.04 entries are:On the updated PC, after the update, I have:
Obviously, I've gotten some entries there which are duplicates - so not even running
sudo update-grub2
as @Samik suggest does not remove duplicate entries in this case.The answer for this case would obviously be to remove the duplicate
_os-prober
and_linux
entries, and then runningsudo update-grub2
.