How to restore Windows7 after restore ubuntu bootloader?

Posted by Mateusz Rogulski on Ask Ubuntu See other posts from Ask Ubuntu or by Mateusz Rogulski
Published on 2012-10-02T14:17:51Z Indexed on 2012/10/02 15:53 UTC
Read the original article Hit count: 311

Filed under:
|
|

At first I will describe my situation in a few points:

  1. I have installed Windows7, and then Ubuntu 11.04 on my machine. Then everything works fine and at start of system I have screen from linux where I can choose the system.
  2. Then I reinstall Windows7 and install Windows 8 on other partition. Then I can choose between Win7 and win8 when I start system.
  3. Then I need my Ubuntu back so I want restore my bootloader from Ubuntu. I boot Ubuntu from USB and in terminal write this commands:

    sudo fdisk -l
    

Then I get:

/dev/sda1               1          13      104391   de  Dell Utility
/dev/sda2              14        2805    22425601    5  Rozszerzona
/dev/sda3   *        2805       41968   314572800    7  HPFS/NTFS
/dev/sda4           41968       60802   151282688    7  HPFS/NTFS
/dev/sda5              14        2445    19530752   83  Linux
/dev/sda6            2445        2805     2893824   82  Linux swap / Solaris

Next commands:

sudo mount /dev/sda5 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo chroot /mnt
grub-install /dev/sda

I get Installation finished. No error reported.. And when I start my machine I have old Ubuntu start screen to choose system. Ubuntu works well. But There are no Windows 8 option.

But my primary problem is when I choose Windows 7 I have:

error: no such device ...
error: no such disk

so I have no idea what can I do. I really need both systems to work.

Any help would be appreciated.

© Ask Ubuntu or respective owner

Related posts about grub2

Related posts about Windows