Grub broken after Debian 10 upgrade: "symbol `grub_calloc` not found"
I installed Debian 10 XFCE (libre-computer-aml-s805x-ac-debian-buster-xfce-mali-4.19.64+-2019-08-05.img) on the eMMC of my La Frite, and everything worked fine until I decided to apt-update && apt dist-upgrade.
Now every time I try to boot the board, I get this error while trying to load grub:
I flashed the same image to a USB drive, and when I try to boot from there, for some reason it boots fine into the eMMC, so I don't have to chroot.
It seems to be mounting /dev/sda1 on /boot/efi, and /dev/mmcblk0p2 on /.
I think the main source of the problem is that grub is failing to install with a "Input/output error":
Now every time I try to boot the board, I get this error while trying to load grub:
## Starting EFI application at 08080000 ...
error: symbol `grub_calloc` not found.
Entering rescue mode...
grub rescue>
I flashed the same image to a USB drive, and when I try to boot from there, for some reason it boots fine into the eMMC, so I don't have to chroot.
It seems to be mounting /dev/sda1 on /boot/efi, and /dev/mmcblk0p2 on /.
I think the main source of the problem is that grub is failing to install with a "Input/output error":
root@libre-computer:~# grub-install
Installing for arm64-efi platform.
grub-install: warning: Cannot set EFI variable Boot0000.
grub-install: warning: efivarfs_set_variable: writing to fd 5 failed: Input/output error.
grub-install: warning: efivarfs_set_variable: failed to unlink /sys/firmware/efi/efivars/Boot0000-8be4df61-93ca-11d2-aa0d-00e098032b8c: Invalid argument.
grub-install: warning: _efi_set_variable_mode: ops->set_variable() failed: Input/output error.
grub-install: error: failed to register the EFI boot entry: Input/output error.
Does anyone have any idea about how to unbrick my system?
Comments
Trying to remove the efivars file manually gives me the same error:
efivarfs is currently mounted on /sys/firmware/efi/efivars:
If I try to remount it, the error changes, I get a "status=8000000000000007" message on dmesg (and the behaviour of grub-install doesn't change):
If I reinstall grub-efi-arm64, the message changes slightly:
After running "apt upgrade" but before rebooting, I did the following:
Hope this helps!
--
A-Ron