Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

grub not working after dist-upgrade

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
lokesh987
Posts: 21
Joined: 2015-04-01 17:35

grub not working after dist-upgrade

#1 Post by lokesh987 »

Hello,
after doing a dist-upgrade from wheezy to jessie boot ends up at the grub-rescue command line. Searching for some time I found out that the normal.mod and linux.mod files were place into

Code: Select all

(hd0,msdos1)/boot/grub/i386-pc
Appears odd to me since my install is a 64-bit system.

Anyway, glad to have found these two files which according to wikis should have been in the grub directory. So I continued with

Code: Select all

set prefix=(hd0,msdos1)/boot/grub/i386-pc
1) insmod normal
2) insmod linux
1) output was "symbol not found divmod64"
2) output was "symbol not found ...." (forgot the file's name)
I haven't found any information on those error messages, which are different to the error messages complaining about no space left or so.

How can I fix my grub install from the grub-rescue shell without the need to re-install all of my System?

For those who may think "stupid idiot switches from stable to testing": my desktop environment is XFCE4, which on Wheezy has a couple of bugs that were fixed in Jessie.

User avatar
Hallvor
Global Moderator
Global Moderator
Posts: 2029
Joined: 2009-04-16 18:35
Location: Kristiansand, Norway
Has thanked: 139 times
Been thanked: 206 times

Re: grub not working after dist-upgrade

#2 Post by Hallvor »

This one has saved me in the past. Good luck!

http://sourceforge.net/p/boot-repair-cd/home/Home/
[HowTo] Install and configure Debian bookworm
Debian 12 | KDE Plasma | ThinkPad T440s | 4 × Intel® Core™ i7-4600U CPU @ 2.10GHz | 12 GiB RAM | Mesa Intel® HD Graphics 4400 | 1 TB SSD

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: grub not working after dist-upgrade

#3 Post by kiyop »

http://www.supergrubdisk.org/rescatux/
http://www.supergrubdisk.org/super-grub2-disk/
may also help you.

Is any OS different from the debian installed on the PC?

What is the output of

Code: Select all

ls
ls (hd0,msdos1)/boot/grub/
Does your PC use UEFI?

If you can boot the debian, execute the following with root privilege and post the result

Code: Select all

dpkg -l |grep grub
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
kalle123
Posts: 346
Joined: 2015-03-21 11:17
Location: Rhineland - Germany
Has thanked: 4 times
Been thanked: 11 times

Re: grub not working after dist-upgrade

#4 Post by kalle123 »

Hallvor wrote:This one has saved me in the past. Good luck!

http://sourceforge.net/p/boot-repair-cd/home/Home/
Have supergrub 2, gparted, clonezilla, knoppix and partmagic in my "toolbox". Will add boot-repair to it ;-)

br

lokesh987
Posts: 21
Joined: 2015-04-01 17:35

Re: grub not working after dist-upgrade

#5 Post by lokesh987 »

Theoretically, there is no need for such helpers, since "the file" cannot be found. I believe it is just a matter of wrong UUID, or path setting. Since I avoided to use device setting type "/dev/sdXY" but rather used UUIDs, I believe it should be only those.
kiyop wrote:Is any OS different from the debian installed on the PC?
There is only Debian installed on that PC.
kiyop wrote:What is the output of

Code: Select all

ls
provided the correct devices and partitions.
kiyop wrote:

Code: Select all

ls (hd0,msdos1)/boot/grub/
locale/
fonts/
i386-pc/
grubenvgrub.cfg
unicode32.pf2
Those ending with a "/" are directories
kiyop wrote:Does your PC use UEFI?
No.
kiyop wrote:If you can boot the debian, execute the following with root privilege and post the result

Code: Select all

dpkg -l |grep grub
As stated above, Debain cannot be booted since it stops before the boot manager execution.

Code: Select all

