Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Let's imagine that I'm installing with RPM packages A, B and C. They are installed in the same order. And suddenly in the middle of installing B there is a power cut.

1) regarding state after turning on: What happens to this transaction? Will it be resumed? Or maybe RPM will remove all packages and files from that transaction?

2) regarding user actions: does RPM require user action to do above things or it checks it automatically at computer start?

RPM transctions are described mainly in terms of dependency error or error when computer is still running...

share|improve this question

migrated from serverfault.com Jun 9 '13 at 22:15

This question came from our site for professional system and network administrators.

add comment

1 Answer

up vote 7 down vote accepted

This is, in many ways, a too broad question, but here are some facts:

  • downloaded packages via yum or dnf are cached until a yum clean packages or dnf clean packages operation removes them.
  • downloaded packages via rpm will sit there until manually removed (unless downloaded in an ephemeral /tmp filesystem, in which case they will be lost after a reboot)

Yet, the answer depends on several things:

  1. were you in the middle of a yum or dnf transaction? or was it a direct rpm command? for the former case, yum-complete-transaction will attempt to finish all pending actions. For the latter case, again, it depends on what was the exact stage of the installation that was taking place during the power outage. You can always try to run rpm --force -Uvh $package to reinstall a package regardless its current state. The worst case scenario in this case would be a broken rpm package.

  2. are your hypothetical packages one or more of: grub, kernel, initramfs, dracut, lvm or any package that would give you access to your root filesystem? in this case, the most probable result is an unbootable system that needs to be repaired by other means, e.g. PXE booting into a systemrescue image. The amount of different cases that could happen depending on the packages involved and the dependencies among them makes it impossible to know beforehand what exactly would happen.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.