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…
Best Answer
This is, in many ways, a too broad question, but here are some facts:
yum
ordnf
are cached until ayum clean packages
ordnf clean packages
operation removes them.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:
were you in the middle of a
yum
ordnf
transaction? or was it a directrpm
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 runrpm --force -Uvh $package
to reinstall a package regardless its current state. The worst case scenario in this case would be a brokenrpm
package.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.