Lost /var/sadm/install/contents file and /var/sadm/pkg


 
Thread Tools Search this Thread
Operating Systems Solaris Lost /var/sadm/install/contents file and /var/sadm/pkg
# 1  
Old 06-04-2010
Lost /var/sadm/install/contents file and /var/sadm/pkg

Hello, I recently found that my /var/sadm/install/contents, ~/admin/default, /var/spool/patch and /var/spool/pkg files were empty.
This broke the pkginfo, pkgchk and other package related tools.
The pkgmap no longer points to where the applications have been installed.
I have replaced the contents and default files with ones from an older copy of the drive as our drives are cloned.
This restored the missing files but of course did nothing to address the files that were once installed on the system but are no longer.
Is there a tool that I can use to tell the system to "recrawl" and discover what has been installed?
It's looking more and more like no since the /var/sadm/install/contents file is considered the registry of Solaris systems and anything that was installed should have a folder there.
Some of the things I tried, not in this order, have been:

1. Mount the cloned drive's /var partion and Re-run the pkgadd program on all the SUNW? files replaced in the pkg directory. I recieved some errors from pkgadd resulting in a failed attempt.
pkgadd - /rescue/sadm/pkg -s /var/spool/pkg.

2. Mount the cloned drive's /var partition and manually copy the SUNW? files over to the /var/sadm/pkg directory and run pkgadd. This result was the same as above, the program worked, listed all the packages and after using CTRL-D allowed me to select "all" for my choice of install. This failed on the very first package stating it couldn't find it.

3. Mount the cloned drives /var partiton and from in that mounted partition run pkgadd and pkgadd -d <filename>. This returned an error:
pkgadd: Error: attempt to process datastream failed
- open of <filename> failed, errno =2
pkgadd: ERROR: could not process datastream from <filename>

Any one know a way to get the system to recognize what's installed on it if the "contents" file has been replaced?

ej
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Contents deleted from /var/sadm

Hi, Somebody/somebody removed all contents /vat/sadm on Solaris 10 Sparc box. As of now server is up and running. There is no backup for this server. If we copy contents from another equivalent server, can it work ? We don't know if it will be fixed by booting form DVD also. Any suggestions? (4 Replies)
Discussion started by: solaris_1977
4 Replies

2. Shell Programming and Scripting

Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog

I have been searching and reading about syslog. I would like to know how to Transfer the logs being thrown into /var/log/messages into another file example /var/log/volumelog. tail -f /var/log/messages dblogger: msg_to_dbrow: no logtype using missing dblogger: msg_to_dbrow_str: val ==... (2 Replies)
Discussion started by: kenshinhimura
2 Replies

3. Shell Programming and Scripting

Csh , how to set var value into new var, in short string concatenation

i try to find way to make string concatenation in csh ( sorry this is what i have ) so i found out i can't do : set string_buff = "" foreach line("`cat $source_dir/$f`") $string_buff = string_buff $line end how can i do string concatenation? (1 Reply)
Discussion started by: umen
1 Replies

4. Solaris

Difference between /var/log/syslog and /var/adm/messages

Hi, Is the contents in /var/log/syslog and /var/adm/messages are same?? Regards (3 Replies)
Discussion started by: vks47
3 Replies

5. Solaris

/var/adm & /var/sadm

what is the difference between tha /var/adm and /var/sadm files in solaris 10 Os please can any one respond quickly thanking you (2 Replies)
Discussion started by: wkbn86
2 Replies

6. Solaris

Cleaning out /var/sadm/patch after Live Upgrade

I recently upgraded my OS to Solaris 10 10/09 from Solaris 10 06/06 using Live Upgrade. I wanted to clean up space in /var/sadm/patch. I'm assuming the server is now clean with a fresh version of Solaris 10 10/09. Can I safely remove everything in /var/sadm/patch? Thanks, jeremy (0 Replies)
Discussion started by: griff11
0 Replies

7. Solaris

Content of /var/sadm/pkc/<pkg>/save directory

Hi, What are the contents of /var/sadm/pkg/<pkg>/save directory. - It contains various patches with their id's. What does the "pspool" directory inside it contain? (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies

8. Shell Programming and Scripting

Resolving Var to its contents

Hello everyone.... I am trying to dinamically create variable names and do resolution of this vars contents. After that is done I want to use (via a function call) the var and its contents by referring to it via the variable name. I am having a hard time achieving this .... can you help ? ... (5 Replies)
Discussion started by: gio001
5 Replies

9. UNIX for Dummies Questions & Answers

accidentally remove the contents of /var/sadm/pkg

Hi all, I carelessly remove the contents of /var/sadm/pkg. I do not have any backup of the folder. What can I do ? Thanks a lot. :eek: (11 Replies)
Discussion started by: stancwong
11 Replies

10. UNIX for Dummies Questions & Answers

/var/sadm/install

Hi, can I delete the file install in /var/sadm directory because I do not need. Regard TDS (1 Reply)
Discussion started by: tinfoul
1 Replies
Login or Register to Ask a Question