Translated message

A translation of this page exists in English.

Grub2 命令失败,并显示错误 /usr/bin/grub2-editenv: error: invalid environment block 或 error: environment block too small

Solution In Progress - Updated -

Issue

  • 更改默认 kernel 条目失败。备注:在以下示例中,我们使用 1(来自 grub.cfg 文件中的第二个内核)

    [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 失败,因为环境块太小。

    [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 及更新版本
    • grub2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content