2

I have Windows on my machine and then installed Ubuntu 12.04 using USB. I was not getting the option to boot into windows, so I ran boot-repair but still I am not getting option to boot into windows. What can be the issue ?

Edit: I have deleted my recovery partition (some 20GB) and installed Ubuntu on it.

Elder Geek
  • 36,752
mac
  • 4,001

2 Answers2

1

I've gone through your log file posted there, and It seems unfortunately the Other OS searcher script isn't working or missing executable bit.

  1. Boot to Ubuntu and open a terminal with Ctrl-Alt-T shortcut.

  2. Execute this command:

     sudo chmod +x /etc/grub.d/30_os-prober
    
  3. Then run this command:

     sudo update-grub
    

OP says, this doesn't work.

If it doesn't work, I think grub is failing to detect Windows boot files. The most possible cause of this failing is losing Windows. (It was indeed the case as OP confirmed in a comment).

I suggest to use Window 7 disk to repair Windows boot issue and then use the Live CD to fix grub

Hope this will fix the problem.

Anwar
  • 77,855
1

The problem is there are several possible install modes. UEFI, EFI, and standard. Basically standard is what you get if you shift around your partitions so you can make the grub boot partition one of the first things on disk.

After much experimentation I have found the best way to get everything working is you need both a GPT and an MBR partition table. The reason being if you installed Windows without using UEFI, then it will only be able to read the MBR partition table while booting. While grub will need to read the GPT partition table. In this scenario, you must not install Linux using UEFI mode. With modern bioses, you will see the DVDRAM listed twice. Once with UEFI and once without UEFI. You want to use the without UEFI to install your Linux distribution. However, before installing you will need to prepare your disk. I am assuming you have already resized your partions to make room and created a recovery disk from Windows. Start off with just the standard MBR partition table. If and only if your install complains you need GPT then do the following:

  1. In a terminal run (Replace /dev/sda with whatever drive you are using.) $ su - # fdisk /dev/sda print (Be sure to write this down, or take readable screenshot with your camera.) quit # gdisk /dev/sda w # fdisk /dev/sda Now the hard part, you need to delete the gpt partion recreate the partition table you saw above. Be sure your windows partition is active.
  2. It might not be necessary, but to be on the safe side, reboot.
  3. Using the live dvd/cd, go ahead and install.
  4. At this point your linux partition will boot. Windows should be recognized as well but probably won't boot yet...
  5. Once logged into linux, run fdisk to see if your partition table still exists. If not recreate it.
  6. Now take your windows recovery disk (the one created when you backed up your system). And boot from it.
  7. The windows recovery disk should find your windows system and offer you the option to repair the boot. Do so.
  8. Now you should find that both Windows and your Linux system boot normally.

Note: I have only tried this procedure using Fedora 17. It may well turn out that there are problems unique to Ubuntu.