5

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:

  1. 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.
  2. 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!

6
  • repair windows 7 (not install), then recover ubuntu grub
    – shantanu
    Mar 6, 2013 at 8:23
  • 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?
    – gonzalobb
    Mar 6, 2013 at 8:26
  • run this in terminal (sudo update-grub) and post the output
    – shantanu
    Mar 6, 2013 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.
    – gonzalobb
    Mar 6, 2013 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.
    – shantanu
    Mar 6, 2013 at 18:26

3 Answers 3

2

Boot from Ubuntu LiveCD, do a sudo os-prober in terminal to see if all operating systems are listed.

1> If yes, then you are safe. the boot-repair should work:

https://help.ubuntu.com/community/Boot-Repair

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.

Enjoy :)

1

Try giving the following command in terminal and see if that fixes the issue:

sudo update-grub
2
  • Nope, it doesn't, I already tried. I'm pasting the result in case it's of any use. I have no idea how to format it here properly, though, so: paste.ubuntu.com/5589882
    – gonzalobb
    Mar 6, 2013 at 9:10
  • Have you installed Grub on MBR (sda) or in the root partition (sda1) ?
    – VasPle
    Mar 7, 2013 at 13:13
0

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).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .