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.

I was trying to install a Linux OS to an partition alongside Windows 8 and Ubuntu, but I got confused and I just canceled the installation. Then I booted into Windows 8 and deleted the 20GB partition that I created. When I restarted the computer I got stuck at the following error message:

error: no such partition
grub rescue>

I don't know what to do. I do not want to lose any data. Please help!

share|improve this question
add comment

3 Answers

Sounds like you need to fix your Master Boot Record (MBR); check out this link and I think it will help you resolve this problem!

How To Fix Windows 8 MBR (Master Boot Record)

share|improve this answer
    
If the computer shipped with Windows 8, it boots in EFI mode and does not use a boot loader in the MBR. AFAIK, the instructions in the linked-to article will not work on such a system; however, I'm not an expert on Windows recovery. –  Rod Smith Sep 23 '13 at 18:57
add comment

This answer assumes your computer boots via EFI, as do most computers that shipped with Windows 8. If you installed Windows 8 on an older computer and it boots in BIOS mode, Rick Dunn's answer is likely to be more helpful.

Most computers include a built-in boot manager, which you can access by pressing Esc or a function key soon after booting. Unfortunately, there's no standardization in how to get to this menu, so I can't be more precise about it. I recommend you check your documentation or early boot messages for clues, or just keep rebooting and hitting function keys until you find it. With the menu found, you should be able to boot Windows.

From there, how you proceed depends on what you want to do:

  • If you want to try installing Linux again, you can just do so. (In fact, you could skip booting into Windows first and just re-run the Linux installer.)
  • If you want to remove GRUB, try opening an Administrator Command Prompt window and typing mountvol S: /S. This mounts the EFI System Partition (ESP) as S:. You can then use the Command Prompt window to delete the S:\EFI\ubuntu directory. Thereafter, you shouldn't see the GRUB prompt again.
share|improve this answer
    
Apparently, there is some other problem which i can't really explain now but, i need to remove GRUB. I tried your "If you want to remove GRUB, try opening an Administrator Command Prompt window and typing mountvol S: /S. This mounts the EFI System Partition (ESP) as S:. You can then use the Command Prompt window to delete the S:\EFI\ubuntu directory. Thereafter, you shouldn't see the GRUB prompt again." Fix but when I type in mountvol S: /S i get "The parameter is incorrect error" Any help? –  Lucas Smith Sep 25 '13 at 23:57
    
Your own answer refers to GRUB commands that refer to partitions via the (hd0,msdos#) format. This means you've got an MBR-partitioned disk, which in turn means you must be booting Windows in BIOS mode. Thus, you should refer to Rick Dunn's answer and work from there. –  Rod Smith Sep 26 '13 at 14:58
    
What exactly is MBR, is it related to GRUB?, If I fix MBR would it delete GRUB? Thank you! –  Lucas Smith Sep 26 '13 at 19:43
    
The Master Boot Record (MBR) is the first sector of the hard disk. It holds both the old-style MBR partition table and the first stage of a BIOS-mode boot loader. In your case, "fixing the MBR" means re-installing the Windows boot loader, which will bypass GRUB. –  Rod Smith Sep 26 '13 at 23:01
add comment

I already found out how to fix the GRUB rescue thing, even though i have some odd problem with it, if you can help, the link is GRUB, Gay Robust Unreliable Bootloader

Anyways, the fix for the error goes like this:

first, do:

ls

Then try doing ls (hd0,msdos3/msdos4/msdos5) and so on until you find your Ubuntu msdos.

Then all you do is:

set root=(hd0,msdosNUMBER)

set prefix=(hd0,msdosNUMBER)/boot/grub

insmod normal

normal

and it should work correctly.

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.