0

I had only ubuntu installed on my pc, but I felt like adding another ubuntu (same version) partition so I could have one just for work/study and another one just for personal generic use.

I installed it and it worked out okay, but I found I needed more space on the new created Ubuntu partition, so I booted up from the Live CD, and used GParted to move/shrink/grow the partitions as the Ubuntu's tutorials suggested it was pretty straightforward. But in doing all this I messed up with Grub, so when I start my system it shows:

error: unknow filesystem grub rescue>

What would be the easiest way to recover it so I could have both partitions working? Btw, it wouldn't be a problem for me to lose the partitions if it's the shortest/easiest way.

Thanks in advance.


Ok, so I tried all the grub rescue's commands which were listed here (https://help.ubuntu.com/community/Grub2) , none of them worked. Also, when I entered 'ls' , it would list several (hd0, msdosX) instead of several (hd0, X) . All the Ubuntu's partitions are inside an extended one. If I delete this partition and overwrite it with a new ext4 partition, using the LiveCD, and then use it to install Ubuntu, would it fix grub?

jrg
  • 60,611
LGB
  • 1
  • 2
    http://askubuntu.com/questions/88384/how-can-i-repair-grub-how-to-get-ubuntu-back-after-installing-windows – Tachyons Mar 19 '12 at 15:48
  • The preferred method of repairing gurb is to use boot-repair. https://help.ubuntu.com/community/Boot-Repair . There is nothing wrong with the command line tools in the answer linked by tachyons, just most people find a graphical tool easier. – Panther Mar 19 '12 at 19:00
  • possible duplicate of problems with grub – Panther Mar 19 '12 at 19:01

1 Answers1

0

You may want to learn grub's prompt: in grub menu type e to 'edit', then Ctrl+c to enter grub's command line.

Now, you can enter root (hd<Tab> and grub will display possible devices; having typed (for example) root (hg0,<Tab> you can see possible partiions.

The key point is that you can alter grub's configuration before booting the entry: I believe you need to change root to correct its value before boot. You can not "pollute" your original menu.lst (or grub.cfg) in this way.

Note that root is that place where grub directory is located --- the directory where grub's configuration and stage* and filesystem related etc-etc files are --- typically it is /boot/ (grub/ is under it). In my case I can type in grub command line root (hd0,1)/boot/grub<Tab> and see all files needed by grub.

After booting you wil be able to change/correct grub's configuration.

brownian
  • 166