Can only boot to linux in dual-boot system

Hello, I have had a problem with my system. I started off with a Ubuntu Unity, 14.10, Windows 7 dual boot. It worked great but I wanted Gnome instead. I tried something which failed but caused no problems. Instead, reinstalling it with Ubuntu Gnome, I downloaded this drive partition tool and made the partition but I noticed there was some free space so I merged it with my windows partition. It all went a bit wrong, I ended up in this Grub rescue thing and I managed to boot from a USB stick and installed Ubuntu Gnome and that's all working well.

However, I can't boot to Windows. All the stuff still exists because I found the partition and I could see all my program files. How can I get my Windows back (if it was up to me I'd just move to Linux completely but it's not just me who uses the machine)

Thanks,
Callum

You will need a windows disk

run your installation disk select your language and keyboard layout.
then choose repair computer > advanced > command prompt

diskpart

starts diskpart

sel disk 0

selects first disk. (I would suggest unplugging all other drives for simplicity)

list vol

lists partitions on selected disk
From this list you want to find the FAT32 volume take note of the volume number
(you will also want to take note of your windows partition drive letter for later)

sel vol 4

selects appropriate volume
vol 4 is an example but this number wants to be the number of the fat32 volume

assign letter=t:

assigns letter t: to volume 4

exit

exits diskpart

now you want to repair the bootloader

cd /d t:\EFI\Microsoft\Boot\
bootrec /fixboot

Now to rebuild the BCD.
I normally recommend backing up you BCD first (If one still exists, if the following command says the file does not exist, skip the step and continue)

If you want to back it up

ren BCD BCD.bk

renames BCD to BCD.bk

bcdboot c:\Windows /l en-us /s t: /f ALL

takes files from your C drive and copies them to the boot partition in english US language

now a couple of things to note here c: won't always be your windows partition pay attention when in diskpart to check which partition is your windows one and if it is a different letter then use that instead of c: (this will be an issue if you installed linux before windows)
the second thing is that you way not be using the US locale for me here in aus it would be en-au in england it would be en-gb in germany it would be de so make sure you get the correct locale as your windows install (There is a list of language codes here if you're unsure) So make sure you use your language code and replace en-us

Then reboot and remove your installation media.

Then if all went well you should boot into windows.

When you reboot go into your BIOS/UEFI and change the boot order to your linux partition first, then save.

Boot into linux.

Now you will want to update your grub boot list to include your windows

From terminal run

sudo update-grub

Then when you reboot grub should come up and give you the options to boot into windows or into Ubuntu.

You can change the timeout value for grub to wait for input by editing the "GRUB_TIMEOUT" line in the grub config

gksu gedit /etc/default/grub

Good luck.

I don't have a windows disk. Is there a way of getting around it

download an iso and put it on a USB or disk.

unfortunately you need the disk to load a working command prompt with access to both local and fresh files.

So download an ISO, burn it to a USB, then boot from that?

Will that get me back to how it was before?

not just booting from the usb but once you boot from the usb follow the instructions I provided above
if everything goes well than yes.

I'm honestly not willing to guarantee anything when it comes to windows. :-(

http://www.tomshardware.com/news/win7-windows-7-mbr,10036.html

I'll give that a go

Do you know where I could get the ISO. Struggling to find it.

Windows 7 Home Premium, Service Pack 1

[EDIT] For those who haven't found it, it's here:
http://www.microsoft.com/en-us/software-recovery

When I try to download the ISO on the Microsoft website ( http://www.microsoft.com/en-us/software-recovery )
I get this:
Unsupported Product
The product key you entered appears to be for software that was pre-installed on a device. Please contact the device manufacturer for software recovery options.

Is there another source
[EDIT] Yes there is, I found one on pirate bay instead

Fixing the Windows MBR will destroy Grub as the boot loader.

What does the error look like when you try to load Windows?

were you originally loading from the Grub Menu, or were you booting from the Windows boot loader?

Grub and the windows boot loader should be on separate partitions. Modifying one shouldn't effect the other.
Worst case scenario if it does destroy grub you could always re-install grub from a live CD.

Also if you can't get the ISO from MS you may need to think of "alternate" methods (you after all are not using it to install windows just to repair)

It depends on where GRUB is installed. If it's in the MBR it doesn't matter how many partitions you have, it's in the MBR.

These instructions will overwrite the MBR.

The MBR (Master Boot Record) doesn't exist ON any partition, it is what defines them.

/fixmbr fixes mbr. /fixboot only writes new boot sector to defined partition.
in this case which ever partition which was defined as t:

edit: following the toms hardware guide would destroy grub.