I had Ubuntu and Win 7 on different partitions. And then i formatted partition which containing Win 7 and reinstall Win 7. And then dual boot screen disappeared. I'm following tohuwawohu's answer.

My HDD partition is sda5 which Ubuntu installed.

Now i'm trying to boot my computer, after BIOS loading , i'm getting GRUB command prompt screen (screenshot) directly.

TO solve it, i'm following this steps .

REsult is like this : enter image description here

3 Answers 3


I assume those steps relate to grub, not grub2. With grub2, the file structure has changed, so there are no more stage file in the grub directory. In this thread, under #13, you will find a description how to restore grub2 from a LiveCD. EDIT2: It has the following steps (credits drs305):

  1. Boot the Ubuntu Live CD (Try without installing).

  2. From the Desktop, open a terminal - Applications, Accessories, Terminal.

  3. Determine your normal system partition - sudo fdisk -l (That is a lowercase L).

    If you aren't sure, run df -Th. Look for the correct disk size and ext3 or ext4 format.

  4. Mount your normal system partition:

    sudo mount /dev/sdXY /mnt

    • If you aren't sure if you mounted the correct partition, once it's mounted run "nautilus /mnt" to inspect the partition. If it is the correct partition, you should see the normal Ubuntu folders such as /bin, /boot, /etc, /home, etc
    • Example: sudo mount /dev/sda1 /mnt
    • Note: The partition to mount is normally the partition on which Ubuntu was installed: sda1, sdb5, etc. If you have a separate /boot partition, use the device on which the /boot partition is located. Grub 2 works best when installed in the MBR of the drive to which BIOS boots. Also remember that you mount the partition (including the number) in this step, but you do not include the partition number when you run the "sudo grub-install" command later.
    • Note: GRUB 2 counts the first drive (X) as "0", but the first partition (Y) as "1"
  5. Only if you have a separate boot partition:

    sudo mount /dev/sdXY /mnt/boot

    with sdXY being your /boot partition designation.

  6. Reinstall GRUB 2:

    sudo grub-install --root-directory=/mnt /dev/sdX

    Do NOT include the partition number.

  7. Example:

    sudo grub-install --root-directory=/mnt /dev/sda

    • Note: Substitute the device on which Ubuntu was installed - sda, sdb, etc. Do NOT specify a partition number.
  8. Unmount the partition *:

    sudo umount /mnt

    • Note: If you mounted a separate /boot partition, unmount it first:

      sudo umount /mnt/boot

  9. Reboot.

  10. After reboot: Update the grub menu using sudo update-grub

Here's another description. Good luck!

EDIT1: Some more information is also available in the Ubuntu Wiki on grub2.

  • Im not sure which partition ill use : pastebin.com/qXEeipCd . Also please look at to last addition of question. thank you.
    – Eray
    Nov 21, 2011 at 14:06
  • 1
    AFAIK you don't have to name a certain partition, since grub2 has to be placed in the MBR of the hard disk. So you will just have to choose the correct hard drive. Your partition list looks as if there's just only on HDD: /dev/sda. EDIT: There's only one linux partition /dev/sda5 so i assume you don't have a special boot partition.
    – tohuwawohu
    Nov 21, 2011 at 14:11
  • 1
    There's only one linux partition /dev/sda5 so i assume you don't have a separate boot partition.
    – tohuwawohu
    Nov 21, 2011 at 14:18
  • 1
    Here's some info how to proceed on the grub prompt.
    – tohuwawohu
    Nov 21, 2011 at 15:03
  • 1
    Yes - but both can't be true, so there's no other way than to re-check the system. If grub tells there's no sda5 partition, you need to check if something has changed or if there's a problem with the partition table.
    – tohuwawohu
    Nov 21, 2011 at 16:13

I had a similar error , how I fixed it was like this: I used Boot repair, a tool to fix grub

Boot into the LiveCD and use the following commands

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

and launch Boot repair, choosing the right options from the GUI


check the below link


You must log in to answer this question.

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