0

So I read another article on how to fix the grub rescue... which this this one right here: GRUB rescue problem after deleting Ubuntu partition!

So pretty much what I did was this

set root=(hd0,msdos6)  # I tried this with a bunch of other msdosses and hd0s and none of them worked
set prefix=(hd0,msdos6)/boot/grub
insmod normal #this is when I got the error
normal #when i put this in it said 'unknown command

I did this and it kind of failed. I got the error

/boot/grub/i386-pc/normal.mod 

I want to know how to fix this so I may boot up windows. Ubuntu/Linux does not exist on my PC. I do not have a windows cd or a live cd or whatever you use to boot up but I do have an empty flash drive. I could install something on the flash drive maybe to boot my PC up? I'm not too sure. I have searched all over the web no luck :/. I really want to be able to access my windows OS.

1 Answers1

0

It's easy to solve, but you need some tools before you can do it:

  • A Linux system with GRUB. A Live media should do it;

  • A spare USB drive (backup the data from it).

First, boot into the Linux system (it must have GRUB installed!). Use a tool such as GParted to format your USB drive as ext2. It must be ext2*!

When using GParted you should get your USB drive's device file path (should be something like /dev/sdb1). Take note of it, we'll use it.

Open a terminal window and run:

sudo umount -l /dev/sdb1

Replacing /dev/sdb1 with whatever you took note of. If the above command throws you an error such as "device is not mounted" just ignore it.

sudo mount /dev/sdb1 /mnt

sudo grub-install --root-partition=/mnt /dev/sdb

Replace /dev/sdb with what you took note of, but do not put the number (which is probably 1) in the end of the path. Also note the space between /mnt and /dev/sdb.

sudo umount /dev/sdb1

Remove the USB drive from the Linux box and plug it in your computer. Turn it on. When you see the grub rescue prompt, run

ls

That should show you all your drives/partitions. You'll have to find your USB drive. It will probably be (hd1,msdos1). Run ls (hd1,msdos1)/ (don't forget the /). If the output is boot/ then this is the correct partition. If you don't get this output, repeat with all the "msdoses" until you get it. Take note of the right one. I'll use (hd1,msdos1) as the example. Run:

set prefix=(hd1,msdos1)/boot/grub

then

insmod chainload

insmod ntfs

set root=(hdX,Y)

Here, replace (hdX,Y) with your Windows partition (you should know its name already).

chainloader +1

boot

That should boot you into Windows. My mission ends here; you'll have to repair Windows' bootloader but that's none of this forum's business. Hint: look for EasyBCD.

If you can't repair Windows' bootloader for some reason, plug in your USB drive and repeat the last six commands in the grub rescue prompt to boot Windows.

Eduardo Cola
  • 5,817
  • But I do not have access to my linux system in the first place. I deleted the linux partition off of my PC its gone into nothingness. How will I get access to linux if I don't have a CD..? should I put it on my 4GB flash drive then boot up my computer with that? Could you give me a link to the program for it? becuase i'm really not sure how to do that :P i'm sort of a newbie to this whole grub thing. My PC is like all broken I cant boot into windows of linux I may only use my alternate computer which is a macbook. – Toons blood Feb 02 '16 at 12:28
  • Use another Linux computer. First of all, you shouldn't have deleted Linux without a rescue media. – Eduardo Cola Feb 02 '16 at 12:34
  • Oh, I guess i am screwed :/ cant install linux on another computer – Toons blood Feb 02 '16 at 16:07
  • A Live media should do it, install Ubuntu on a USB drive and be happy. – Eduardo Cola Feb 02 '16 at 17:46