Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidently renamed libc library in solaris 10 machine.. commands are not working..IS there any way to restore system back?

share|improve this question
up vote 6 down vote accepted

Use a live CD, mount the partition and rename libc back to its original name.

share|improve this answer

You don't say which version of solaris 10 -

  • x86 at the grub screen boot Solaris Failsafe. This should mount your existing root filesystem on /a so you can go to /a/lib and rename the file(s) as appropriate.

  • sparc put a Solais Sparc installation CD (DVD) in the drive and from the OK prompt boot -s cdrom. When you get to the miniroot mount your existing filesystem onto the miniroot and then rename the files(s) as appropriate.

share|improve this answer

I'm not sure if it'll work with solaris' runtime linker, however I've recovered from a similar situation on linux by forcing the runtime linker to load the renamed libc with LD_PRELOAD and then running mv to rename it back to what it was supposed to be. (Man for solaris does seem to indicate the presence of a LD_PRELOAD environment variable that does what we want)

LD_PRELOAD=/path/to/ mv /path/to/ /path/to/

This assumes you still have a shell on the system.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.