Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] GRUB error: symbol `grub_calloc' not found.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tsandstr
n00b
n00b


Joined: 13 Oct 2022
Posts: 1

PostPosted: Thu Oct 13, 2022 1:48 am    Post subject: [SOLVED] GRUB error: symbol `grub_calloc' not found. Reply with quote

Earlier today I was playing around with a toy OSdev project, and I was working on implementing the Mutliboot 2.0 standard so that I could launch it with GRUB. I finished setting up the header, and I invoked some of the tools like grub-mkrescue, grub-install, etc. to get a copy of GRUB installed on a disk image that I could use. Part of the directory tree for my project had a directory called 'boot', and I am worried that I might I have accidentally done something to '/boot' instead of 'boot'.

Later, I went to reboot my computer, and instead of the usual GRUB menu, I was greeted with the following:
Code:
error: symbol `grub_calloc' not found.

and was dumped into a rescue prompt. Nothing I did in the rescue prompt seemed to fix anything, so resorted to pulling out an old USB stick, throwing a SystemRescueCD onto it, and booting that, which is where I am posting this from now.

I tried chrooting into my Gentoo disk and running
Code:
grub-install --efi-directory=/boot/efi

and
Code:
grub-mkconfig -o /boot/grub/grub.cfg

and
Code:
efibootmgr --create --gpt --disk /dev/nvme0n1 --part 1 --write-signature --label "gentoo" --loader "\\EFI\\gentoo\\grubx86.efi"

in various orders and combinations, but on reboot I am still faced with the same error. I also tried rebuilding GRUB, but it did not change anything.

Some general information about my install:

  • The system should boot using UEFI with GPT.
  • The root filesystem is inside a LUKS encrypted LVM volume (but I don't think this is relevant, because the problem is occurring before we should even be doing anything with root).
  • grub-2.06-r2
  • efibootmgr-18
  • efivar-38


If anyone has any ideas about how to fix this I will appreciate it greatly! I apologize if this has been posted before: I found https://askubuntu.com/questions/1263125/how-to-fix-a-grub-boot-error-symbol-grub-calloc-not-found and https://stackoverflow.com/questions/63204225/error-symbol-grub-calloc-not-found-on-ubuntu-boot, but the solutions given don't seem to work (unless I am missing something).

UPDATE: At the recommendation of an IRC I tried fully deleting /boot/grub and /boot/efi and reinstalling grub again. This did not help, and now I don't even get to grub at all to receive an error.

The one thing that I would like to try that isn't working is to see if there is an update to grub: when I run emerge --sync or emerge-webrsync I get errors (emerge --sync fails on "Refreshing keys via WKD ..." and emerge-webrsync attempts to fetch many files but none of them succeed).



UPDATE 2:
SOLVED!!!
I was being silly. I deleted /boot/grub and /boot/efi and reinstalled grub using grub-install --efi-directory=/boot (NOT /boot/efi). I forgot that my ESP was mounted differently than what the wiki was assuming. Then I just ran grub-mkconfig and rebooted and I was good to go. Thanks to the folks on IRC!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum