I have a dual boot system with Ubuntu 12.04 and Windows 7, using GRUB2 (with Burg) as boot loader.
For some reason, the Windows installation shows up twice in the boot menu:
Ubuntu GNU/Linux, with Linux 3.2.0-24-generic
Ubuntu GNU/Linux, with Linux 3.2.0-24-generic (recovery mode)
Windows 7 (loader) (on /dev/sda1)
Windows 7 (loader) (on /dev/sda2)
If I look in my partition table, /dev/sda2
is C:\ of the Windows installation, and /dev/sda1
is the "System Reserved" partition (which, IIRC, is Windows' own bootloader). Furthermore, gparted shows /dev/sda2
- but no other partitions - with a boot
flag:
What is going on here? I'd like to have only the entries for Ubuntu and one entry for Windows in my boot menu - how do I remove one of them?
You are correct that Windows 7 puts it's "boot" partition on
/dev/sda1
by default, but it is possible to get Win 7 to put the everything on its "root" partition too -- e.g. by installing to a pre-formatted NTFS partition.Perhaps you have tweaked Windows in the past such that the bootloader/bootable flag went on
/dev/sda2
? Can you successfully boot from both Windows entries? If so, it's safe to delete one of them.How to remove the entries
That should do it - obviously I haven't tried on my dual-boot system(s). Please let me know if it doesn't work and I'll either give you more dangerous methods or maybe look in the
grub
source to see how it detects Windows partitions for a definitive answer.I've it already solved persistently enough for my needs. I've changed /etc/grub.d/30_os-prober script a little:
start at line 150 (just add variable and condition to check if windows 7 has already been found):
change to:
Should be working at least till grub won't be updated. Enjoy.
EDIT: Ubuntu 12.10
30_os-prober changed a little, but using the same if after the following lines:
works well.
Just edit the Burg configuration file via Terminal: 1.) Open Terminal 2.) Type
3.) Find the menuentry "Windows..." and just after --class os add:
Where "group_secondary" is a unique name to group a group of operating systems together. If you look at the file, you'll see that the Linux kernels have:
Now you should have Windows and Windows Recovery look like:
4.) The MOST IMPORTANT PART!!! Save!!! Now you can either REBOOT or Start :
5.) On the selection screen press "F" to collapse the folders.
***SIDE NOTE: When collapsed, Burg will use the FIRST menuentry in the file as the default in collapsed mode.
sudo nano /boot/grub/grub.cfg Then comment the second Windows entry (sda2), i.e., put a '#' from where the entry begins. It will remove the entry without affecting your files. Same goes for burg as well. Just replace grub with burg in the command.