Tuesday, October 18, 2011

Patch 144325-01 failed to install due to a failure produced by pkgadd.

Patching the Solaris 10 Sparc to the latest patch level.
While patching the server I got this error and tried to search internet, Got some answers But they were contradicting each other.
Hence thought jotting down the issue here so that, this blog will act as a reference material for me and many other in case.....
1.
-bash-3.00$ metastat -c
d4 m 10GB d40 d41
d40 s 10GB c1t0d0s4
d41 s 10GB c1t1d0s4
d3 m 10GB d30 d31
d30 s 10GB c1t0d0s3
d31 s 10GB c1t1d0s3
d1 m 27GB d10 d11
d10 s 27GB c1t0d0s0
d11 s 27GB c1t1d0s0


metadb metadetach metadevadm
bash-3.00# metadetach d1 d11
d1: submirror d11 is detached
bash-3.00# metadetach d3 d31
d3: submirror d31 is detached
bash-3.00# metadetach d4 d41
d4: submirror d41 is detached
bash-3.00# metastat -c
d4 m 10GB d40
d40 s 10GB c1t0d0s4
d3 m 10GB d30
d30 s 10GB c1t0d0s3
d1 m 27GB d10
d10 s 27GB c1t0d0s0
d41 s 10GB c1t1d0s4
d31 s 10GB c1t1d0s3
d11 s 27GB c1t1d0s0

2. copy the output of various commands like...

# cat /etc/vfstab ; ulimit -a ; mount ; df -h ; sysdef -i; prtconf > /tmp/prepatch_`hostname`.txt

3. Boot the system in # init 0

4. at ok prompt ok boot -s

5 Assuming that the patches have already been copied to the desired location.

6. Once I hooked the script got the following error:

Approved patches will be installed in this order:

144325-01


Checking installed patches...
Executing prepatch script...
Verifying sufficient filesystem capacity (dry run method)...

Patch 144325-01 failed to install due to a failure produced by pkgadd.

See /var/sadm/patch/144325-01/log for details

Patchadd is terminating.

some of the post suggested to add the "install" account and "nobody"
account. this did not help. But while patching previous server I did not got this type of error, so just tried to recall what different I did here. Got it!

While copying the patches on the server to be patched I always created a dir with 777 permissions and will then delete, once done.

This time I had created a dir 766 and that was causing this error so ran.....

# chmod -R 777 /patch

# ./patchadd

that's it!

Happy patching.