Grub error after update...

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

Grub error after update...

Postby tenfoot on Sun Jun 12, 2011 2:59 pm

Updated my computer yesterday, It was the first time I had had access to the machine for about ten days.

During the upgrade there was a message to the effect that Grub could not be found on /sdb/sdb1 and asking whether I wished to continue as doing so could lead to the computer not booting. Rather foolishly I chose to continue and have been punished for doing so, as the following message appeared when I turned the computer on this morning.

Code: Select all
error: symbol not found: 'grub_divmod64_full'.
entering rescue mode...
grub rescue>


and I have no idea what to do next :(

Has anyone else experienced this problem, please? More importantly, how did you get back to a normal boot.
User avatar
tenfoot
Level 5
Level 5
 
Posts: 550
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Linux Mint is funded by ads and donations.
 

Re: Grub error after update...

Postby nunol on Sun Jun 12, 2011 3:10 pm

https://help.ubuntu.com/community/Grub2 ... pt%20Usage

You have to use "ls" to find the partition, grub config and kernel, check the link above. Next:
Code: Select all
1. set prefix=(hdX,Y)/boot/grub
Use the values determined earlier. Example: If the Ubuntu system is on sda5, enter: set prefix=(hd0,5)/boot/grub
2.* set root=(hdX,Y)
Example: set root=(hd0,5)
3. insmod normal
Attempt to load the normal module.
4. normal
Activate the normal module. If successful, the GRUB 2 menu may appear.
5. set
(Optional) Review the current settings.
6. ls /boot
(Optional) Check for a vmlinuz and a initrd.img entry.
7. insmod linux
An error message usually means the path is incorrect.
8.* linux /vmlinuz root=/dev/sdXY ro
Selects the latest kernel. Example: linux /vmlinuz root=/dev/sda5 ro
9. initrd /initrd.img
Selects the latest initrd image.
10. boot

It's easier than it looks, check the link above.

Edit: once the system boots you have to check why it failed and reinstall grub2:
Code: Select all
sudo grub-install /dev/sdX
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby oliver.popoviq on Sun Jun 12, 2011 4:31 pm

I had the exact same problem. It happended today after updating. Here's your solution:
http://ubuntuforums.org/showthread.php?t=1581099

I know, it seems complicated, but just read carefully. It's written for dummies (like myself). Have fun!
oliver.popoviq
Level 1
Level 1
 
Posts: 1
Joined: Sun Jun 12, 2011 4:22 pm

Re: Grub error after update...

Postby nunol on Sun Jun 12, 2011 5:31 pm

I found that Grub2 becomes easy only after you fix the Grub2 menu the hard way once... then it's always the same.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby tenfoot on Sun Jun 12, 2011 7:35 pm

Hi nunol and oliver.popoviq thank you for your very prompt response. However, my horse falls at the first hurdle :(

When I type ls I get

Code: Select all
(hd0) (hd0,msdos7) (hd0,msdos6) (hd0,msdos5 (hd0,msdos1) (hd1) (hd1,msdos4) (hd1,msdos3) (hd1,msdos2) (hd1, msdos1) (hd2) (hd2,msdos1)  (fd0)


The computer has 2 x 200GB HD. On the first HD was installed LMDE x32 with a /Boot, / and /Home partition on sda. On the
other HD LMDE x64 is installed with a /Boot, / and /Home partition on /sdb. As far as I can remember, GRUB is installed on /sdb.

My default installation is the one on /sdb. I have never had any success booting the x32 installation and, indeed, it is not shown as an option when booting , although gParted shows it partitioned with LMDE installed :(
User avatar
tenfoot
Level 5
Level 5
 
Posts: 550
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: Grub error after update...

Postby nunol on Sun Jun 12, 2011 8:21 pm

It helps if you know what partition you want to boot. I will assume you don't.

Now run
Code: Select all
ls (hd0,7)/boot

and look a the kernel, is that the one you want? If no run
Code: Select all
ls (hd0,6)/boot

and look a the kernel, is that the one you want? If no run... until you find the kernel you want to boot. If you use "ls (hdX,Y)/" first you can bypass the home and "/" parttion.

Once you find the partition you want to boot run:
set root=(hdX,Y)
linux /vmlinuz root=/dev/sdXY ro
initrd /initrd.img
boot

or
Code: Select all
1. set prefix=(hdX,Y)/boot/grub
   

Use the values determined earlier. Example: If the Ubuntu system is on sda5, enter: set prefix=(hd0,5)/boot/grub

2.* set root=(hdX,Y)
   

Example: set root=(hd0,5)

3. insmod normal
   

Attempt to load the normal module.

4. normal
   

Activate the normal module. If successful, the GRUB 2 menu may appear.

5. set
   

(Optional) Review the current settings.

6. ls /boot
   

(Optional) Check for a vmlinuz and a initrd.img entry.

7. insmod linux
   

An error message usually means the path is incorrect.

8.* linux /vmlinuz root=/dev/sdXY ro
   

Selects the latest kernel. Example: linux /vmlinuz root=/dev/sda5 ro

9. initrd /initrd.img
   

Selects the latest initrd image.

10. boot

If you are on "rescue mode".

There are other ways to do this if you have your system live CD/DVD, everything is here: https://help.ubuntu.com/community/Grub2

If you need more help, please ask.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby tenfoot on Mon Jun 13, 2011 5:20 pm

Thanks again for a very prompt reply. I will work through your suggestions and report back.
User avatar
tenfoot
Level 5
Level 5
 
Posts: 550
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: Grub error after update...

Postby tenfoot on Thu Jun 16, 2011 7:49 pm

Hi! I'm back and still needing help :(

I decided to go the LiveCD route and loaded my DVD of LMDE201012. At the appropriate stage and feeling reasonable confident that /dev/sdb1 contained Grub. I entered the last command

Code: Select all
sudo grub-install --root-directory=/mnt /dev/sdb


which returned that there were No errors found.

Then did a Reboot and was presented with a black screen containing the following text.

Code: Select all
GNU GRUB version 1.98+201000804-B

Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions.  Anywhere else TAB lists possible device or file completions.

grub>


I am now even more bewildered than before and coming to the stage where, despite all the updates that will be necessary, a complete reinstall seems the way to go. I hope you guys and girls can talk me out of that!

As before, any help will be very much appreciated.
User avatar
tenfoot
Level 5
Level 5
 
Posts: 550
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: Grub error after update...

Postby wayne128 on Thu Jun 16, 2011 8:00 pm

tenfoot wrote:Hi! I'm back and still needing help :(

I decided to go the LiveCD route and loaded my DVD of LMDE201012. At the appropriate stage and feeling reasonable confident that /dev/sdb1 contained Grub. I entered the last command

Code: Select all
sudo grub-install --root-directory=/mnt /dev/sdb


which returned that there were No errors found.

Then did a Reboot and was presented with a black screen containing the following text.

Code: Select all
GNU GRUB version 1.98+201000804-B

Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions.  Anywhere else TAB lists possible device or file completions.

grub>


I am now even more bewildered than before and coming to the stage where, despite all the updates that will be necessary, a complete reinstall seems the way to go. I hope you guys and girls can talk me out of that!

As before, any help will be very much appreciated.



I think you need to figure out the more important thing:
Bios always pass control to first drive, /dev/sda
so it is important to have grub install on /dev/sda

If you reinstall grub onto /dev/sdb, you should understand when computer boots up, Bios will still pass control to /dev/sda, first drive, the MBR at /dev/sda must have the proper grub install.

what you can do is, assuming grub install is well, and on /dev/sdb, you reboot the computer, use Bios selection menu to set boot order so that your second drive become the first boot drive. then see what happen. this time, Bios will pass control to your 'old second drive'.
wayne128
Level 9
Level 9
 
Posts: 2830
Joined: Tue Jul 13, 2010 12:15 am

Re: Grub error after update...

Postby nunol on Fri Jun 17, 2011 6:46 am

Why don't you try to boot with the http://www.supergrubdisk.org/ and find out what is where and what harddrive is booting first?

Then you can get to the linux you want to command Grub2 and issue the command to reinstall grub from that linux. Once you have it booting the way you want you can make a rescue floppy or ISO with your exact boot specifications.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby themonkeymixer on Thu Jun 23, 2011 11:46 pm

ok I used rescutux http://www.supergrubdisk.org/rescatux/
got to a login prompt but cannot get startx or gdm3 to load

both error out
themonkeymixer
Level 1
Level 1
 
Posts: 17
Joined: Thu Jun 23, 2011 11:37 pm

Re: Grub error after update...

Postby nunol on Fri Jun 24, 2011 5:58 am

You should start a new thread with your problem. In that new thread explain better the problem, what happen, what's the error, etc.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby themonkeymixer on Fri Jun 24, 2011 11:17 pm

Im sorry i wasnt clear, I began with the same error, the grub rescue. Then I tried the super grub disk, specifically rescatux. After this the boot up goes to a login prompt tty1, there are errors on boot up though as the computer boot I cannot see as it moves to fast. I tried "gdm3" after loging in and recieved
# gdm3
** (gdm3:2585): WARNING **: Failed to acquire org.gnome.DisplayManager
** (gdm3:2585): WARNING **: Could not acquire name; bailing out
#
then i tried startx
# startx
a whole bunch goes by but i can read the last ten lines or so

FATAL: Module nvidia not found
(EE) NVIDIA Failed to load module "nividia" (module-specific error, 0)

im going to post the Xorg.0.log in an hour or so -- I have to run a new cable for the net.
themonkeymixer
Level 1
Level 1
 
Posts: 17
Joined: Thu Jun 23, 2011 11:37 pm

Re: Grub error after update...

Postby themonkeymixer on Sat Jun 25, 2011 12:53 am

so ... i booted an old kernel -- this one did not have "pae" in the grub line and it booted fine

confused what happened
themonkeymixer
Level 1
Level 1
 
Posts: 17
Joined: Thu Jun 23, 2011 11:37 pm

Re: Grub error after update...

Postby nunol on Sat Jun 25, 2011 2:43 am

Are you using Mint Debian edition? There was a recent kernel upgrade that means you have to move from i686 to i486 or pae.

You should see this page before updating to avoid surprises like that: viewtopic.php?f=141&t=67502
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby themonkeymixer on Sun Jun 26, 2011 4:11 pm

i do use lmde the kernel that will not boot is 2.6.39-2-686-pae
themonkeymixer
Level 1
Level 1
 
Posts: 17
Joined: Thu Jun 23, 2011 11:37 pm

Re: Grub error after update...

Postby nunol on Sun Jun 26, 2011 4:18 pm

Does the old kernel boot fine? There's probably a problem with that new kernel and X or something else. My VM's don't work with the new kernel, I use 2.6.38 instead.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby themonkeymixer on Sun Jun 26, 2011 4:25 pm

yes it does, i done seem to be having any trouble.

Travis
themonkeymixer
Level 1
Level 1
 
Posts: 17
Joined: Thu Jun 23, 2011 11:37 pm

Re: Grub error after update...

Postby nunol on Sun Jun 26, 2011 4:30 pm

There is some information about problems with the new kernel here: viewtopic.php?f=141&t=67502&p=438453#p438314
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Postby zerozero on Sun Jun 26, 2011 4:33 pm

themonkeymixer wrote:Im sorry i wasnt clear, I began with the same error, the grub rescue. Then I tried the super grub disk, specifically rescatux. After this the boot up goes to a login prompt tty1, there are errors on boot up though as the computer boot I cannot see as it moves to fast. I tried "gdm3" after loging in and recieved
# gdm3
** (gdm3:2585): WARNING **: Failed to acquire org.gnome.DisplayManager
** (gdm3:2585): WARNING **: Could not acquire name; bailing out
#
then i tried startx
# startx
a whole bunch goes by but i can read the last ten lines or so

FATAL: Module nvidia not found
(EE) NVIDIA Failed to load module "nividia" (module-specific error, 0)

im going to post the Xorg.0.log in an hour or so -- I have to run a new cable for the net.


you are using nvidia, right? the new 39.2-pae kernel upgrade didn't include the headers to rebuild the drivers;
you should login on the old kernel, select linux-headers-2.6.39-2-686-pae and install it, after that the nvidia driver should be rebuild against the new kernel and you can boot into it (hopefully)
User avatar
zerozero
Level 16
Level 16
 
Posts: 6435
Joined: Tue Jul 07, 2009 2:29 pm

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: valkus and 2 guests