Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had the idea to dual boot Win 7 and Ubuntu and what I did was the following:

Made a clean install of win 7 using all of my hard drive, next I used the Ubuntu live cd and gparted to partition my drive to be the following:

/dev/sda1 ext4 20GB (Linux root)  
/dev/sda2 ntfs 100GB(Win7)  
/dev/sda3 ext4 350GB(Home)  
/dev/sda4 extended 4GB(swap)  

The thing is, when installing ubuntu I deleted the partition win 7 creates for its boot sector and recovery and then resized the drive to look like what I mentioned, and Ubuntu installed GRUB to the MBR.
When GRUB boots I can see Ubuntu but not Windows, how can I chainload it? Or should I fix the windows mbr with the windows 7 installation disk and try to set the dual boot from there?

I don't really care which one of the 2 bootloaders I end up using, I just want the dual boot to work out.

Thanks

share|improve this question
    
Ok, so I've got my recovery cd but it doesn't detect my windows installation, should I procede to using the startup repair commands (fixboot,fixmbr) ignoring that it can't find windows or is this NOT supposed to happen? –  user115137 Dec 18 '12 at 23:47
add comment

5 Answers

up vote 0 down vote accepted

Updating the grub installation with sudo update-grub should fix it. When it runs, it searches for bootable images on each partition. For example, here is the output when I run it:

andy@ubuntu:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.5.0-20-generic
Found initrd image: /boot/initrd.img-3.5.0-20-generic
Found linux image: /boot/vmlinuz-3.5.0-19-generic
Found initrd image: /boot/initrd.img-3.5.0-19-generic
Found linux image: /boot/vmlinuz-3.2.0-33-generic
Found initrd image: /boot/initrd.img-3.2.0-33-generic
Found linux image: /boot/vmlinuz-3.0.0-17-generic
Found initrd image: /boot/initrd.img-3.0.0-17-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Windows Recovery Environment (loader) on /dev/sda1
Found Windows 7 (loader) on /dev/sda2
Found Windows 7 (loader) on /dev/sda4
done

If that doesn't work, make sure you have a Live CD or USB to hand and try the following:-

  1. Check that the partition is actually readable and hasn't been corrupted (happened to be me about 2 months ago). The easiest way to do this is to run GParted and check the list of partitions that appear. (Testdisk may recover any lost partitions)
  2. If everything's OK, boot to Windows Recovery and use Startup Repair
  3. After making sure Windows will boot, restart and boot into your Live CD.
  4. Use grub-install to reinstall grub.
share|improve this answer
    
When I run this command it only finds the linux loader, not the windows one. Actually this was the first thing I did, forgot to mention it in my post sorry, but it didn't solve my problem. Thank you though –  user115137 Dec 17 '12 at 8:36
    
@user115137: I've updated my answer to include additional steps. –  Andy E Dec 17 '12 at 9:16
    
Using GParted , I CAN see my ntfs partition with no apparent errors or corruptions. Now my issue is, when booting the windows recovery disk, it doesn't detect my windows install. Is this normal? Should I proceed to use the commands to restore the windows bootloader even though it doesn't detect my windows install? –  user115137 Dec 18 '12 at 23:36
    
@user115137: you could try, but I don't think the startup repair would work. You could also try using testdisk to restore the deleted mini-partition that Windows annoyingly creates. Alternatively, if your Windows installation is clean anyway, just re-install it for the quickest solution. –  Andy E Dec 18 '12 at 23:48
    
If I try to recover the windows bootloader even though windows is not detected, am I risking getting locked out of my computer for good? Considering windows doesn't boot, and I'd have to boot from a live cd just to recover GRUB and try this again? –  user115137 Dec 19 '12 at 0:19
show 2 more comments

Your Windows 7 BCD is most likely broken since you changed partition layout. I suggest you to use a Windows 7 CD and try to use the recovery options and choose "Startup Repair".

Windows 7 usually does not overwrites GRUB by itself. Instead it just fixes its Boot loader configuration (BCD). If it worked, go back to Ubuntu and call

sudo update-grub

Then you should have Windows 7 in your list again.

share|improve this answer
    
If he runs the Windows startup repair, he won't be able to get back to Ubuntu, which will mean he'll need to use additional software in Windows to restore Ubuntu as a boot option, or use a Live CD. –  Andy E Dec 17 '12 at 8:25
    
Hmm yes, I believe I'd have to repair Windows boot and lock Ubuntu out of boot options, but when using the Ubuntu live cd (once windows boot has been restored) all I'd have to do is regain GRUB? –  user115137 Dec 17 '12 at 8:43
add comment

Apart from other Answers you can take a look for following links:

  1. WindowsDualBoot
share|improve this answer
add comment
  1. Use a Windows disc this way: https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader , until you get direct access to Windows
  2. then use Boot-Repair to recover your GRUB menu
share|improve this answer
add comment

I appreciate allof the answers, they really gave me valuable info as in what to do. Basically what I did was reinstall windows on the partition I had it on, it wrote the bootloader to the MBR, next I just used the Ubuntu Live CD and the instructions for reinstalling grub and alas, grub recovered and identifies the windows loader on startup thus solving my Dual Boot issue.

I hope this post helps anybody else with the same problem. Thanks community (:

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.