Operating System - HP-UX
1752676 Members
5949 Online
108789 Solutions
New Discussion юеВ

Can't recover deleted libdld.1,2

 
SOLVED
Go to solution
Jin-Ho Song
Occasional Advisor

Can't recover deleted libdld.1,2

It looks like most of applications in HP-UX has dependencies on libdld.1 & 2. I removed libdld.1 & 2(actually rename them to xxx.old) by mistake because building of gcc 3.3 made some error regarding libdld dependencies.
But right after I renamed the shared libraries, I couldn't do anything but 'cd' to change directory. I can't 'mv' back to their original names!!!
If anybody has an idea on this, please help me...
Otherwise, I think I have to reinstall the OS by myself...
newbie for HP-seeker for free-of-charge stuffs.
7 REPLIES 7
Printaporn_1
Esteemed Contributor

Re: Can't recover deleted libdld.1,2

can you try tar restore file from backup ?
or rcp from other system ?
enjoy any little thing in my life
Steven E. Protter
Exalted Contributor

Re: Can't recover deleted libdld.1,2

Your only good option is to restore the files from backup at this point.

You might be able to recovery with an Ignite make_tape_recovery tape if you made one prior to making this mistake.

If you have fbackup, veritas or omniback backup of this file, you should be able to retore it.

If you have another system with these files, you should be able to use ftp,rcp or scp to copy them to the affected system.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jin-Ho Song
Occasional Advisor

Re: Can't recover deleted libdld.1,2

All commands but 'cd' don't work at all. tar, fbackup, and so on...Even 'ls' doesn't work...How come this can happen to me --;
I am a newbie on HP-UX(Don't laugh at me why I did that kind of funny mistake even though I am new at HP-UX.) and don't know about /backup.
I managed to cd to /backup and hit the tab key to see the contents of that directory(Luckily I got bash installed.), but have no idea what I need to do next.Please let me know detailed procedure or something if possible...thanks in advance.
newbie for HP-seeker for free-of-charge stuffs.
Jean-Louis Phelix
Honored Contributor
Solution

Re: Can't recover deleted libdld.1,2

Hi,

libdld is used by program using shared libraries. So you can just use static compiled commands which are all located in /sbin.

Try a simple /sbin/mv (if you use mv, it will take /usr/bin/mv which is dynamically linked so won't work) to rename libdld to its original name.

Regards.
It works for me (┬й Bill McNAMARA ...)
Jin-Ho Song
Occasional Advisor

Re: Can't recover deleted libdld.1,2

Thanks, Mr. Phelix. I might have to do that next time because I've already done something seemingly irrevocable before you posted a reply...
I rebooted the server and entered into 'single mode' and 'mount'ed the partition in problem in /usr2 not /usr and renamed libdld.1 & 2. Unfortunately, I made another big mistake...I should've done like 'ln -s libdld.2 libdld.sl', but I did 'ln -s libdld.2 libdld.2' without any error raised. I don't know why it didn't show duplicate file error or something...
If I'm going to list the files in that directory like this,
#ls -al libdld*
lrwxr-xr-x 1 root sys 10 Apr 30 12:00 libdld.0 -> ./libdld.1
-r-xr-xr-x 1 bin bin 12334 Jul 17 2002 libdld.1
-r-xr-xr-x 1 bin bin 24576 Jul 17 2002 libdld.2
lrwxr-xr-x 1 root sys 10 Apr 30 11:58 libdld.2 -> ./libdld.2

and I tried to remove the wrong symbolic link,but failed. The file can't be accessed, either.
I called the customer service and they're supposed to send someone to fix it.(say, reinstall the OS...)
newbie for HP-seeker for free-of-charge stuffs.
Jean-Louis Phelix
Honored Contributor

Re: Can't recover deleted libdld.1,2

hi,

I think that you have made a typo, because it's not possible to have twice the same name ... You surely have a hidden char in the name (like ^H for example). Check it by doing a command like :

ls *libdld* | vis

which will how you all 'invisible' chars. So it's still possible to remove the link using something like an interactive remove (rm -i *libdld*) being very careful to the only 'y' answer you have to give.

Regards.
It works for me (┬й Bill McNAMARA ...)
Jin-Ho Song
Occasional Advisor

Re: Can't recover deleted libdld.1,2

Wow...that makes sense. I had trouble in typing commands in the poor terminal and saw many of ^H while deleting wrong commands with backspace key. I believe that's the one and only reason.
Not much time left. I'd better rush down to the lab before hp guy come and clean up the box...
I really appreciate it, Mr. Phelix!!!
newbie for HP-seeker for free-of-charge stuffs.