Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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:

enter image description here

Here's the image of the grub customizer.

enter image description here

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?

share|improve this question
add comment

4 Answers 4

up vote 2 down vote accepted

While a sudo update-grub2 should remove the duplicate enties, to bring the Windows menu-item at first position additionally do :

  1. sudo gedit /boot/grub/grub.cfg
  2. 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..

  3. save the file and reboot.

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

share|improve this answer
    
Samik thank you worked for me –  Levan Jun 5 '12 at 12:47
    
Glad to know that helped, please accept the answer if you are not looking for other alternatives. –  Samik Jun 5 '12 at 14:35
    
The Menuentry 'ubuntu with Linux', there are multiple of those. Which one is right to paste it before? –  denNorske Mar 5 '13 at 10:56
add comment

For permanent fix:

sudo mv /etc/grub.d/30_os-prober /etc/grub.d/07_os-prober

and Windows will be on top even after updates

share|improve this answer
add comment

Mine is set perfectly, but still, the default selected is the third option in the list(memory test) Even though the WONDOWS is on the top of the list. Can anyone please suggest me what to do to make my first option itself(windows, which i have set)as the default selected option?

share|improve this answer
add comment

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:

$ ls /etc/grub.d/
00_header        10_linux      20_memtest86+  40_custom  README
05_debian_theme  20_linux_xen  30_os-prober   41_custom

On the updated PC, after the update, I have:

$ ls /etc/grub.d/
00_header        10_os-prober  30_memtest86+     40_custom
05_debian_theme  20_linux      30_os-prober      41_custom
10_linux         20_linux_xen  30_uefi-firmware  README

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 running sudo update-grub2.

share|improve this answer
add comment

Your Answer

 
discard

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.