Install rpm packages in rescue mode[RHEL7/CentOS7]

 Install rpm packages in rescue mode[RHEL7/CentOS7]

 

  • Boot the machine to rescue mode using rescue media (such as the Binary DVD or RHEL.iso)
  • Find the location and how is CDROM is recognized by system (eg. /dev/sr0)
  • Mount the CDROM to some temporary directory

# mkdir /tmp/iso

# mount /dev/sr0 /tmp/iso

#cd /tmp/iso/Packages

  • Find the package and try to install it manually using RPM.

#ls /tmp/iso/Packages

#rpm -ivh --root=/mnt/sysimage /tmp/iso/Packages/abc.rpm --replacepkgs --replacefiles

  •  In case you are running Linux rescue mode with network support you will be able to download the packages from Customer Portal to another machine then copy them using your network instead mounting a CD:

 

# scp user@remote-machine-ip:/path/to/packages.rpm /tmp

  •  First execute it in test mode,

# rpm -ivh --root=/mnt/sysimage  --test --replacefiles --replacepkgs    abc.rpm

 

  • If there are no errors generated, execute it by removing the –test flag.

# rpm -ivh --root=/mnt/sysimage --replacefiles --replacepkgs abc.rpm abc2.rpm abc3.rpm


  • The --root=/mnt/sysimage allows installing the RPMpackage inside the actual root partition.

 

 

 

Comments

Popular posts from this blog

[SOLVED] YUM: can not find RHNS CA file ERROR: can not find RHNS CA file: /usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT

Setting an Operating System Release During Registration

YUM Update ERROR: 28, 'Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds' Trying other mirror