You are not logged in.

#1 2020-08-02 04:38:07

lespea
Member
Registered: 2020-08-02
Posts: 1

Grub: calloc not found

After updating to the latest grub I re-ran grub-install

sudo grub-install --target=x86_64-efi --efi-directory=/efi/EFI --bootloader-id=grub

and regenerated the config and after rebooting faced the "calloc not found" screen and was dropped into grub rescue.  I rebooted into a live CD and tried re-installing grub which didn't fix it but after rolling back to the previous version (2.04-7-x86_64) and reinstalling it rebooted just fine.


ls /efi/EFI
Boot  EFI  GRUB  memtest86  Microsoft
gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.5

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/nvme0n1: 1000215216 sectors, 476.9 GiB
Model: HP SSD EX950 512GB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 3D12FFD5-B0DA-47E4-BDDE-377884C0FFCA
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1000215182
Partitions will be aligned on 2048-sector boundaries
Total free space is 5767 sectors (2.8 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  BIOS boot partition
   2            6144        20977663   10.0 GiB    EF00  EFI System
   3        20977664        23074815   1024.0 MiB  8300  Linux filesystem
   4        23074816       253761535   110.0 GiB   8300  Linux filesystem
   5       253761536       253794303   16.0 MiB    0C01  Microsoft reserved ...
   6       253794304       999132133   355.4 GiB   0700  Basic data partition
   7       999133184      1000212479   527.0 MiB   2700

Related? https://bugs.launchpad.net/ubuntu/+sour … ug/1889509

Not sure if I'm doing something wrong or what other debug info is relevant but figured I should report the issue.  Reading a few things online it might be related to the "BIOS boot partition" not being updated or something?  Not sure I don't know a lot about grub...

Offline

#2 2020-08-05 12:00:39

whoops
Member
Registered: 2009-03-19
Posts: 891

Re: Grub: calloc not found

Same happens on my laptop. Tried to fix it with grub rescue / seems broken / can't read the partitions.

Luckily (or unluckily) I have two options to boot from (my BIOS calls them: "Grub" and "[hd/partition name]") and if I switch to the second one, that one still works.

I vaguely remember that back when I installed grub, I used 2 methods of [stuff / MBR / efi?] in parallel because I thought to myself: "Well, if one breaks....". It is possible that I forgot how to update one of those 2 grubs properly and that's now the (broken) default. Don't have time to figure out what I did to my laptop a year ago or how it broke and / or fixed whatever is happening now, but I had no idea what "efi" was and still don't, so whatever I did was probably in the archlinux wiki and involves installing a redundant copy of grub stuff to wherever it is on my PC which does not support that uefi stuff.

Offline

#3 2020-10-12 11:55:01

MiteshPandav
Member
Registered: 2020-10-12
Posts: 1

Re: Grub: calloc not found

Happened the same on my desktop while reinstalling GRUB over windows 10 default boot.
How i got this error

  • boot into a live CD, and run `lsblk` command

Output
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 232.9G  0 disk
├─sda1   8:1    0   512M  0 part
├─sda2   8:2    0    16M  0 part
├─sda3   8:3    0  49.5G  0 part
├─sda4   8:4    0   504M  0 part
├─sda5   8:5    0   512M  0 part
├─sda6   8:6    0    50G  0 part
├─sda7   8:7    0   128G  0 part
└─sda8   8:8    0   3.9G  0 part

  • Mount drives

mount /dev/sda6 /mnt

mkdir /mnt/boot
mount /dev/sda1 /mnt/boot

mkdir /mnt/home
mount /dev/sda7 /mnt/home

  • chroot into mounted system

arch-chroot /mnt

  • Install Grub using following command

grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --recheck
grub-mkconfig -o boot/grub/grub.cfg

How i fixed error "symbol 'grub_calloc not found"

  • mount EFI partition to /boot/EFI before installing Grub

mount /dev/sda1 /boot/EFI
grub-install --target=x86_64-efi --efi-directory=/boot/EFI --bootloader-id=GRUB --recheck
grub-mkconfig -o boot/grub/grub.cfg

Offline

#4 2020-10-12 12:38:14

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Grub: calloc not found

Thanks for the contribution. The OP has not been back since the original post, so I am going to consider this thread abandoned and close it.

lespea, if you come back and want this thread reopened, please use the Report link.

Offline

Board footer

Powered by FluxBB