Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 14046  / 2 Years ago, tue, september 20, 2022, 8:57:42

This is the first question I have ever asked the Ubuntu Community.



I'm fairly new to Ubuntu, but I understand the basics and know how to navigate the Terminal. I also know how to search the existing solutions before asking for help. I have scoured the Internet high and low and learned much of how Grub2 works. But nothing has helped me to solve my problem.



My problem is this: I have a computer that has three hard drives. It previously had Windows XP, but I upgraded to Windows 7. I also installed Ubuntu 12.04 LTS (Precise Pangolin).



During my installation of Windows 7, there was a failure and I had to restart the installation. Afterwards, I installed Ubuntu. After some trouble removing all traces of the XP OS (Ubuntu auto-detected it, but not Windows 7) I got the two OSes working flawlessly. Or, almost.



When booting up, Grub2 used to display Ubuntu, Ubuntu Recovery Mode, Other Versions of Linux, memtest, followed by Windows 7 (loader) on /dev/sda1 and Windows 7 (loader) on /dev/sdb1.



I eventually removed Recovery Mode, Other Versions, and Memtest. Now, when I run:



sudo update-grub


I get this print-out:



Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-26-generic
Found initrd image: /boot/initrd.img-3.2.0-26-generic
Found Windows 7 (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sdb1


I would like to remove "Windows 7 (loader) on /dev/sda1", as it is a broken entry that shouldn't exist, and must have been installed during my first Windows 7 attempt.



I cannot find a Windows 7 entry in /etc/grub.d folder And I don't know where to look.



Here is a layout of my hard drives:



/dev/sda1/ (1.82 TiB), NTFS ("Media")

/dev/sdb1/ (100 Mib), NTFS ("System Reserved")
/dev/sdb2/ (149 GiB), NTFS ("Windows 7")
/dev/sdb3/ (149 GiB), Extended (" ")
/dev/sdb4/ (145 GiB), ext4 (" ")
/dev/sdb5/ (4 GiB), linux-swap (" ")

/dev/sdc1/ (488.28 GiB), NTFS ("Downloads")
/dev/sdc2/ (488.28 GiB), NTFS ("AltMedia")
/dev/sdc3/ (886.45 GiB), NTFS ("Personal")
unallocated (2.09 MiB), unallocated


What I think has happened: Windows 7 installed first and badly. I installed it again. First, there was Windows XP to guide where the bootloader went to so it was put on /dev/sdb1/. But, the second time no such guide existed so the machine put another bootloader on /dev/sda1/. sda1, by the way, is the only partition on a 2TB drive. No boot record partition appears to exist according to gedit. I'm not sure where Grub2 is getting this information from. But, there it is.



Is there anything somebody can do to help me? Or, is there any more information I should add?


More From » 12.04

 Answers
5

A quick solution if sda is a external drive



I don't know whether your /dev/sda hard drive is an internal or an external drive. If it is an external drive, Unplug the external drive before running update-grub2 command. This should help quickly.



Solution:



Mount the /dev/sda1 drive. (I assume you can do that very easily). Then in that drive look for a folder named Boot and a file named bootmgr. Remove both the folder and file. Then run update-grub2 command again.



You might want to install grub2 again. As I see your Ubuntu installation is at /dev/sdb, the commands will be



sudo grub-install /dev/sdb
sudo update-grub


What was the cause of the problem:



Grub2 looks for the Windows boot files for detecting Windows entries. Though you removed Windows 7, the Windows 7 boot files aren't removed (which are "Boot" folder and "bootmgr" file). And as Windows 7 boot files are there, grub2 simply assumes that, there are Windows 7 installation also. Hence the dual entry.


[#37154] Wednesday, September 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
quivedge

Total Points: 223
Total Questions: 116
Total Answers: 124

Location: Slovenia
Member since Wed, Apr 6, 2022
2 Years ago
;