1

I have spent a day trying every suggestion I can find and using the ArchWiki tutorial. No luck. Here's the situation:

I have Ubuntu 14.04 LTS installed on /dev/sdb (installed first). I have Windows 7 installed onto /dev/sda (installed 2nd from a USB stick). /dev/sda1 contains the "SYSTEM_RESERVED" 100mb partition. /dev/sda2 contains Windows. Grub cannot identify Windows 7, and I cannot get a chainloader to work.

Here is what I've tried:

  1. boot-repair (I get an error "No GPT detected, install a small bios partition..." which I did with gparted and still had no luck, even after flagging bios_grub and it being detected.)
  2. sudo os-prober; sudo update-grub; (also sudo update-grub2)
  3. Adding manual entries to /etc/grub.d/40_custom (many many variations):

    if [ "${grub_platform}" == "efi" ]; then
       menuentry "Microsoft Windows Vista/7/8/8.1 UEFI-GPT" {
       insmod part_gpt
       insmod chain
       set root='(hd0,gpt5)'
       chainloader /EFI/Microsoft/Boot/bootmgfw.efi
      }
    fi
    

I have tried chainloader +1, many insmod variants, etc. Essentially I always get "file not found" or "command not found" or "EFI not found" no matter what path I try. (So yes, I can see the Microsoft Windows entry when I boot into grub.)

It might also help to know that when I start the computer, it says "Press F2 to enter UEFI BIOS Setup".

Could someone please give me a simple explanation of what's going on and how to fix it?

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

NAME   FSTYPE   SIZE MOUNTPOINT    LABEL
sda           232.9G               
├─sda1 ntfs     100M               System Reserved
└─sda2 ntfs   232.8G               
sdb           111.8G               
├─sdb1 vfat      94M /boot/efi     
└─sdb2 ext4   111.7G /             
sdc           931.5G               
└─sdc1 ext4   931.5G /media/backup Backup
sdd             1.4T               
└─sdd1 ntfs     1.4T               BigDunn
7
  • I need a screen shot from your gparted or result of sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL;) Nov 1, 2014 at 6:38
  • If Ubuntu is installed in non-EFI mode (purple screen at LiveCD startup) rather than EFI mode (black screen at LiveCD startup), then there's no way to boot Windows 7-- which is presumably EFI -- from the non-EFI version of GRUB. Just a guess, but did you use a tool like unetbootin to create the Ubuntu install disk?
    – Chuck R
    Nov 1, 2014 at 7:21
  • Added above (Kaisy) Nov 1, 2014 at 22:33
  • @Githlar: I honestly don't remember what tool I used. I have had Ubuntu installed for a couple of years. Nov 1, 2014 at 22:36
  • have you tried sudo update-grub
    – Hackaholic
    Nov 1, 2014 at 22:39

2 Answers 2

1

First you need to fix your Windows boot manager:

  1. boot your system using Windows installation CD or via USB flash drive
  2. go to "repair your system"
  3. use command prompt (Troubleshoot ► Advanced Options ► Command Prompt)
  4. type bootrec /fixboot then hit enter
  5. type bootrec /fixmbr then hit enter
  6. exit

This time your system will boot directly into Windows.

Now restore back your grub loader:

  1. boot your system using Ubuntu installation CD or via USB flash drive
  2. Select "Try Ubuntu without installation" option from startup menu
  3. Open a Terminal (use Ctlr+Alt+T)
  4. Your Ubuntu OS installed in sdb2 (thanks your info). Now mount /dev/sdb2 by the following commands:

    sudo mount /dev/sdb2 /mnt
    for i in /sys /proc /run /dev;do sudo mount --bind "$i" "/mnt$i";done
    
  5. Switch to root directory of Ubuntu by using the below command:

    sudo chroot /mnt
    
  6. And run below command to install grub to main partition sdb:

    grub-install /dev/sdb
    
  7. Update grub and exit and reboot your system.

    update-grub
    exit
    sudo reboot
    

Hope this helps.

4
  • Instead of the command prompt, the user can also select automatic boot recovery. This has worked for me several times and is a bit easier.
    – Smile4ever
    Nov 2, 2014 at 8:18
  • @Smile4ever In command-line we can see if any error is facing and easy reply :) Nov 2, 2014 at 8:21
  • 1
    I tried this, it didn't work. I ended up having to update my bios, which was then able to show me a separate Windows Boot Partition it didn't have before. I then booted in and used BCDEdit to add Ubuntu to the boot menu. Now the system boots with Windows and Ubuntu as options, if I pick Ubuntu it chainloads into grub2. Not exactly what I wanted, but works fine. Nov 7, 2014 at 18:03
  • @snd Please write it as an answer but a bit more explanation :) Nov 7, 2014 at 18:21
1

I solved my own problem. Please note that although steps 1 and 2 depend on my hardware, the rest may still be useful.

  1. Downloaded newer BIOS image from the manufacturer website. Thankfully I have a new-ish motherboard, so updates are still being produced (M5A99FX Pro R2.0).

  2. In "Advanced Mode" in the BIOS, under Boot Options, there were now 2 separate Windows choices: "Windows Boot Mgr" and "Windows on /dev/sda". Choose "Windows on /dev/sda" and you boot into Windows.

  3. Once in Windows, I installed Easy BCD 2.2, which allowed me to install an EFI boot menu to replace the standard Windows manager. I added "Ubuntu x64" from the menu. Here I was very skeptical, since I was unable to specify the drive or partition my Ubuntu install was located on, but the program was able to locate the install successfully.

  4. Upon reboot, I am presented with a Windows boot menu that offers "Windows 7" or "Ubuntu 14.04" (the menu looks exactly like the standard "Boot into Safe Mode" menu). If I choose ubuntu, it chainloads into Grub2.0 on my Ubuntu drive, which now also offers me the additional option to chainload back into Windows 7 (os-probe now detects Windows 7 after BCDEdit).

So success-ish. I would prefer to have just one menu take me directly into my desired OS, but this works! Thanks for the help, everyone.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .