Update CentOS failed cpio: command not found

Issues related to applications and software problems
Post Reply
nikola381
Posts: 3
Joined: 2022/10/25 12:05:49

Update CentOS failed cpio: command not found

Post by nikola381 » 2022/10/25 12:45:23

Hi Guys,

Please, could you help me?

I have CentOS 7 server, Kernel: Linux 3.10.0-1160.71.1.el7.x86_64.

I wanted to update the server but I got an error.

Broadcast message from systemd-journald@zimbraserver (Mon 2022-10-24 14:52:00 CEST):
dracut[15340]: dracut: creation of /boot/initramfs-3.10.0-1160.71.1.el7.x86_64.img failed
Message from syslogd@zimbraserver at Oct 24 14:52:00 ...
dracut:dracut: creation of /boot/initramfs-3.10.0-1160.71.1.el7.x86_64.img failed
/sbin/dracut: line 1670: cpio: command not found
dracut: creation of /boot/initramfs-3.10.0-1160.71.1.el7.x86_64.img failed
Broadcast message from systemd-journald@zimbraserver (Mon 2022-10-24 14:52:20 CEST):
dracut[24212]: dracut: creation of /boot/initramfs-3.10.0-1160.76.1.el7.x86_64.img failed
Message from syslogd@zimbraserver at Oct 24 14:52:20 ...
dracut:dracut: creation of /boot/initramfs-3.10.0-1160.76.1.el7.x86_64.img failed
/sbin/dracut: line 1670: cpio: command not found
dracut: creation of /boot/initramfs-3.10.0-1160.76.1.el7.x86_64.img failed
mkinitrd failed
ERROR: installing kernel-3.10.0-1160.76.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.76.1.el7.x86_64'
warning: %posttrans(kernel-3.10.0-1160.76.1.el7.x86_64) scriptlet failed, exit status 1
Non-fatal POSTTRANS scriptlet failure in rpm package kernel-3.10.0-1160.76.1.el7.x86_64


After that, I can not boot Linux on 3.10.0-1160.71.1.el7.x86_64, and I can not boot on 3.10.0-1160.76.1.el7.x86_64

But works on older version 3.10.0-1160.59.1.el7.x86_64

This is a virtual machine and I have restored the backup, on a version before the update.

Before I try the new update do you have some suggestions on what I can do?

Now CentOS is on 3.10.0-1160.71.1.el7.x86_64, and I want to try updating the last version 3.10.0-1160.76.1.el7.x86_64

boot folder is not full
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 976M 276M 634M 31% /boot

When I enter cpio on Linux got error
# cpio
-bash: cpio: command not found

Thanks a lot best regards.
Nikola

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

Re: Update CentOS failed cpio: command not found

Post by TrevorH » 2022/10/25 12:58:39

I would suggest yum install cpio but the real question is how you managed to get a system without it installed in the first place. Running `yum remove cpio` here gives about 400 pages of errors then ends with

Error: Trying to remove "systemd", which is protected
Error: Trying to remove "yum", which is protected

or yum reinstall cpio if it says it already is.
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

nikola381
Posts: 3
Joined: 2022/10/25 12:05:49

Re: Update CentOS failed cpio: command not found

Post by nikola381 » 2022/10/25 13:09:42

Thanks a lot, TrevorH for your help.

This is weird for me, I didn't uninstall anything in past, and the last update went OK.

Because of the backup procedure, and smaller downtime I can do it tomorrow morning.

I will try yum install cpio.

My english is not great, sorry for that.

This is Zimbra mail, and everything works.

Best regards Nikola

nikola381
Posts: 3
Joined: 2022/10/25 12:05:49

Re: Update CentOS failed cpio: command not found

Post by nikola381 » 2022/10/26 10:07:43

Thanks, TrevorH,

yum reinstall cpio solved the problem with the update.

Best regards Nikola

Post Reply