Windows 7 is not shown in GRUB menu after 13.04 install
After much reading, I figured out the problem. Turns out it had nothing to do with UEFI.
My Windows 7 drive had some RAID 0 metadata on it. My PC does NOT have a RAID array, but my OEM set it up this way for some reason. Apparently this metadata interferes with GRUB2's ability to search the drive. Therefore you have to remove the metadata.
If your PC does have a RAID array, this may not work and you may lose your data. Either backup your data or ask someone who knows more about RAIDs.
First, I backed up the metadata, so I could replace it if Windows didn't boot afterwards:
dmraid -D -r
dmraid(8) explains this more.
Then I did the following commands:
dmraid -an
dmraid -si
dmraid -E -r
update-grub
GRUB was able to see Windows after this.
Related videos on Youtube
JustV
Updated on September 18, 2022Comments
-
JustV over 1 year
I installed Ubuntu 13.04 on a secondary hard drive, which has succeeded. But there is no GRUB entry for Windows 7 as an option. Boot-Repair and update-grub did not appear to help. http://paste.ubuntu.com/5667558/
I should note that I didn't realize my PC has UEFI, which I've since disabled.
I want GRUB on sdb.
-
user68186 almost 11 yearsThe boot-repair seems to see some FAKE-RAID NTFS partitions. something like '/mapper/pdc_XXXXXXX`. I have no idea how to fix it though.
-
JustV almost 11 years@user68186 Turns out this was the problem. See my answer below.
-
-
Stefano Mtangoo almost 11 yearsThen it seems you windows boot partition have got problem
-
Stefano Mtangoo almost 11 yearsstrange! I just did it in my terminal and I can see Windows 7. What was the last thing you did to your installation?
-
JustV almost 11 yearsLet me remember: I installed Ubuntu on my second drive. UEFI was enabled, but after install I disabled it and ran Boot-Repair with default settings. Later I tried
sudo update-grub
. I can't think of anything else. Do I need to mount Windows' drives before I runupdate-grub
? Could that be why it doesn't see it? -
JustV almost 11 yearsI just tried mounting them and it didn't help.
-
Stefano Mtangoo almost 11 yearsyou don't need to mount them. Have it ever worked before?
-
Stefano Mtangoo almost 11 yearsWait a minute, was your Win7 installed with UEFI mode enabled? Ubuntu should follow Installation mode of Win7!
-
JustV almost 11 yearsI don't know how my Win 7 was installed, since it came installed on this system. UEFI was enabled in BIOS when I looked.
-
Stefano Mtangoo almost 11 yearsSo did you install Grub/Ubuntu with UEFI?
-
JustV almost 11 yearsI did not see anything about UEFI during install. It is installed in Legacy mode:
[ -d /sys/firmware/efi ] && echo "Installed in EFI mode" || echo "Installed in Legacy mode" Installed in Legacy mode
-
Stefano Mtangoo almost 11 yearsIf its installed in legacy mode and does not see Win7 then its probably b'se your Win7 is in UEFI mode. Reinstall using instruction here: help.ubuntu.com/community/UEFI#Installing_Ubuntu_in_EFI_mode
-
JustV almost 11 yearsOkay, I re-enabled UEFI mode and Windows boots fine when I boot to sda. I will reinstall, but there is a problem: According to what I've read in that article, BIOS does not boot the install disk to EFI, so how can I do that?
-
Stefano Mtangoo almost 11 yearshelp.ubuntu.com/community/… help.ubuntu.com/community/UEFI#Creating_an_EFI_partition From the link above!