Grub error after update...

Archived topics about LMDE 1 and LMDE 2
tenfoot
Level 6
Level 6
Posts: 1253
Joined: Sun Jun 03, 2007 4:12 am

Grub error after update...

Post by tenfoot »

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.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

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
oliver.popoviq

Re: Grub error after update...

Post by oliver.popoviq »

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!
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

I found that Grub2 becomes easy only after you fix the Grub2 menu the hard way once... then it's always the same.
tenfoot
Level 6
Level 6
Posts: 1253
Joined: Sun Jun 03, 2007 4:12 am

Re: Grub error after update...

Post by tenfoot »

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
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

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.
tenfoot
Level 6
Level 6
Posts: 1253
Joined: Sun Jun 03, 2007 4:12 am

Re: Grub error after update...

Post by tenfoot »

Thanks again for a very prompt reply. I will work through your suggestions and report back.
tenfoot
Level 6
Level 6
Posts: 1253
Joined: Sun Jun 03, 2007 4:12 am

Re: Grub error after update...

Post by tenfoot »

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.
wayne128

Re: Grub error after update...

Post by wayne128 »

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'.
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

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.
themonkeymixer

Re: Grub error after update...

Post by themonkeymixer »

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
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

You should start a new thread with your problem. In that new thread explain better the problem, what happen, what's the error, etc.
themonkeymixer

Re: Grub error after update...

Post by themonkeymixer »

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

Re: Grub error after update...

Post by themonkeymixer »

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

confused what happened
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

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: http://forums.linuxmint.com/viewtopic.php?f=141&t=67502
themonkeymixer

Re: Grub error after update...

Post by themonkeymixer »

i do use lmde the kernel that will not boot is 2.6.39-2-686-pae
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

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.
themonkeymixer

Re: Grub error after update...

Post by themonkeymixer »

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

Travis
User avatar
nunol
Level 9
Level 9
Posts: 2633
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Re: Grub error after update...

Post by nunol »

There is some information about problems with the new kernel here: http://forums.linuxmint.com/viewtopic.p ... 53#p438314
zerozero

Re: Grub error after update...

Post by zerozero »

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)
Locked

Return to “LMDE Archive”