1756018 Members
2817 Online
108839 Solutions
New Discussion юеВ

Re: Recover /usr/lib

 
SOLVED
Go to solution
shanmugt
Advisor

Recover /usr/lib

I have accidentally renamed /usr/lib as /usr/lib_orig in a HP UX server.
Now, no commands are getting executed in the server.
Is there any way to recover those files again and start normal execution.
11 REPLIES 11
Horia Chirculescu
Honored Contributor

Re: Recover /usr/lib

Hello,

You must boot the install CD which has a recovery mode.

Best regards
Horia.
Best regards from Romania,
Horia.
shanmugt
Advisor

Re: Recover /usr/lib

Hello,
Its not possible anymore to login to the machine.Even console login under root does not work.

Will it be possible to logon ( with root )still with the install DVD on recovery mode.The machine is isolated now completely.

Thanks.

Horia Chirculescu
Honored Contributor

Re: Recover /usr/lib

>Its not possible anymore to login to the machine.Even console login under root does not work.

Of course this is the normal behavior on the current circumstances. Anything using a library that has to be found under /usr/lib would not work anymore.

This is why you need to use a recovery media or just use ignite backups if available.

Best regards,
Horia.
Best regards from Romania,
Horia.
shanmugt
Advisor

Re: Recover /usr/lib

Hello ,
Thanks.Is there any document that I could refer to do the recovery.
Regards.
Horia Chirculescu
Honored Contributor

Re: Recover /usr/lib

Ignite-UX Administration Guide:

http://docs.hp.com/en/B2355-90772/B2355-90772.pdf

Best regards,
Horia.
Best regards from Romania,
Horia.
Horia Chirculescu
Honored Contributor

Re: Recover /usr/lib

Also, check

Using recovery mode from the installation CD:

http://docs.hp.com/en/B2355-90153/ch06s04.html

Best regards
Horia.
Best regards from Romania,
Horia.
Matti_Kurkela
Honored Contributor
Solution

Re: Recover /usr/lib

You can boot the system to single user mode even without /usr, so it might not be necessary to boot to recovery mode from an installation CD.

Once you get to the single user root prompt, run these commands:
mountall
/sbin/mv -i /usr/lib_orig /usr/lib

When /usr/lib is renamed, most commands in /usr/bin and /usr/sbin stop working, because they depend on libraries located in /usr/lib.

But commands located in /sbin don't depend on /usr at all.

MK
MK
shanmugt
Advisor

Re: Recover /usr/lib

Hello,
What is the procedure to login via single user mode and will be still possible to login as root?
It is not possible to get the root prompt via console.

Regards
shanmugt
Advisor

Re: Recover /usr/lib

Thanks MK. It is now working.