LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cannot boot Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-boot-ubuntu-793841/)

a13x06 03-07-2010 04:42 PM

Cannot boot Ubuntu
 
I have XP and Ubuntu on my computer and both seemed to be working fine but now when I try to load into Ubuntu I get

Code:

GNU GRUB version 1.97~beta 4
[minimal BASH line editing is supported for the first word. TAB lists possible commandvcompletions. Anywhere else tab lists possible device/file completions

sh:grub>

What did I do wrong? Can it be fixed?

Any help appreciated!!!!

Alex

troop 03-07-2010 05:05 PM

I guess you get this problem once the update manager upgrades grub
you just need to re-install GRUB.
https://bugs.launchpad.net/ubuntu/+s...b2/+bug/477104
http://www.mail-archive.com/ubuntu-i.../msg06802.html

a13x06 03-08-2010 03:11 AM

Really sorry but those pages seem to have gone right over my head!
How do I revert back to my old version of GRUB? Is this something which I did wrong or is there a bug?

Cheers,

Alex

linuxlover.chaitanya 03-08-2010 03:54 AM

You may have upgraded grub to grub2 and something went wrong. You can boot from Ubuntu Live cd and from terminal use command:

sudo grub-install /dev/sda assuming that your drive is named sda. Change to your values.

a13x06 03-08-2010 04:17 AM

I tried the following:

Code:

sh:GRUB>linux /boot/vmlinuz-2.6.31-14-generic root=dev/sda1 loop=ubuntu/disks/root.disk ro
sh:GRUB>initrd /boot/initrd.img-2.6.31-14-generic
sh:GRUB>boot

Lots of text then moves very quickly on the screen then something like:
Code:

Begin:loading essential drivers... ...
Done
Begin: Running /scripts/init-premount... ...
Done
Begin:Mounting root file system... ...
/init: line 218: divide by zero
[3.253346] Kernal Panic - not syncing: Attempted to kill init!
[3.253841] Pid: 1, comm:init Not tainted 2.6.31-14-generic #48Ubuntu

It then gets stuck:(

Alex

a13x06 03-08-2010 04:19 AM

Sorry linuxlover.chaitanya I didnt see your reply Il try that now:)

Alex

a13x06 03-08-2010 04:36 AM

I ran the CD without making changes to my current setup, then opened a terminal and typed:
Code:

sudo grub-update /dev/sda
I tried sda1, sda2, sda3, sda4 and sda5. But evertime I got:

Code:

grub-probe:error: cannot find device for /boot/grub
No Path or device is specified

Cheers,

Alex

linuxlover.chaitanya 03-08-2010 05:47 AM

You do not change it to partitions on the disk. Find out the disk name by using sudo fdisk -l.
It should tell you if your disk is sda or hda or something else.
And then use this name in grub-install command.

This is the output of fdisk -l at my end.

Code:

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0a6bc04f

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        498    4000153+  82  Linux swap / Solaris
/dev/sda2            499        7185    53713327+  5  Extended
/dev/sda4            7186        9726    20410582+  83  Linux
/dev/sda5            499        7185    53713296  83  Linux


a13x06 03-08-2010 08:04 AM

When I entered:

Code:

sudo fdisk -l
I got:

Code:

Disk /dev/sda :250.1GB
But then when I enter:

Code:

sudo grub-update /dev/sda
I still get the same error...

Alex

troop 03-08-2010 11:11 PM

sudo grub-install --root-directory=/boot(or where you have grub mounted) /dev/sda

linuxlover.chaitanya 03-08-2010 11:45 PM

Why update? install grub.

sudo grub-install /dev/sda

a13x06 03-09-2010 04:07 AM

Troop,

How would I find out where GRUB is mounted?

Thanks,

Alex

a13x06 03-09-2010 04:24 AM

I entered:
Code:

sudo grub-install --root-directory=/boot /dev.sda
and
Code:

sudo grub-update --root-directory=/boot /dev.sda
Got the error:
Code:

grub-probe error: cannot find a device for /boot/boot/grub
Could this be because I dont know where GRUB is?

Alex

linuxlover.chaitanya 03-09-2010 04:45 AM

Yes this could be. Do you know if you have got a separate partition mounted on /boot?
Usually this should not be an issue and you need not specify your root directory.

just sudo grub-install /dev/sda should work just fine for you. It has for me.

a13x06 03-09-2010 08:06 AM

I wouldnt know whether I have a partition. I have windows and ubuntu installed as separate operating systems which I choose at startup. How do I find this out?

Alex


All times are GMT -5. The time now is 05:35 PM.