Grub2 commands fail with error /usr/bin/grub2-editenv: error: invalid environment block or error: environment block too small
Issue
-
Failed to change default
kernel
entry. Note: In below example, we are using 1 (Second kernel fromgrub.cfg
file)[root@rhel~]# grub2-set-default 1 /usr/bin/grub2-editenv: error: invalid environment block. /usr/bin/grub2-editenv: error: invalid environment block. /usr/bin/grub2-editenv: error: invalid environment block.
[root@rhel~]# grub2-set-default 1 /usr/bin/grub2-editenv: error: environment block too small.
-
grub2-mkconfig
fails with environment block too small.[root@rhel~]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub configuration file ... /usr/bin/grub2-editenv: error: environment block too small.
Environment
- Red Hat Enterprise Linux 7 and later
- grub2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.