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 7.
  • Grub2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.