Grub error: symbol not found: ‘grub_divmod64_full’

After fighting to upgrade my system from Debian Squeeze (Stable) to Wheezy (Testing), I thought I was finally in the free and clear once I had installed all of the packages so I rebooted.  After taking a YouTube break, I tried to SSH back into the machine.  Timed out.

I made the long trek to the other room and turned on the TV the machine is connected to and was faced with:

error: symbol not found: 'grub_divmod64_full'

Excellent.

Luckily this one wasn’t quite as bad as my apt-get adventures and recovery is fairly well documented.  My steps varied a bit because my system is running RAID, so I’m expanding the steps a bit for any [software mdadm] RAID users.

Boot to your favorite Linux live CD and add the kernel parameter “nodmraid”.  This was needed for my raid because dmraid kept accessing my disks and wouldn’t assemble the RAID properly and locked the disks so I couldn’t use mdadm.  As far as the live CD is concerned, I ended up using Ubuntu because I couldn’t get Knoppix to boot to 64 bit and bitness is important since we’ll be using chroot.

First, assemble and mount the RAID arrays (replace drives and partitions as necessary.) For me /dev/md0 is /boot and /dev/md1 is my root filesystem, /.

mdadm --activate /dev/md0 /dev/sda1 /dev/sdb1
mdadm --activate /dev/md1 /dev/sda3 /dev/sdb3
mkdir /mnt/target
mount /dev/md1 /mnt/target
mount /dev/md0 /mnt/target/boot

Next we’ll need to populate the dynamic areas of the filesystem (e.g. /dev, /proc) and then change our shell into that environment:

mount --bind /proc /mnt/target/proc
mount --bind /run /mnt/target/run
mount --bind /sys /mnt/target/sys
mount --bind /dev /mnt/target/dev
mount --bind /dev/pts /mnt/target/dev/pts

chroot /mnt/target /bin/bash

Now a few easy commands to reinstall Grub 2:

apt-get install --reinstall grub-pc
dpkg-reconfigure grub-pc

I opted to install Grub to both of my physical drives, /dev/sda and /dev/sdb for safety.

Ctrl+D to exit the chroot, reboot, and you should be all set!

Now I’ve got a fully upgraded system running Debian Testing and since I’m using “testing” in sources.list, I’ll never have to do a major dist-upgrade again since packages roll in over time.  It’s a versionless OS and that’s just wonderful!

-Paul

This entry was posted in Computers. Bookmark the permalink.

7 Responses to Grub error: symbol not found: ‘grub_divmod64_full’

  1. Pingback: Could not perform immediate configuration on 'default-jre'Paul's Thoughts

  2. Philip Iezzi says:

    Hey Paul, great tutorial! This saved me a lot of time and helped me recover an upgraded Wheezy server.
    I have used Debian Live on a USB-stick. The mdadm --activate steps were not even required as Debian Live already hat the RAID-array automatically activated and assembled. Used the following mount commands instead (check /dev/md/ for any existing device names):

    # mount /dev/md/hostname\:1 /mnt/target
    # mount /dev/md/hostname\:0 /mnt/target/boot

    It may also work with those device names:

    # mount /dev/md127 /mnt/target
    # mount /dev/md126 /mnt/target/boot

    I was also omitting the apt-get install --reinstall grub-pc step, dpkg-reconfigure grub-pc did the job. Thanks a lot!

  3. Very nice. Fixed my server with this guide after it wouldn’t boot when i removed a failed drive from the RAID5.

  4. Mike says:

    Great work!
    After dist-upgrade squeeze to wheezy I’ve the same problem with my RAID5 and with your guid I’ve solved my booting problem or fix grub within a few minutes. ;-)

  5. cwysocki says:

    Great tutorial, you save my day!
    I have this same problem with my RAID1, after I update from squeeze to wheezy :/
    Best regards!

  6. Jim says:

    Thanks a lot man. This stuff safed my hole bloody day ( and it’s friday !!! )

    The thing wit the Live CD is, you have to ( on Ubuntu Live CD ) go to rescue mode and than select F6 ans choose nodmraid. ESC and then enter to boot.

    Was looking ages for a good tutorial like this.

    Also by my server I had md126 and 127 and they were already assembled when I started.

  7. vac says:

    Thanks for saving my server!

Leave a Reply to vac Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>