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.

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.

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Please boot to Ubuntu and open a terminal. Then execute this command

sudo update-grub

It should solve the problem.

See this question: How can I repair grub? (How to get Ubuntu back after installing Windows?)

share|improve this answer
2  
Thanks a lot! It works :) –  Mateusz Rogulski Oct 2 '12 at 14:44
add comment

Download this file and put it in an usb with UNetBootin or in a cd by right-clicking on the ISO file and clicking on "write to disc".

Then boot the cd/usb on your computer. It should automatically open, in an lxde GUI, a windows called Boot Repair.

Follow the instructions on the window and when you restart your computer, it should be fine. Hope will help.

share|improve this answer
add comment

After booting into Ubuntu try these commands in terminal:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair

and follow boot-repair.

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.