2

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

0

3 Answers 3

6

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

4

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.

1

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 ld.so.1 for solaris does seem to indicate the presence of a LD_PRELOAD environment variable that does what we want)

LD_PRELOAD=/path/to/libc.so.renamed mv /path/to/libc.so.renamed /path/to/libc.so.correct

This assumes you still have a shell on the system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .