LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-07-2010, 04:42 PM   #1
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Rep: Reputation: 15
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
 
Old 03-07-2010, 05:05 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 96
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
 
Old 03-08-2010, 03:11 AM   #3
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-08-2010, 03:54 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
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.
 
Old 03-08-2010, 04:17 AM   #5
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-08-2010, 04:19 AM   #6
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
Sorry linuxlover.chaitanya I didnt see your reply Il try that now

Alex
 
Old 03-08-2010, 04:36 AM   #7
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-08-2010, 05:47 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
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
 
Old 03-08-2010, 08:04 AM   #9
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-08-2010, 11:11 PM   #10
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

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

Last edited by troop; 03-08-2010 at 11:13 PM.
 
Old 03-08-2010, 11:45 PM   #11
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
Why update? install grub.

sudo grub-install /dev/sda
 
Old 03-09-2010, 04:07 AM   #12
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
Troop,

How would I find out where GRUB is mounted?

Thanks,

Alex
 
Old 03-09-2010, 04:24 AM   #13
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-09-2010, 04:45 AM   #14
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,627

Rep: Reputation: Disabled
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.
 
Old 03-09-2010, 08:06 AM   #15
a13x06
Member
 
Registered: Feb 2010
Location: UK
Distribution: ubuntu
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 03:54 AM
Ubuntu 9.04 with dual boot (Windows XP) my Ubuntu screens freeze up gribbsy Ubuntu 4 10-20-2009 01:13 AM
Delete Ubuntu kernels from dual-boot vista/ubuntu laptop? Leon14344 Linux - Laptop and Netbook 1 06-22-2009 10:32 PM
Dual boot: Ubuntu 8.04 and XP. XP won't boot now - loops back to Ubuntu Slowbey Linux - Newbie 9 01-05-2009 02:44 AM
Changing default boot OS back to Ubuntu without being able to boot Ubuntu revenge02 Linux - Newbie 5 04-16-2007 08:37 PM


All times are GMT -5. The time now is 12:18 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration