LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reinstalling GRUB? (https://www.linuxquestions.org/questions/linux-newbie-8/reinstalling-grub-860886/)

leyo 02-05-2011 10:37 AM

Reinstalling GRUB?
 
Hi,

On my netbook I dual boot windows xp home and Ubuntu 10 netbook edition. I just used Partition Master to readjust my windows partitions and when rebooting I got the following error:

Quote:

error: unknown filesystem
grub rescue >
Using this

https://help.ubuntu.com/community/Grub2#Rescue Mode

I managed to boot into Ubuntu, but I'm stuck on reinstalling GRUB. The help page says use this command line:

Quote:

sudo grub-install /dev/sdX
I got error messages saying it was a bad idea to install GRUB to a partition instead of the MBR.

Confused! Any explanation/guidance appreciated, I don't really understand how it all works.

thanks in advance

bigrigdriver 02-05-2011 01:54 PM

Quote:

I just used Partition Master to readjust my windows partitions
In what way did you "readjust"? Did you remove one or more partitions? That would change the partition numbers that follow the removed one and would send grub into a fit.

Quote:

sudo grub-install /dev/sdX
I got error messages saying it was a bad idea to install GRUB to a partition instead of the MBR.
The instructions in the link you provided clearly state that you must not specify a partition number in the "sudo grub-install" command. So, assuming your hard drive is /dev/sda, and Ubuntu in installed in the third partition (/dev/sda3), then the correct command is "sudo grub-install /dev/sda", and not "sudo grub-install /dev/sda3" which would install grub in the partition instead of the MBR.

In the link you provided, did you scroll down to "METHOD 3 - CHROOT" and follow the instructions step by step? They should allow you to get grub working properly again after readjusting your partitions.

leyo 02-05-2011 03:56 PM

Thanks very much for the reply! I'd actually managed to figure it out myself just now (with some more reading around) but it's really helpful to understand what went wrong. I did remove a windows partition, which I see is what screwed up grub.

Learning curve...


All times are GMT -5. The time now is 10:07 AM.