Why does kernel installation gives error 'grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.'?

Solution Verified - Updated -

Issue

  • Installation for kernel replicate errors.
# yum reinstall kernel-3.10.0-1160.6.1.el7.x86_64.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Examining kernel-3.10.0-1160.6.1.el7.x86_64.rpm: kernel-3.10.0-1160.6.1.el7.x86_64
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-1160.6.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                            Arch                               Version                                          Repository                                                      Size
=============================================================================================================================================================================================
Reinstalling:
 kernel                             x86_64                             3.10.0-1160.6.1.el7                              /kernel-3.10.0-1160.6.1.el7.x86_64                              64 M

Transaction Summary
=============================================================================================================================================================================================
Reinstall  1 Package

Total size: 64 M
Installed size: 64 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-3.10.0-1160.6.1.el7.x86_64                                                                                                                                         1/1
grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
grub2-editenv: error: cannot rename the file /boot/grub2/grubenv.new to /boot/grub2/grubenv: No such file or directory.
  Verifying  : kernel-3.10.0-1160.6.1.el7.x86_64                                                                                                                                         1/1

Installed:
  kernel.x86_64 0:3.10.0-1160.6.1.el7

Environment

  • Red Hat Enterprise Linux 7.

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