Skip to content

Instantly share code, notes, and snippets.

@liaoyw
Created July 12, 2017 05:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liaoyw/ae9ed67a67c1899b6a6ff9aca90001f6 to your computer and use it in GitHub Desktop.
Save liaoyw/ae9ed67a67c1899b6a6ff9aca90001f6 to your computer and use it in GitHub Desktop.
restore accidently moved root files system
https://stackoverflow.com/a/11910583/5797497
Old thread, but got exactly the same stupid mistake. /lib64 was moved to /lib64.bak remotely and everything stopped working.
This was a x86_64 install, so ephemient's solution was not working:
# /lib64.bak/ld-linux.so.2 --library-path /lib64.bak/ /bin/mv /lib64.bak/ /lib64
/bin/mv: error while loading shared libraries: /bin/mv: wrong ELF class: ELFCLASS64
In that case, a different ld-linux had to be used:
# /lib64.bak/ld-linux-x86-64.so.2 --library-path /lib64.bak/ /bin/mv /lib64.bak/ /lib64
Now the system is salvaged. Thanks ephemient!
# can not login use ssh
https://manage.accuwebhosting.com/knowledgebase/2343/Fix--SSH-Error-Starting-sshd-Missing-privilege-separation-directory-orvaroremptyorsshd.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment