How to re-generate the grubenv file if missing or corrupted ?

Solution Verified - Updated -

Issue

  • The grubenv file is corrupted or missing in BIOS and UEFI systems.

  • Detected a corrupted grubenv file in the /var/log/leapp/leapp-report.txt.

  • Following messages were repeatedly observed in the /var/log/messages:

    grub2-set-bootflag[736726]: Error reading from /boot/grub2/grubenv: Invalid argument
    systemd[732552]: grub-boot-success.service: Main process exited, code=exited, status=1/FAILURE
    systemd[732552]: grub-boot-success.service: Failed with result 'exit-code'.
    systemd[732552]: Failed to start Mark boot as successful.
    

Environment

  • Red Hat Enterprise Linux 7
  • Red Hat Enterprise Linux 8

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