[Bug 1889509] Re: grub boot error : "symbol 'grub_calloc' not found

Ian Channing 1889509 at bugs.launchpad.net
Thu Jul 30 21:07:29 UTC 2020


@marin-n's fix
(https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1889509/comments/16)
worked perfectly for us.

I took some slightly more detailed notes of what I did through the
portal rather than the CLI:

> For Azure users (the same should work in any cloud, with small changes) that end up here while looking for this bug, the steps to recover are:
>
> Deploy a recovery VM using AzCli or just attach a copy of the affected OS vm disk to a rescue VM.
> Once done, connected to rescue VM and:
>
> $ sudo su -
> # mkdir /rescue
> # mount /dev/sdc1 /rescue
> # for fs in {proc,sys,tmp,dev}; do mount -o bind /$fs /rescue/$fs; done
> # cd /rescue
> # chroot /rescue
> # lsblk <-- this will identify the attached disk, usualy /dev/sdc
> # grub-install /dev/sdc
> # exit
> # cd /
> # for fs in {proc,sys,tmp,dev}; do umount /rescue/$fs; done
> # umount /rescue
>
> Now you should be able to swap back the repaired disk to affected VM.

Ok, step by step:

> Deploy a recovery VM

What sort of VM is that? Attempted creating a regular Ubuntu 18.04 LTS
VM (same as our broken VM)

All normal except for connecting to an existing disk. Looks like you
can't attach to a disk unless you first somehow move it from another
machine (detach it) first.

> attach a copy of the affected OS vm disk to a rescue VM.

To create a copy, you can take a read only snapshot of the disk and then
create a new Managed Disk based on the snapshot.

The only disk you need a snapshot of is the *OS* disk, not the data
disk.

You can create the recovery VM without a data disk, just the OS disk
that automatically gets created.

You can then add the Managed Disk OS snapshot to the recovery VM as a
data disk.

Then you can log into the recovery VM and follow the steps above.

All the steps completed without error - we could copy and paste the
exact messages

Then log out and stop the VM.

You can then go into the broken VM and under the Disks section of the VM
select 'Swap OS Disk'.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to grub2 in Ubuntu.
https://bugs.launchpad.net/bugs/1889509

Title:
  grub boot error : "symbol 'grub_calloc' not found

Status in grub2 package in Ubuntu:
  Confirmed
Status in grub2 package in Debian:
  New

Bug description:
  After updating grub2 (to 2.02~beta2-36ubuntu3.26) and rebooting, my
  server does not boot:

  Booting from Hard Disk 0...
  error: symbol `grub_calloc' not found.
  Entering rescue mode...
  grub rescue> _

  I rebooted 3 servers in this way (all running Ubuntu 16.04.6 LTS) and
  all hung.

  A lot of other people are reporting the same problem at:

  https://askubuntu.com/questions/1263125/how-to-fix-a-grub-boot-error-symbol-grub-calloc-not-
  found.

  ---

  Above most likely means that dpkg debconf no longer knows about the
  correct drives to install grub onto.

  Please boot & mount all the target disks and execute

  $ sudo dpkg-reconfigure grub-pc

  You will be asked which drives to install grub onto, and then grub
  will be installed onto them, and more importantly, it will remember
  where to install grub to, on all future upgrades.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1889509/+subscriptions



More information about the foundations-bugs mailing list