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 had Win7, Debian 6 Wheezy, and OpenSUSE 12.1 all installed on my machine.

I decided I wanted to get rid of OpenSUSE and install Linux MInt 12, so I tried to delete the OpenSUSE partition + swap disk (sda5 and sda6 on my machine).

The OpenSUSE partition deleted, but the swap partition did not.

Besides the swap partition not deleting, the partition names have changed (Debian was on sda7 and its swap on sda8). So, Debian is now on sda6. This is an issue, as the Debian partition was my 'boot' partition (I think that's the correct phrase for it...).

So, grub boots up and crashes with something like:

Loading Grub...

Error: File Not Found
grub Rescue>

So, after some searching on the interwebs, I found I can type:

set prefix = (hd0,6)/boot/grub
insmod normal
normal

and this will get me to my normal 'grub' boot screen (I.e. I can pick the OS to boot, etc).

However, I'm unable to find out how to fix grub. When in Debian, I tried:

sudo mount /dev/sda6 /mnt
sudo grub-mkdevicemap
sudo grub-install --boot-directory=/mnt /dev/sda
sudo update-grub

However, this just doesn't work..

On my Debian partition, I have /boot/grub with what I think are the correct files (at least, things 'look' right to me...but I'm not expert).

Anyway, does anyone have any idea how to get grub back in working order??

I'd appreciate any help you guys can provide!!

Cheers

Jarrett

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I think you may have run those in the wrong order.

I'm not 100% sure - but try it in this order:

  • grub-install /dev/sda
  • grub-mkdevicemap
  • update-grub
share|improve this answer
    
worked like a charm, thanks @pbr! –  Jarrett May 3 '12 at 13:11

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.