SD/UX Corrupt Index

A list of what products are installed under HP-UX is kept in /var/adm/sw/products/INDEX . If this gets corrupted, SD/UX errors occur and it may become unusable. The INDEX can be recreated as follows:

  1. mv /var/adm/sw/products/INDEX /var/adm/sw/products/INDEX.old

  2. cd /var/adm/sw/products

  3. for i in find . -name INDEX do cat $i » INDEX done

  4. This should create a usable INDEX

A list of depots is kept in /var/adm/sw/host_object

An alternative method (sent in by Charlie Brown and tested against HP-UX 11.00) follows. This method involves creating a dummy package, moving the INDEX file and installing the dummy package so that the INDEX is rebuilt.

  1. cd /var/adm/sw/products/INDEX

  2. Create a package called “void” using swpackage -s ./void.pdf. The void.psf file must contain the following lines:

    product tag void fileset tag void

  3. mv INDEX INDEX.old

  4. swinstall void - This will cause the INDEX file to be rebuilt as it is missing.

  5. swremove void