System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

/usr/lib/hpux32/dld.so file is renamed

SOLVED
Go to solution
Ramaprasad K
Regular Advisor

/usr/lib/hpux32/dld.so file is renamed

Hi experts,

'dld.so' library file has been renamed by one user to 'dld.so_save'. Following command is what she had run :
#pwd
/usr/lib/hpux32
#mv dld.so dls.so_save

Because of this blunder, no commands are running. Even from Single User mode. When any command is run, following is what the error is :

# ls

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# find

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# w

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# cd /usr/sbin

# vi

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

# cd /usr/lib/hpux32

# /usr/bin/cp dld.so_safe dld.so

/usr/lib/hpux32/uld.so: Unable to open '/usr/lib/hpux32/dld.so'.

Abort(coredump)

**********************************************

Need your guidance in resolving this at the earliest.

Regards,
Ramaprasad K
19 REPLIES
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dld.so library file has been renamed by one user

You are confused. This was renamed by root. You need to talk to this person.
If you don't know about these tricks below, you should not fiddle with dld.so directly and only swinstall/swremove on linker patches. (Or mail/call me directly. :-)

If you are going to fiddle with dld.so, you need to use atomic ln(1) operations. And not mv or cp:
# ln -f dld.so dld.so_save
# ln -f dld.so.new dld

But you are in luck, you can repair it by a bigger hammer, even without going into single user mode:
# /sbin/ln -f dld.so_save dld.so
Dennis Handly
Acclaimed Contributor
Solution

Re: /usr/lib/hpux32/dld.so file is renamed

A slight typo: ... And not mv or cp:
# ln -f dld.so dld.so_save
# ln -f dld.so_new dld.so

You can use cp to put dld.so_new in place.
Ramaprasad K
Regular Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Thanks Dennis,

Sorry, 'User' I meant by person with root access.

Also, one more clarification. Does 'ln' run. As no commands are running as showm in my first post.

regards.
Ram
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>Does ln run?

No, not after the system was messed up. That's why you now need to use /sbin/ln.
Sagar Sirdesai
Trusted Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi
You need to login from cdron in single user mode and then correct the changes .

Sagar
Venkatesh BL
Honored Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

Thank god for 'static' binaries! Luckily, you should be able to run commands that are in '/sbin' directory. There is a /sbin/mv as well!
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>Venkatesh: There is a /sbin/mv as well.

In order to keep it straight, you should only use atomic ln(1).
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi,

I am also facing same problem.
but i even do not have any root session open could you please tell me the exact steps i need to follow in order to fix it.

I really appreciate.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dba_hp: I am also facing same problem.

Don't ever fiddle with system shlibs unless you have two root sessions and one user session for testing.

>tell me the exact steps i need to follow in order to fix it.

If you aren't logged on as root, you'll have to boot into single user mode and follow the steps in this other thread where they made an even more dangerous mistake:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1304918
Ramaprasad K
Regular Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Thanks for all your replies.
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi Dennis,

I followed the same steps suggested.
1.single user mode.
2.mount.
3.# pwd

/usr/lib/hpux32

# /sbin/mv dld.so.org dld.so

mv: dld.so.org: cannot access: No such file or directory

# ls d*

dld.so.org libjvm.so.bpd

# /sbin/mv /usr/lib/hpux32/dld.so.org /usr/lib/hpux32/dld.so

mv: /usr/lib/hpux32/dld.so.org: cannot access: No such file or directory


Kindly help me.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dba_hp: # /sbin/mv dld.so.org dld.so
>mv: dld.so.org: cannot access: No such file or directory

Perhaps you have some unprintable chars in the name?
Try: /sbin/ls -lbd d*
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Hi Dennis,

I tried like below.
dev2# ls -lbd d*
-r-xr-xr-x 1 bin bin 1065976 Aug 13 21:54 dld.so
dr-xr-xr-x 2 bin bin 96 Apr 12 2008 dpd
Again same error "no such file or directory"
Kindly help me what shall i do.
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Sorry I post the output from another server.

Here it is:
# cd /usr/lib/hpux32
# /sbin/ls -lbd d*
dr-xr-xr-x 2 bin bin 96 Feb 2 13:54 dpd
# /sbin/ls -lb d*
total 1872
-r-xr-xr-x 1 bin bin 925800 Feb 16 2007 dld.so.org
-r--r--r-- 1 bin bin 18864 Feb 16 2007 libjvm.so.bpd
# /sbin/mv dld.so.org dld.so
mv: dld.so.org: cannot access: No such file or directory

Kindly help me.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>-r-xr-xr-x 1 bin bin 1065976 Aug 13 21:54 dld.so

You appear to now have a dld.so. So what's the new problem?
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed


I guess you found the problem with my wrong post.

another thing i would like you to go through is this.

# # /sbin/ls -l d*
total 1872
-r-xr-xr-x 1 bin bin 925800 Feb 16 2007 dld.so.org
-r--r--r-- 1 bin bin 18864 Feb 16 2007 libjvm.so.bpd
# /sbin/ls -l dld*
dld* not found
# /sbin/ls -l *org
*org not found

I appreciate your kindness to reply a closed thread.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dba_hp: I guess you found the problem with my wrong post.

(I didn't see it until now.)

# /sbin/ls -l d*
-r-xr-xr-x 1 bin bin 925800 Feb 16 2007 dld.so.org
-r--r--r-- 1 bin bin 18864 Feb 16 2007 libjvm.so.bpd

This seems to indicate that dld.so.org was moved into /usr/lib/hpux32/dpd/.
Try this:
# /sbin/mv dpd/dld.so.org dld.so
Barakati
Frequent Advisor

Re: /usr/lib/hpux32/dld.so file is renamed

Many Thanks to Mr. Dennis,

Moral 100 points to you.

It is fixed now.

Thanks again.

wrong post: I post one of the commands ouptut from different server.
Dennis Handly
Acclaimed Contributor

Re: /usr/lib/hpux32/dld.so file is renamed

>dba_hp: Many Thanks to Mr. Dennis, Moral 100 points to you.

That's why you should create your own thread and add a URL to an existing one if there is anything useful.