Windows 7 is not shown in GRUB menu after 13.04 install

5,728

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.

Share:
5,728

Related videos on Youtube

JustV
Author by

JustV

Updated on September 18, 2022

Comments

  • JustV
    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
      user68186 almost 11 years
      The 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
      JustV almost 11 years
      @user68186 Turns out this was the problem. See my answer below.
  • Stefano Mtangoo
    Stefano Mtangoo almost 11 years
    Then it seems you windows boot partition have got problem
  • Stefano Mtangoo
    Stefano Mtangoo almost 11 years
    strange! I just did it in my terminal and I can see Windows 7. What was the last thing you did to your installation?
  • JustV
    JustV almost 11 years
    Let 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 run update-grub? Could that be why it doesn't see it?
  • JustV
    JustV almost 11 years
    I just tried mounting them and it didn't help.
  • Stefano Mtangoo
    Stefano Mtangoo almost 11 years
    you don't need to mount them. Have it ever worked before?
  • Stefano Mtangoo
    Stefano Mtangoo almost 11 years
    Wait a minute, was your Win7 installed with UEFI mode enabled? Ubuntu should follow Installation mode of Win7!
  • JustV
    JustV almost 11 years
    I 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
    Stefano Mtangoo almost 11 years
    So did you install Grub/Ubuntu with UEFI?
  • JustV
    JustV almost 11 years
    I 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
    Stefano Mtangoo almost 11 years
    If 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
    JustV almost 11 years
    Okay, 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
    Stefano Mtangoo almost 11 years