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

How to install glibc 2.14 on RHEL 6/ RHEL 7/ CentOS 7

Export and Import users/groups and OU in AD Server 2008 using LDIFDE command.

How to Set Up and Configure latest yum repository on CentOS