Why does "grub2-mkconfig" gives error "sed: can't read /etc/system-release: No such file or Directory" while generating GRUB configuration file?

Solution Verified - Updated -

Issue

  • The command grub2-config command fail with the below error:

    # grub2-config -o /boot/grub2/grub.cfg
    sed: can't read /etc/system-release: No such file or Directory.
    

Environment

  • Red Hat Enterprise Linux (RHEL) 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