Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
2  
askubuntu.com/questions/88384/… –  Tachyons Mar 19 '12 at 15:48
    
The preferred method of repairing gurb is to use boot-repair. 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. –  bodhi.zazen Mar 19 '12 at 19:00
    
possible duplicate of problems with grub –  bodhi.zazen Mar 19 '12 at 19:01
add comment

1 Answer

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.

share|improve this answer
add comment

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.