1

I installed Ubuntu 10.10 and Windows 7 on my hard disk and I had one boot loader for both of them, which is Grub2. I had some problems with my bios and hard disk that Led to my issue with Grub. I installed my previous Linux on the sda5 partition and hence I want to recover its Grub.

And please provide me with some resources on how to recover the Grub 2?

EDIT: i followed the instructions in this site in response to 'suicideducky' answer and i found that this is the device (hd0,4) but when trying setup (hd0,4) it returned Error 12: Invalid device requested

Update: i sucssefuly done what is in the above with site but while the boot time the grub give me and error called Error 17

0

1 Answer 1

2

Boot up an Ubuntu 10.10 Live CD and open a terminal. Then type this:

sudo mkdir /mnt/sda5
sudo mount /dev/sda5 /mnt/sda5
sudo grub-install --root-directory=/mnt/sda5 /dev/sda

(hd0,4) in GRUB 1 corresponds to (hd0,5) in GRUB 2, which Maverick uses, and both correspond to the first logical partition of your first drive, which is /dev/sda5 in normal (non-GRUB) Linux parlance.

(Credit: this forum post)

10
  • Could not find device for /boot: Not found or not a block device. :(
    – Wazery
    Feb 9, 2011 at 0:57
  • Sorry, I'm used to chrooting into the partition first, which is a bit more than you probably want to do. I updated and corrected my answer on the assumption you aren't going to do that. Feb 9, 2011 at 0:59
  • 1
    hmm; I looked up Error 17, and one blogger says that it might be a messed up device order. How that happens I don't know, but I have seen it before. You can perhaps try the advice here: stringofthoughts.wordpress.com/2009/05/24/… . Only the part about fixing the drive order that is; for GRUB still follow the advice above, if it turns out that was indeed the problem. Feb 9, 2011 at 1:23
  • 1
    Mind giving the output of running sudo fdisk -l from the live CD? Feb 9, 2011 at 1:48
  • 1
    Glad you were able to find and fix the problem! Feb 10, 2011 at 16:31

You must log in to answer this question.

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