grub2-mkconfig crashes with "free(): invalid next size (normal)" message or fails with "error: environment block too small"
Issue
-
When executing
grub2-mkconfig
to rebuild the Grub menu, the command dumps core and print the following message# grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... free(): invalid next size (normal) /etc/grub.d/10_linux: line 128: PID Aborted (core dumped)
-
When executing
grub2-mkconfig
to rebuild the Grub menu, the command fails with the following message# grub2-mkconfig -o /etc/grub2.cfg Generating grub configuration file ... /usr/bin/grub2-editenv: error: environment block too small.
Environment
- Red Hat Enterprise Linux 8
- grub2 prior to version 2.02-90.el8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.