set
The output is "prefix=(hd0,msdos1)/boot/grub" and "root=hd0,msdos1" (both w/o quotes). I believe the prefix is wrong, since all *.mod files are in the i386-pc subdirectory. Changing the prefix to (hd0,msdos1)/boot/grub/i386-pc results in the initially mentioned error.

lokesh987
Posts: 21
Joined: 2015-04-01 17:35

Re: grub not working after dist-upgrade

#6 Post by lokesh987 »

I do not intend to reject friendly advise, but using a startup helper would require either transferring it on a USB Stick or taking the hard drive out of the container and pluging it into another machine. For the moment, this appears too much hazzle to me, as I suspect (I do hope) it is just a matter of a little setting that can be done easily. I would like to /understand/know about it also in order to know for future trouble.

User avatar
kalle123
Posts: 346
Joined: 2015-03-21 11:17
Location: Rhineland - Germany
Has thanked: 4 times
Been thanked: 11 times

Re: grub not working after dist-upgrade

#7 Post by kalle123 »

Did try boot repair just now.

Nice thing is, it gives a complete overview in text form of the situation without altering anything on that machine.

On my machine it looks like this here -> http://paste.ubuntu.com/10744229/

lokesh987
Posts: 21
Joined: 2015-04-01 17:35

Re: grub not working after dist-upgrade

#8 Post by lokesh987 »

Ok, gave up.
Pulled out my hard drive, plugged it into another computer, used my PartedMagic CD and made a simple new installation.

It works again, but this is of course no help for others who will run into this problem.

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: grub not working after dist-upgrade

#9 Post by kiyop »

lokesh987 wrote:Pulled out my hard drive, plugged it into another computer, used my PartedMagic CD and made a simple new installation.

It works again, but this is of course no help for others who will run into this problem.
Congratulations :)

http://paste.ubuntu.com/10744229/
=> Grub2 (v1.99) is installed in the MBR of /dev/sda

(snip by kiyop)

=========================== sda5/boot/grub/grub.cfg: ===========================

(snip by kiyop)

linux /boot/vmlinuz-3.2.0-4-amd64
https://packages.debian.org/jessie/grub-common
Package: grub-common (2.02~beta2-22)
lokesh987 wrote:
kiyop wrote:

Code: Select all

ls (hd0,msdos1)/boot/grub/
locale/
fonts/
i386-pc/
grubenvgrub.cfg
unicode32.pf2
I wonder if grub2 code installed on MBR of /dev/sda is version 1.99 and incompatible with the installed files in /boot/grub/i386-pc on /dev/sda5 are version 2.02.
In other words, grub2 version 2.02 installed files under /boot/grub/i386-pc but did not install code onto MBR, did not update /boot/grub/grub.cfg (which does not contain a menuentry for newer kernel than 3.2.0-4 - for wheezy).
In such case, I would have booed a live jessie debian and chroot'ed into the debian in /dev/sda5 and executed "grub-install /dev/sda" and "update-grub".

p.S. Windows is an OS ;)
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: grub not working after dist-upgrade

#10 Post by kiyop »

Ignore the above post of mine. I misunderstood as if lokesh987 is kalle123. My bad.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Aetios
Posts: 1
Joined: 2015-05-13 09:40

Re: grub not working after dist-upgrade

#11 Post by Aetios »

i ve got the same problem but using a raid with mdadm.
i ve just found how to access my data with a live cd of jessie to backup before doing anything else
i will try to reinstall grub with the jessie live cd

User avatar
kiyop
Posts: 3983
Joined: 2011-05-05 15:16
Location: Where persons without desire to improve themselves fear to tread, in Japan
Been thanked: 3 times

Re: grub not working after dist-upgrade

#12 Post by kiyop »

I wonder if I did not need to appologize.

"symbol not found divmod64" error is displayed if the version of grub2 booted (for example on MBR) is different from the version of the grub2 referred by the booted grub2 code.
Openbox, JWM: Jessie, Sid, Arch / Win XP (on VirtualBox), 10
http://kiyoandkei.bbs.fc2.com/

Post Reply