How to install rpm package in rescue mode

It happens sometimes that your .rpm based Linux distribution is not working as expected. Linux boxes fails as well :), and after debugging, you find out that particular package ( let say abc.rmp ) is either corrupted/deleted from your system.

Below is one line step, how to install rpm package in rescue mode.

= boot machine to rescue mode

= find location, and how is CDrom recognized by system ( eg. /dev/hdc )

= mount CDrom to some temporary directory

# mkdir cdtepm

  1. mount /dev/hdc cdtemp

= Find a package you want to install, it is usually in “Server” directory in directory where you mount your CD

First execute it in test mode

# rpm -ivh –test –force –noscripts –root=/mnt/sysimage abc.rpm

if there are not errors generated, execute it for real, so remove –test

# rpm -ivh –force –noscripts –root=/mnt/sysimage abc.rpm

Please read

# man rpm

for more info about options above used.