cancel
Showing results for 
Search instead for 
Did you mean: 
Ksahil
Flight Engineer
Flight Engineer
  • 2,055 Views

how to recover deleted libcrypto.so.1.0.2k file. from linux 7.9 verison.?

Jump to solution

By mistakaly deteted libcrypto.so.1.0.2k from /usr/lib64/.

Unable to getting the login option on machine. machine is up but can't login it.

1 Solution

Accepted Solutions
Ksahil
Flight Engineer
Flight Engineer
  • 1,900 Views

I followed the below steps and recovered the system successfully.

1. --->> Steps remove the libcrypto.so.1.0.2k.

[root@linux2 ~]# cd /usr/lib64/
[root@linux2 lib64]# ls -ltr | grep libcrypto.so.1.0.2k
-rwxr-xr-x. 1 root root 2521008 Apr 9 2019 libcrypto.so.1.0.2k
lrwxrwxrwx. 1 root root 19 Aug 14 13:55 libcrypto.so.10 -> libcrypto.so.1.0.2k
[root@linux2 lib64]# rm -rf libcrypto.so.1.0.2k
[root@linux2 lib64]#reboot

--------------***unable to getting the login shell.***----------

Ksahil_0-1693929816532.png

1. During bootup, when the GRUB2 menu shows up, press the e key for edit.

2. Add the following parameter at the end of the linux16 line on x86-64 systems, or the linuxefi line on UEFI systems:

systemd.unit=emergency.target

As the Below Screenshot shows.

Ksahil_1-1693930526376.png

Now login the with root password.

Ksahil_2-1693930596150.png

 And, followed the below steps and recovered the system.

Ksahil_4-1693931888733.png

 

Ksahil_5-1693932043036.png

 

Ksahil_6-1693932141500.png

And rebooted the machine and got the login shell.

 

Ksahil_7-1693932243890.png

Regards, Saahil

 

 

 

View solution in original post

3 Replies
tnishiok
Flight Engineer
Flight Engineer
  • 2,031 Views

Will the rescue mode using the installation DVD help you with the problem?

Chapter 32. Basic System Recovery
32.2. Anaconda Rescue Mode

The rescue mode can mount your system's rootfs. Also it can mount an external USB stick. So then you may copy the proper library file from other healthy system to the broken rootfs via a USB stick.

The attached screenshot may show you how it works. I have only RHEL9 system on my desk, but the steps would be almost identical even to RHEL7.

screenshot4.png

The rescue mode mounted the rootfs of the target RHEL9 system under /mnt/sysroot. And then I mounted a USB stick '/dev/sdb' on /mnt/usb which contains the library file. Then it should be possible to copy the healthy library file from the USB to rootfs, although I did not actually run the copy operation since I was afraid of leading any negative effect to my working system.

Regards,
Toshi
Chetan_Tiwary_
Community Manager
Community Manager
  • 2,026 Views

Hello @Ksahil !

Agree with @tnishiok here !

Once you are  booted into live environment , you can then reinstall "openssl" package  which provides the libcrypto.so.1.0.2k file :

https://access.redhat.com/discussions/3713331 

Ksahil
Flight Engineer
Flight Engineer
  • 1,901 Views

I followed the below steps and recovered the system successfully.

1. --->> Steps remove the libcrypto.so.1.0.2k.

[root@linux2 ~]# cd /usr/lib64/
[root@linux2 lib64]# ls -ltr | grep libcrypto.so.1.0.2k
-rwxr-xr-x. 1 root root 2521008 Apr 9 2019 libcrypto.so.1.0.2k
lrwxrwxrwx. 1 root root 19 Aug 14 13:55 libcrypto.so.10 -> libcrypto.so.1.0.2k
[root@linux2 lib64]# rm -rf libcrypto.so.1.0.2k
[root@linux2 lib64]#reboot

--------------***unable to getting the login shell.***----------

Ksahil_0-1693929816532.png

1. During bootup, when the GRUB2 menu shows up, press the e key for edit.

2. Add the following parameter at the end of the linux16 line on x86-64 systems, or the linuxefi line on UEFI systems:

systemd.unit=emergency.target

As the Below Screenshot shows.

Ksahil_1-1693930526376.png

Now login the with root password.

Ksahil_2-1693930596150.png

 And, followed the below steps and recovered the system.

Ksahil_4-1693931888733.png

 

Ksahil_5-1693932043036.png

 

Ksahil_6-1693932141500.png

And rebooted the machine and got the login shell.

 

Ksahil_7-1693932243890.png

Regards, Saahil

 

 

 

Join the discussion
You must log in to join this conversation.