How to Recover a Linux System After Deleting /lib64/libc.so.6 Using Rescue Mode
This guide walks you through using Linux rescue mode to restore a system after accidentally deleting the critical /lib64/libc.so.6 library, detailing each boot‑menu selection, chroot command, and file copy step to bring the system back to normal operation.
Background
When using Linux, accidental deletions such as removing important libraries or RPM packages can render the system unusable. This article records the step‑by‑step process to recover from such mistakes.
Significance
Learning to restore a Linux system after critical files are deleted by using rescue mode helps maintain system stability and avoid complete reinstallation.
Case Details
We delete the essential library /lib64/libc.so.6, which disables most basic commands, including shutdown. After a power‑off and reboot, the system hangs, prompting the use of rescue mode.
Rescue Mode Procedure
1. Reboot and press Esc at the boot splash to enter the Boot Menu.
2. Select the third option “CD‑ROM Drive” to boot from a CD.
3. Choose the third option “Rescue Mode”.
4. Select English as the language.
5. Skip network interface detection by choosing “No”.
6. Continue to the shell prompt. Note that the root directory in rescue mode is /mnt/sysimage; to work in the original root, run chroot /mnt/sysimage.
7. Open a shell, verify that /lib64/libc.so.6 exists in the rescue environment, and copy it back to the original location.
8. Reboot the system; the previously missing commands function again, confirming successful recovery.
Conclusion
If important system files are accidentally removed, rescue mode provides a straightforward way to restore them, as it contains the necessary binaries and libraries for basic operation.
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.
