1834025 Members
2720 Online
110063 Solutions
New Discussion

Restore /var/adm/sw

 

Restore /var/adm/sw

Hi,

We lost /var/adm/sw recently. This has now been restored, but when I do a swlist it just returns the following:

ERROR: The expected depot or root does not exist at "/".
ERROR: There is currently no installed software on host "ngmhp401" at
location "/".

I have stopped and restarted swagentd but it hasn't made any difference.
5 REPLIES 5
Ivan Krastev
Honored Contributor

Re: Restore /var/adm/sw

What is your version ? Procedure is different for 10.20, 11, 11.1 ...


regards,
ivan
Jaime Bolanos Rojas.
Honored Contributor

Re: Restore /var/adm/sw

Neville,

First make sure that you got your INDEX file under /var/adm/sw/products.

If you do then follow this procedure to install a fake product and try to fix the issue:

# cd /var/adm/sw/products
# mv INDEX INDEX.orig
# cd /tmp
# vi void.psf
product
tag void
fileset
tag void
:wq!
# swpackage -s /tmp/void.psf
# swinstall void
# swremove void
# rm void.psf
# swremove -d void


Now there should be a new INDEX file under /var/adm/sw/products and the swlist command will show the installed products.
The IPD Installed Products Database will be up to date.

Regards,

Jaime.
Work hard when the need comes out.

Re: Restore /var/adm/sw

Jaime,

You are the man. That resolved it. Thanks for your help.
Ivan Krastev
Honored Contributor

Re: Restore /var/adm/sw

The laziest way is to reconfigure already configured product:

# cd /var/adm/sw/products
# swmodify -a state=configured OS-Core.C-KRN

regards,
ivan
Jaime Bolanos Rojas.
Honored Contributor

Re: Restore /var/adm/sw

You are very welcome Neville!

Please remember to asign points to the people that takes the time to help you out!

Regards,

Jaime.
Work hard when the need comes out.