Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I realize that this is a duplicate of a question asked before, but in that question the asker managed to find his live CD and no real answer appeared, thus I am re-asking it.

I managed to screw up my GRUB by deleting two linux partitions on my hard drive from windows. After this, GRUB gives the error "partition not found", and gives me the grub-rescue> prompt. The only command I have found to work in this is 'ls', which spits out my partitions. I would use the live CD fix, but I am in India, and all my live CDs are back home in the US... What I've got is an internet connection, a 4GB flash drive with Flow OS installed (which I am currently using but can wipe if need be), and a working laptop that I can borrow. What should I do?

share|improve this question
    
I also should mention that after some working with the grub-rescue> prompt, I determined that grub was indeed on the partition that I deleted. If I could just boot into the other Ubuntu partition that I have to reinstall it, this would be great. –  gkanwar Aug 28 '10 at 13:01

3 Answers 3

up vote 5 down vote accepted

Well, I managed to have this one fixed about 20 minutes after I posted, but I forgot to update this until today. Here's the details:

I managed to boot using the grub rescue prompt with the help of the Ubuntu grub2 reference using these commands:

  1. ls
  2. set prefix=(hdX,Y)/boot/grub
  3. set root=(hdX,Y)
  4. set
  5. ls /boot
  6. insmod /boot/grub/linux.mod
  7. linux /vmlinuz root=/dev/sdXY ro
  8. initrd /initrd.img
  9. boot

This got me into my Ubuntu partition, at which point I was able to do "grub-install /dev/sda". And that's it! I can't believe it took me about an hour before I finally found this solution. Hope it helps someone else!

share|improve this answer
    
Great, nice you could fix it! And the documentation on the wiki improved greatly since I last saw it, which is also great (could be useful for people with other distros too). –  JanC Aug 30 '10 at 14:54

Did you delete the partitions that contained the grub binaries & config? If not, you can probably still boot from the rescue prompt...

Also, you can use Unetbootin to put the Ubuntu live CD on an USB stick (this can be done from almost any linux or Windows system).

share|improve this answer
    
No, I did not, but I have no idea how to boot from the rescue prompt. If I could do that, it'd be ideal. –  gkanwar Aug 28 '10 at 12:52
    
Well, you were right. I just needed to find the commands to boot from the rescue prompt. The details are in my answer. Thanks! –  gkanwar Aug 29 '10 at 17:45
    
+1, since this helped address the immediate problem. –  nik Aug 29 '10 at 18:06

You can get the SuperGrubDisk and maybe create a Live USB with Unetbootin on some handy Windows machine.

This Boot Problems Wiki page on SuperGrubDisk site is also a good reference to keep handy.
Of particular interest may be How to fix GRUB.

share|improve this answer
    
This probably would have worked, but the rescue prompt worked out easier in the end in my case. Thanks anyway! –  gkanwar Aug 29 '10 at 17:46
    
In that case you should accept Jan's answer. –  nik Aug 29 '10 at 18:05

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.