Pages

Wednesday, August 19, 2015

Install RPM packages to a Crashed server + RAID (software ) in rescue mode

(1) Boot in to the rescue mode. Since the server have packages dependency problems, it will not allow you to chroot.

(2) Configure network in rescue mode.

++++++++++++++++++++++++++++++++++
#ifconfig eth0 <IP-Addr> netmask <net_mask>
#route add default gw 192.168.1.254 eth0
++++++++++++++++++++++++++++++++++

(3) Examine the RAID array using mdadm and create a temperory RIAD config file as follows.

#mdadm --examine --scan > /etc/mdadm.conf

(4) Assemble the raid array which has the broken OS installation. Here it is md4

#mdadm --assemble --scan /dev/md4

Verify the status in /proc/mdstat

(5) Dwonload the missing RPMS

(6) Mount the assembled RAID array to a temperory mount point

# mount /dev/md4 /old_drive

(7) Now, install the RPMS as follows.

#rpm -ivh --force --noscripts --root=/old_drive *.rpm

(8) Now you can unmount crashed array and reboot the server.