So, this is my first time installing Ubuntu on my hard drive, and I'm running into some problems.

Until a couple of hours ago, I had 4 partitions in my hard drive:

XP

Vista

7

Data partition

I backup up the XP and Vista partitions which weren't of any use lately, and booted a Live-USB with Ubuntu 12.04.

On the "Install 12.04 LTS" partition manager thingy I deleted the XP and Vista partitions (which where sda1 and sda2 on the partition table), leaving around 260GB of free space. There, I made 3 partitions: 8GB for root, 4GB for swap, and 80GB for home. (I know, I probably made a mess out of the partition table.)

I then proceeded to install Ubuntu, hoping to be able to move back and forth between 7 and Ubuntu, but GRUB doesn't seem to recognize my Windows installation. I read some forums, and tried two things, neither of which actually worked:

I added a # to GRUB_HIDDEN_TIMEOUT=0 in /etc/default/grub to at least be able to see the GRUB screen when booting, and effectively, Windows 7 wasn't there.

I ran boot-repair from my Live-USB, but it didn't solve the problem either. Anyway, I got the boot info at least, which I'm linking right away: paste.ubuntu.com/5589763/

So, this is my family computer, and I'm probably getting killed in the morning if I don't sort this out. Any advice is truly, truly appreciated. Thanks in advance!

I don't have the installation DVD, since I downloaded it years ago from the Windows Student thingy and later deleted it, and now I don't have access to Windows 7! Where should I start?
–
gonzalobbMar 6 '13 at 8:26

run this in terminal (sudo update-grub) and post the output
–
shantanuMar 6 '13 at 8:28

paste.ubuntu.com/5589882 (i don't know how to format it here). I got lucky, and apparently HAD backed up the Windows 7 disc before erasing. I run it, choose repair, but the 7 installation doesn't appear =/ Both the Windows 7 and Data partitions are visible and accesible from Ubuntu, though.
–
gonzalobbMar 6 '13 at 9:06

don't worry about that, you need to repair the windows7 so that you can boot into windows7. Windows7 will not recognize ubuntu(don't worry). Just recover grub after windows7 repair process (google it) so that ubuntu will set the MBR and pick windows7 in os list.
–
shantanuMar 6 '13 at 18:26

2> If it doesn't detect Windows7, then there is a conflict in UEFI/EFI/Legacy bootloader. Probably Ubuntu is installed in UEFI BIOS, while previous Operating Systems are installed in LEGACY bios, which means you'll have to reinstall Windows 7 again.

When you install a newer release of Windows on a computer with an older release of Windows, it combines the boot files (replaces the older Windows boot files with the newer, on the same partition). So your Windows 7 boot files were probably all on the XP partition.

This is always the case, because the Windows bootloader merely looks for the partition with the boot flag set, and there can be only one of these. So... now that you've deleted the boot files, Windows 7 doesn't appear to be there.

How you fix it? That's more a Windows issue, but you could try restoring the Boot directory, the bootmgr file from your XP backup, and then trying to run Windows repair. (if you combine these with your Win 7 install, then set the bootflag on it as well).