[solved] Boot fails following kernel-3.10.0-957.27.2 upgrade

Issues related to applications and software problems
Post Reply
lox
Posts: 3
Joined: 2019/08/14 21:53:52

[solved] Boot fails following kernel-3.10.0-957.27.2 upgrade

Post by lox » 2019/08/14 22:10:47

Hello,

Tonight my server upgraded to kernel-3.10.0-957.27.2 and failed to reboot with "initramfs failed junk in compressed archive". It is running as a VM in libvirt/KVM. I can boot on previous kernel: 3.10.0-957.21.3

My /boot partition has heaps of free space:

Code: Select all

/dev/vda1                          1014M    159M  856M  16% /boot
I tried reinstalling:

Code: Select all

yum reinstall kernel-3.10.0-957.27.2.el7.x86_64 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.nsw.au.hostlink.com.au
 * epel: de.download.ispsystem.com
 * extras: mirror.lagoon.nc
 * ispsystem-5.213: de.download.ispsystem.com
 * ispsystem-base: de.download.ispsystem.com
 * remi-safe: remi.conetix.com.au
 * updates: centos.mirror.vic.au.hostlink.com.au
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:3.10.0-957.27.2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
 Package                         Arch                            Version                                       Repository                        Size
======================================================================================================================================================
Reinstalling:
 kernel                          x86_64                          3.10.0-957.27.2.el7                           updates                           48 M

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

Total download size: 48 M
Installed size: 63 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
kernel-3.10.0-957.27.2.el7.x86_64.rpm                                                                                          |  48 MB  00:00:54     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : kernel-3.10.0-957.27.2.el7.x86_64                                                                                                  1/1 
grub2-editenv: error: invalid environment block.
grub2-editenv: error: invalid environment block.
grub2-editenv: error: invalid environment block.
grub2-editenv?: erreur?: bloc d'environnement incorrect.
grub2-editenv?: erreur?: bloc d'environnement incorrect.
  Verifying  : kernel-3.10.0-957.27.2.el7.x86_64                                                                                                  1/1 

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

Complete!
If I list files in /boot, I can see that initramfs-3.10.0-957.27.2.el7.x86_64kdump.img file is missing:

Code: Select all

ls /boot
config-3.10.0-957.21.2.el7.x86_64                        initramfs-3.10.0-957.27.2.el7.x86_64.img
config-3.10.0-957.21.3.el7.x86_64                        symvers-3.10.0-957.21.2.el7.x86_64.gz
config-3.10.0-957.27.2.el7.x86_64                        symvers-3.10.0-957.21.3.el7.x86_64.gz
efi                                                      symvers-3.10.0-957.27.2.el7.x86_64.gz
grub                                                     System.map-3.10.0-957.21.2.el7.x86_64
grub2                                                    System.map-3.10.0-957.21.3.el7.x86_64
initramfs-0-rescue-353f201453d7413eb63560eb4e78751b.img  System.map-3.10.0-957.27.2.el7.x86_64
initramfs-3.10.0-957.21.2.el7.x86_64.img                 vmlinuz-0-rescue-353f201453d7413eb63560eb4e78751b
initramfs-3.10.0-957.21.2.el7.x86_64kdump.img            vmlinuz-3.10.0-957.21.2.el7.x86_64
initramfs-3.10.0-957.21.3.el7.x86_64.img                 vmlinuz-3.10.0-957.21.3.el7.x86_64
initramfs-3.10.0-957.21.3.el7.x86_64kdump.img            vmlinuz-3.10.0-957.27.2.el7.x86_64
Help appreciated, thank you.
Last edited by lox on 2019/08/14 23:09:12, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Boot fails following kernel-3.10.0-957.27.2 upgrade

Post by TrevorH » 2019/08/14 22:28:43

The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lox
Posts: 3
Joined: 2019/08/14 21:53:52

Re: Boot fails following kernel-3.10.0-957.27.2 upgrade

Post by lox » 2019/08/14 22:44:15

Thank you but how am I supposed to fix it ?

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Boot fails following kernel-3.10.0-957.27.2 upgrade

Post by TrevorH » 2019/08/14 22:58:28

Confirm that it is the problem like this:

Code: Select all

[root@centos7 ~]# grub2-editenv list
saved_entry=CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)
I expect yours to complain that it's not valid. If so then just rename /boot/grub2/grubenv out of the way and it'll be recreated when required.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lox
Posts: 3
Joined: 2019/08/14 21:53:52

Re: Boot fails following kernel-3.10.0-957.27.2 upgrade

Post by lox » 2019/08/14 23:08:58

That is it, it was corrupted (I wonder how can this happen):

Code: Select all

# LANG=C grub2-editenv list
grub2-editenv: error: invalid environment block.
Renamed it and reinstalled the latest kernel. Now:

Code: Select all

# LANG=C grub2-editenv list
saved_entry=CentOS Linux (3.10.0-957.27.2.el7.x86_64) 7 (Core)
And it boots !
Thanks heaps.

Post Reply