0

I had Windows 8 installed on my laptop. I then installed Ubuntu 12.04 along on separate partition. After a few days I mistakenly deleted the Ubuntu partition. Now I every time I start my laptop it don't show boot options (F2 & F12). It just gets stuck at a screen showing

unknown file name 
grub rescue>

It's not booting either into Windows nor into Ubuntu.

Rohit
  • 1

3 Answers3

2

mistakenly deleted the Ubuntu partition

Then re-install Ubuntu on that empty partition and problem will be solved (Ubuntu will re-write grub).

If you do not want Ubuntu anymore try search for answers on internet how to fix mbr using Windows CD (cause I'm not expert in that).

  • i tried installing Ubuntu with bootable USB stick but it's not working as my bios is not showing the boot options anymore. – Rohit Sep 13 '12 at 12:50
  • @Rohit Grub have nothing to do with your motherboard Bios. Enter to your Bios setup and re-configure device booting priority by your needs (in this case making USB higher priority than HDD). – user9440008 Sep 13 '12 at 13:01
  • I now it's the problem with my bios which I m unable to configure. Butthisis all because of this gruB thing. – Rohit Sep 13 '12 at 13:08
  • Just do me a favor buddy get me hell outta this thing. – Rohit Sep 13 '12 at 13:11
1

Since you deleted Ubuntu partition, GRUB (which is what shows up with all the OS options) also got deleted.

You can do either of the following:

  • Install Ubuntu again - This will solve your problem.

  • Repairing Windows MBR (Master Boot Record) - After this, you will be able to boot into Windows.

I guess you know how to install Ubuntu. But if you have any problems, ask here or look over at web or at this link: http://www.ubuntu.com/download/help/install-ubuntu-with-windows.

And the link below, provides a tutorial on how to repair windows: Link: http://windows8themes.org/repair-fix-mbr-in-windows-8-using-the-command-prompt.html.


Changing Boot Preferences

  • Keep pressing F2 (the key might be different for different machines) while booting. That should bring up the BIOS.

  • Now you need to find out something like booting preferences (might be located in Boot tab or something like that).

  • Change the first preference to CD/DVD, this will enable you to boot from your repair/install CD/DVD.

  • Alternatively, you can select the first preference to be USB, in which case you can boot via LiveUSB and install Ubuntu again.

green
  • 14,306
0

Let me tell you how I fixed a similar issue I had. This should help you to fix yours too.

I have dual booting Win7 and Ubuntu12.04 which was working perfectly fine. I accidently deleted the extended logical volume(partition 4) when in Windows and there is no boot now with grub rescue prompt after I shutdown Windows.

Configuration of my Single disk with 6 partitions:
partition 1= primary partition;
partition 2= primary partition = Win7;
partition 3= logical drive in extended partition;
partition 4= logical drive in extended partition;
partition 5= primary partition = Unbuntu12.04;
partition 6= primary partition = swap

So now the partition number that grub is searching for a bootfile is (hd0,msdos7) whereas the bootfile is actually located at (hd0,msdos6) due to the partition delete.

You can check this by the command "set" at grub rescue prompt. This shows me that the partition set to boot is (hd0,msdos7).

To show all partitions use "ls":
grub rescue> ls
(hd0,msdos7) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)

Then check for bootfile in each partition:
grub rescue> ls (hd0,msdos7)/boot ... unknown filesystem
grub rescue> ls (hd0,msdos5)/boot ... unknown filesystem
grub rescue> ls (hd0,msdos6)/boot ... grub ... initrd.img-2.6.32-33-generic ... vmlinuz-2.6.32-33-generic....... So now we know the actual bootfile is at (hd0,msdos6).

Now set this bootlocation temporarily in bootloader and boot into the OS:
grub rescue> set root=(hd0,msdos6)
grub rescue> set prefix=(hd0,msdos6)/boot/grub
grub rescue> insmod normal
grub rescue> normal
This boots us directly into the OS.

Once I booted into Windows, I downloaded and used the free windows program AOMEI Partition Assistant Standard Edition 5.5 to restore the deleted volume. After that I restarted Windows all works fine like nothing happened.
Something funny with Windows7 here. Apparently diskpart thinks the primary partitions 5 and 6 are logical drives (diskpart>select disk 0 >list partition) whereas Disk Management shows the same partitions of Ubuntu as primary partitions.