Recover a Linux System After Deleting Critical Libraries Using Rescue Mode
This guide walks you through restoring a Linux system when essential files like /lib64/libc.so.6 are accidentally deleted, using the rescue mode to copy missing libraries back and reboot the system successfully.
Background
When using Linux, accidental deletions of important dependencies or RPM packages can render the system unusable. This article records the detailed steps for recovering from such mistakes.
Significance
Learning to use rescue mode to restore critical system files after accidental deletion helps recover a broken Linux installation.
Case Details
We demonstrate what happens after deleting /lib64/libc.so.6. Basic commands and even shutdown become unavailable, and a simple reboot does not fix the issue.
After reboot the system hangs, so we boot into rescue mode.
During boot, press Esc to enter the Boot Menu, select the third option CD-ROM Drive to boot from the CD, then choose the third option Rescue Mode .
Select the language (default English) and skip network interface detection by choosing No .
Continue until the prompt indicates that the root directory in rescue mode is /mnt/sysimage. To work with the original system files, run chroot /mnt/sysimage.
Start a shell session, then verify that ls works, confirming that /lib64/libc.so.6 exists in the rescue environment.
Copy the missing libc.so.6 file from the rescue system back to its original location.
Finally, reboot the system by selecting reboot and pressing Enter.
After reboot, the previously deleted file is restored, commands work again, and the system is fully functional.
Conclusion
If important system files are accidentally deleted, rescue mode provides a straightforward way to recover them because it contains the necessary files. This tutorial covers the most basic use of rescue mode for system restoration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
