LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot boot ubuntu, stuck in GRUB line-editing (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-boot-ubuntu-stuck-in-grub-line-editing-830088/)

AllShk 09-03-2010 12:56 AM

Cannot boot ubuntu, stuck in GRUB line-editing
 
Hey, guys!
After my last update in my ubuntu, I had a problem. (As almost everytime that I update it)
When I select to boot ubuntu, it doesn't work.
It shows something like:

"GNU GRUB version 1.97"beta 4
[ Minimal BASH-like line editing is supported.For the first word, TAB lists possible command completions.
Anywhere else TAB lists possible device/file completions]
sh:grub> "

And I don't know how to make it work.
I tried to follow this tutorial:
https://help.ubuntu.com/community/Grub2#Rescue%20Mode
but in the line "insmod /boot/grub/linux.mod" I got an error message saying that the file couldn't be found. And if I skip it, when I type "boot" the system reboots and comes to the same place I was before.
I've also tried to set another partitions like
(hd0, 1), (hd0,2) in the line "set prefix ..." but the same error occured

Can anyone help me? :(

jdkaye 09-03-2010 01:12 AM

Hi Allshk,
Is there any particular reason you want to edit the grub menu item rather than simply selecting a menu item to boot into? I'm not quite sure what you're trying to do.
cheers,
jdk

AllShk 09-03-2010 01:22 AM

hey, buddy...
thanks for answering

well... :S
I guess not.
I just wanted to make it boot normally, like it was before.
you know, graphic interface and stuff...
So how do I just boot into it?

I thought the update manager failed to download some stuff and the installation got corrupted

jmc1987 09-03-2010 01:30 AM

What Version of ubuntu are you using?
What version of grub is installed or are you sure grub2 is installed?
If you have grub please post the /boot/grub/menu.lst
If you have grub2 post /boot/grub/grub.cfg.
What hard drives and/or partitioning is your system installed. Ex /dev/sda1.
Post the UUID of your partition(s) your system is installed on. You can run
Code:

sudo vol_id partition
EX: sudo vol_id /dev/sda4

You can use your live CD to boot your system since grub isn't working.

I don't know much about grub2 if you have that installed but I can look into it.

Kenny_Strawn 09-03-2010 02:44 AM

Agreed, jmc1987. The OP needs to tell us what version of Ubuntu they have installed and, more specifically, what version of GRUB they have installed.

bsat 09-04-2010 07:17 AM

Hi Allshk,

Had you instlled ubuntu using wubi ? If yes please note that the steps to restore grub will be different, which are mentioned specifically in the page that you have refered to. Make sure you use (loop0) instead of (hd0,0).

bas

AllShk 09-08-2010 01:37 PM

Hey, guys!
Thank you for answering. I'm sorry for the delay.
Well...

Quote:

Originally Posted by bsat (Post 4087821)
Hi Allshk,

Had you instlled ubuntu using wubi ? If yes please note that the steps to restore grub will be different, which are mentioned specifically in the page that you have refered to. Make sure you use (loop0) instead of (hd0,0).

bas

Yes, I had installed ubuntu using wubi, but I noticed these different steps and followed them correctly. Thanks.


Quote:

Originally Posted by jmc1987 (Post 4086741)
What Version of ubuntu are you using?
What version of grub is installed or are you sure grub2 is installed?
If you have grub please post the /boot/grub/menu.lst
If you have grub2 post /boot/grub/grub.cfg.
What hard drives and/or partitioning is your system installed. Ex /dev/sda1.
Post the UUID of your partition(s) your system is installed on. You can run
Code:

sudo vol_id partition
EX: sudo vol_id /dev/sda4

You can use your live CD to boot your system since grub isn't working.

I don't know much about grub2 if you have that installed but I can look into it.

Hey, bro...
I'm not sure about some answers. Anyway...

I think ubuntu version was 9.10 before my updating attempt.
I don't know how to tell you the grub version, cause these files menu.lst, grub.cfg don't seem to be found. If it helps, the title is "GNU GRUB version 1.97"beta 4")
about the partitioning, I don't know cause I can't run these commands in this "grub line editing".
ls returns:
(loop0) hd0 hd(0,1) hd(0,2) hd(0,3)

for additional information, I have a Dell Inspiron that comes with the Vista OS in the C: drive and a restoring partition (E:). I've installed ubuntu using wubi and I didn't change system stuff... I didn't even know what grub was. The only thing I did was some updating.

sorry for the lack of information

how about it now? =/

colorpurple21859 09-08-2010 08:00 PM

What you type in should look similar to what is below. The partition number should match the disk partition number that windows is installed on. windows will be on C drive regardless of what disk partition number windows is installed on. Your windows system might be on partitions 2 or 3.
Quote:

1. ls

2. set prefix=(hd0,1)/boot/grub #note maybe (hd0,2) or (hd0,3)

3. set root=(loop0)

4. set

5. ls /boot

6. insmod /boot/grub/linux.mod

7. linux /vmlinuz root=/dev/sda1 loop=/ubuntu/disks/root.disk ro #note maybe sda2 or sda3 to match #2 above.

8. initrd /initrd.img

9. boot
When you get ubuntu booted running update-grub should fix the problem.

AllShk 09-12-2010 04:06 PM

Hey, dude!

Thanks for the tip.
I've tried again following your instructions

but the same problem occured
when I type "boot" the system goes back to the POST screen and then to the screen where you choose the OS to boot from (Vista or Ubuntu)

I think it happens because this line
6. insmod /boot/grub/linux.mod
returns: "error: file not found"

What am I supposed to do?

Format and reinstall the OS again? =/

colorpurple21859 09-12-2010 07:44 PM

here is a link to something you can try.
http://www.omaregan.com/?p=608

AllShk 09-13-2010 12:31 PM

Wooow!
It worked perfectly!
Thank you, bro!

It couldn't be easier than that.
=]

colorpurple21859 09-13-2010 07:23 PM

glad it worked. please marked thread solved.


All times are GMT -5. The time now is 10:50 PM.