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,023
  • 25
  • 98
  • 183
mac
  • 3,901
  • Just as an advice to new users, DONOT delete recovery partition and install ubuntu on it. If you does, then well, you have to go through this painful procedure! – mac Oct 05 '12 at 13:08
  • And the painful procedure is 1)Some times system repair from windows DVD may not work 2)Its because C partition may not be active - In my case atleast this happend - so fix is - First make it active - http://sevenforums.com/tutorials/71432-partition-mark-active.html 3)Now try system repair from windows DVD.

    Then try live CD to fix the grub

    – mac Oct 07 '12 at 06:35
  • I just shared my overall experience and fixes here - http://rajeshksv.blogspot.in/2012/10/how-to-fix-dual-booting-issues-windows.html – mac Oct 07 '12 at 11:10

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
  • 76,649
  • It didnot work :( – mac Oct 04 '12 at 18:14
  • How did you try this? – Anwar Oct 05 '12 at 05:00
  • Booted normally into Ubuntu and ran those two commands. Do I have to do differently or from Live CD image ? – mac Oct 05 '12 at 06:24
  • Check that you have windows installed still. Mount every partition and look for a Boot folder in any partition. If their isn't any folder in any of the partitions, then you don't have Windows boot manager. In that case ,first repair windows with windows 7 disk and then use Ubuntu live cd to bring back ubuntu – Anwar Oct 05 '12 at 08:28
  • I am sure, I haven't touched windows partition during installation. And in Ubuntu, I can see windows partitions as well. And I can see a Boot folder, are there any chances that my Boot folder may got corrupted ? – mac Oct 05 '12 at 08:41
  • In that case, I think so. There should be also a bootmgr file in that partition. I recommend running a startup repair from windows 7 disk and repair ubuntu with live cd. You can get question about doing so in the site. – Anwar Oct 05 '12 at 09:14
  • Actually, I deleted the windows recovery partition and installed Ubuntu on it. Looks like this caused the issue. http://askubuntu.com/questions/110558/is-it-necessary-to-delete-the-recovery-partition Damn! – mac Oct 05 '12 at 10:19
  • Yes, i think so. I'll be updating my answer to address this issue – Anwar Oct 05 '12 at 10:20
  • I am not able to repair using windows DVD :( I tried to repair following this - http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/ but in second screenshot, windows 7 option is not appearing. Even load drivers didnt help.I tried startup repair option in 3rd screenshot - It didnt work , then I followed command line method. First command worked bootrec /fixmbr but second command bootrec /fixboot failed. It says "the volume does not contain a recognized file system" . Please help me. I need my windows back badly :( – mac Oct 06 '12 at 13:15
  • 1
    Finally got the solution. In case if someone else also faces similar problem, here is the solution

    1)Some times system repair may not work

    2)Its because C partition may not be active - In my case atleast this happend - so fix is - First make it active - http://www.sevenforums.com/tutorials/71432-partition-mark-active.html

    3)Now try system repair. It works :)

    So be careful while deleting recovery partition. If you delete it, make the main partition active and then try system repair.

    Thanks guys :)

    – mac Oct 07 '12 at 06:26
  • I just shared my overall experience and fixes here - http://rajeshksv.blogspot.in/2012/10/how-to-fix-dual-booting-issues-windows.html – mac Oct 07 '12 at 11:09
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.