Centos 7 yum kernel update image failed

Issues related to applications and software problems
Post Reply
haroon.rasheed
Posts: 3
Joined: 2023/05/04 15:45:53

Centos 7 yum kernel update image failed

Post by haroon.rasheed » 2023/05/05 02:15:33

I have tried three yum update on jan, feb, march on my server unfortunately i was not able to update my server.
Its a Mail server, there are lot of patch update is pending due to kernel issue.

Boot Size = 1G
Ram = 20G
HDD = 1TB
CPU = 8

Error:

dracut:dracut: creation of /boot/initramfs-3.10.0-1160.88.1.el7.x86_64.img failed
/sbin/dracut: line 1670: cpio: command not found
dracut: creation of /boot/initramfs-3.10.0-1160.88.1.el7.x86_64.img failed
mkinitrd failed
ERROR: installing kernel-3.10.0-1160.88.1.el7.x86_64: no space left for creating initramfs. Clean up /boot partition and re-run '/usr/sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod --install 3.10.0-1160.88.1.el7.x86_64'
warning: %posttrans(kernel-3.10.0-1160.88.1.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package kernel-3.10.0-1160.88.1.el7.x86_64
Verifying : kernel-3.10.0-1160.88.1.el7.x86_64 1/2
Verifying : kernel-3.10.0-957.el7.x86_64 2/2

Removed:
kernel.x86_64 0:3.10.0-957.el7

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

Complete!


Please check and let us know how to fix this issue.

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

Re: Centos 7 yum kernel update image failed

Post by TrevorH » 2023/05/05 02:39:08

ERROR: installing kernel-3.10.0-1160.88.1.el7.x86_64: no space left for creating initramfs
Problem 1: you've run out of space on the /boot filesystem. Remove some older kernels - maybe using package-cleanup --oldk --count 2 to remove all but the 2 most recent.
/sbin/dracut: line 1670: cpio: command not found
Problem 2: you seem to have removed the package that supplies to cpio utility. It's required. Run yum install cpio to get it back.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

haroon.rasheed
Posts: 3
Joined: 2023/05/04 15:45:53

Re: Centos 7 yum kernel update image failed

Post by haroon.rasheed » 2023/05/05 02:43:55

yum install cpio

The cpio is already been installed in my server.

haroon.rasheed
Posts: 3
Joined: 2023/05/04 15:45:53

Re: Centos 7 yum kernel update image failed

Post by haroon.rasheed » 2023/05/05 03:19:03

I have removed old kernels still the /boot used space is only 13%.

# yum install cpio
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: centos.fastserv.co.il
* epel: ftp.yz.yamagata-u.ac.jp
* extras: centos.vargonen.com
* updates: mirror.natro.com
Package cpio-2.11-28.el7.x86_64 already installed and latest version
Nothing to do

Whoever
Posts: 1335
Joined: 2013/09/06 03:12:10

Re: Centos 7 yum kernel update image failed

Post by Whoever » 2023/05/05 05:37:55

Try:

Code: Select all

yum reinstall cpio

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

Re: Centos 7 yum kernel update image failed

Post by TrevorH » 2023/05/05 13:09:13

Before you reinstall it, do rpm -V cpio and see if it tells you that anything is missing.
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

Post Reply