Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 8537  / 2 Years ago, sat, april 9, 2022, 8:41:09

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:



enter image description here



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?


More From » boot

 Answers
5

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




Danger!



This may make your Windows unbootable; to follow the steps below you'll have to insert sudo where appropriate and make sure the NTFS partition is mounted read-write beforehand.





cd /mnt/where-o-where-my-ntfs-be
rm -rf bootmgr Boot BOOTSECT.BAK Recovery
cd && umount /mnt/ntfs1
update-grub



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.


[#37907] Monday, April 11, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bathtusain

Total Points: 380
Total Questions: 124
Total Answers: 111

Location: Trinidad and Tobago
Member since Sat, Apr 9, 2022
2 Years ago
bathtusain questions
Sun, Jul 17, 22, 03:13, 2 Years ago
Sun, Oct 3, 21, 00:24, 3 Years ago
Sat, Apr 22, 23, 00:24, 1 Year ago
Fri, Jul 22, 22, 12:01, 2 Years ago
Sun, Jun 27, 21, 02:31, 3 Years ago
;