JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 1M: System Administration Commands     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

Introduction

System Administration Commands - Part 1

System Administration Commands - Part 2

metahs(1M)

metaimport(1M)

metainit(1M)

metaoffline(1M)

metaonline(1M)

metaparam(1M)

metarecover(1M)

metarename(1M)

metareplace(1M)

metaroot(1M)

metaset(1M)

metassist(1M)

metastat(1M)

metasync(1M)

metattach(1M)

mib2c(1M)

mib2mof(1M)

mibiisa(1M)

mipagent(1M)

mipagentconfig(1M)

mipagentstat(1M)

mkbootmedia(1M)

mkdevalloc(1M)

mkdevmaps(1M)

mkfifo(1M)

mkfile(1M)

mkfs(1M)

mkfs_pcfs(1M)

mkfs_udfs(1M)

mkfs_ufs(1M)

mknod(1M)

mkpwdict(1M)

modinfo(1M)

modload(1M)

modunload(1M)

mofcomp(1M)

mofreg(1M)

monacct(1M)

monitor(1M)

mount(1M)

mountall(1M)

mount_cachefs(1M)

mountd(1M)

mount_hsfs(1M)

mount_nfs(1M)

mount_pcfs(1M)

mount_tmpfs(1M)

mount_udfs(1M)

mount_ufs(1M)

mount_xmemfs(1M)

mpathadm(1M)

mpstat(1M)

msgid(1M)

mvdir(1M)

named(1M)

named-checkconf(1M)

named-checkzone(1M)

named-compilezone(1M)

ncaconfd(1M)

ncheck(1M)

ncheck_ufs(1M)

ndd(1M)

netservices(1M)

netstat(1M)

netstrategy(1M)

newaliases(1M)

newfs(1M)

newkey(1M)

nfs4cbd(1M)

nfsd(1M)

nfslogd(1M)

nfsmapid(1M)

nfsstat(1M)

nisaddcred(1M)

nisaddent(1M)

nisauthconf(1M)

nisbackup(1M)

nis_cachemgr(1M)

nisclient(1M)

nisd(1M)

nisd_resolv(1M)

nisinit(1M)

nisldapmaptest(1M)

nislog(1M)

nispasswdd(1M)

nisping(1M)

nispopulate(1M)

nisprefadm(1M)

nisrestore(1M)

nisserver(1M)

nissetup(1M)

nisshowcache(1M)

nisstat(1M)

nisupdkeys(1M)

nlsadmin(1M)

nscd(1M)

nslookup(1M)

nsupdate(1M)

ntpdate(1M)

ntpq(1M)

ntptrace(1M)

nulladm(1M)

obpsym(1M)

ocfserv(1M)

oplhpd(1M)

parse_dynamic_clustertoc(1M)

passmgmt(1M)

patchadd(1M)

patchrm(1M)

pbind(1M)

pcitool(1M)

pcmciad(1M)

pfinstall(1M)

pginfo(1M)

pgstat(1M)

pgxconfig(1M)

picld(1M)

ping(1M)

pkg2du(1M)

pkgadd(1M)

pkgadm(1M)

pkgask(1M)

pkgchk(1M)

pkgcond(1M)

pkgdep(1M)

pkgrm(1M)

plockstat(1M)

pmadm(1M)

pmconfig(1M)

pntadm(1M)

pooladm(1M)

poolbind(1M)

poolcfg(1M)

poold(1M)

poolstat(1M)

ports(1M)

powerd(1M)

poweroff(1M)

ppdmgr(1M)

pppd(1M)

pppoec(1M)

pppoed(1M)

pppstats(1M)

pprosetup(1M)

pprosvc(1M)

praudit(1M)

prctmp(1M)

prdaily(1M)

printmgr(1M)

privatepw(1M)

prodreg(1M)

projadd(1M)

projdel(1M)

projmod(1M)

prstat(1M)

prtacct(1M)

prtconf(1M)

prtdiag(1M)

prtdscp(1M)

prtfru(1M)

prtpicl(1M)

prtvtoc(1M)

psradm(1M)

psrinfo(1M)

psrset(1M)

putdev(1M)

putdgrp(1M)

pwck(1M)

pwconv(1M)

quot(1M)

quota(1M)

quotacheck(1M)

quotaoff(1M)

quotaon(1M)

raidctl(1M)

ramdiskadm(1M)

rarpd(1M)

rcapadm(1M)

rcapd(1M)

rctladm(1M)

rdate(1M)

rdisc(1M)

reboot(1M)

regadm(1M)

reject(1M)

rem_drv(1M)

remove_allocatable(1M)

removef(1M)

repquota(1M)

re-preinstall(1M)

restricted_shell(1M)

rexd(1M)

rexecd(1M)

rlogind(1M)

rm_install_client(1M)

rmmount(1M)

rmt(1M)

rndc(1M)

rndc-confgen(1M)

roleadd(1M)

roledel(1M)

rolemod(1M)

root_archive(1M)

route(1M)

routeadm(1M)

routed(1M)

rpcbind(1M)

rpc.bootparamd(1M)

rpcinfo(1M)

rpc.mdcommd(1M)

rpc.metad(1M)

rpc.metamedd(1M)

rpc.metamhd(1M)

rpc.nisd(1M)

rpc.nisd_resolv(1M)

rpc.nispasswdd(1M)

rpc.rexd(1M)

rpc.rstatd(1M)

rpc.rusersd(1M)

rpc.rwalld(1M)

rpc.smserverd(1M)

rpc.sprayd(1M)

rpc.yppasswdd(1M)

rpc.ypupdated(1M)

rpld(1M)

rquotad(1M)

rsh(1M)

rshd(1M)

rstatd(1M)

rtc(1M)

rtquery(1M)

runacct(1M)

rusersd(1M)

rwall(1M)

rwalld(1M)

rwhod(1M)

sa1(1M)

sa2(1M)

sac(1M)

sacadm(1M)

sadc(1M)

saf(1M)

sar(1M)

savecore(1M)

scadm(1M)

sckmd(1M)

sconadm(1M)

sdpadm(1M)

sendmail(1M)

setuname(1M)

setup_install_server(1M)

sf880drd(1M)

sftp-server(1M)

share(1M)

shareall(1M)

share_nfs(1M)

showmount(1M)

showrev(1M)

shutacct(1M)

shutdown(1M)

slpd(1M)

smartcard(1M)

smattrpop(1M)

smbios(1M)

smc(1M)

smccompile(1M)

smcconf(1M)

smcregister(1M)

smcron(1M)

smcwebserver(1M)

smdiskless(1M)

smexec(1M)

smgroup(1M)

smlog(1M)

smmaillist(1M)

smmultiuser(1M)

smosservice(1M)

smpatch(1M)

smprofile(1M)

smreg(1M)

smrole(1M)

smrsh(1M)

smserialport(1M)

smtnrhdb(1M)

smtnrhtp(1M)

smtnzonecfg(1M)

smuser(1M)

snmpbulkget(1M)

snmpbulkwalk(1M)

snmpcmd(1M)

snmpconf(1M)

snmpd(1M)

snmpdelta(1M)

snmpdf(1M)

snmpdx(1M)

snmpget(1M)

snmpgetnext(1M)

snmpinform(1M)

snmpnetstat(1M)

snmpset(1M)

snmptable(1m)

snmptest(1M)

snmptranslate(1m)

snmptrap(1M)

snmptrapd(1M)

snmpusm(1M)

snmpvacm(1M)

snmpwalk(1M)

snmpXdmid(1M)

snmpXwbemd(1M)

snoop(1M)

soconfig(1M)

soladdapp(1M)

soldelapp(1M)

solstice(1M)

sppptun(1M)

spray(1M)

sprayd(1M)

sshd(1M)

ssh-keysign(1M)

startup(1M)

statd(1M)

stclient(1M)

stmsboot(1M)

strace(1M)

strclean(1M)

strerr(1M)

sttydefs(1M)

su(1M)

sulogin(1M)

suninstall(1M)

SUNWafb_config(1M)

SUNWffb_config(1M)

SUNWgfb_config(1M)

SUNWifb_config(1M)

SUNWjfb_config(1M)

SUNWkfb_config(1M)

SUNWm64_config(1M)

SUNWnfb_config(1M)

SUNWpfb_config(1M)

SUNWzulu_config(1M)

svcadm(1M)

svccfg(1M)

svc.configd(1M)

svc.startd(1M)

swap(1M)

sync(1M)

syncinit(1M)

syncloop(1M)

syncstat(1M)

sysdef(1M)

syseventadm(1M)

syseventconfd(1M)

syseventd(1M)

sysidconfig(1M)

sysidkbd(1M)

sysidnet(1M)

sysidnfs4(1M)

sysidns(1M)

sysidpm(1M)

sysidroot(1M)

sysidsys(1M)

sysidtool(1M)

syslogd(1M)

sys-unconfig(1M)

talkd(1M)

tapes(1M)

taskstat(1M)

telinit(1M)

telnetd(1M)

tftpd(1M)

System Administration Commands - Part 3

patchrm

- remove a Solaris patch package and restore previously saved files

Synopsis

patchrm [-f] [-G] [-B backout_dir] 
     [-C net_install_image | -R client_root_path | -S service] 
     [-t] patch_id

Description

patchrm removes a patch package and restores previously saved files to a system running the Solaris 2.x operating environment or later Solaris environments (such as Solaris 8) that are compatible with Solaris 2.x. patchrm cannot be used with Solaris 1 patches. patchrm must be run as root.

With respect to zones(5), when invoked in the global zone, by default, patchrm patches all appropriate packages in all zones. Patch removal behavior in a zones environment varies according to the following factors:

The interaction of the factors above is specified in “Interaction of -G and pkginfo Variable in Zones,” below.

When you remove patches from packages on a Solaris system with zones installed, you will see numerous zones-related messages, the frequency and content of which depend on whether you invoke patchrm in a global or local zone, the setting of SUNW_PKG_ALLZONES, and the use of the -G option.

With the “Zones Parallel Patching” feature, patches can be removed from zones in parallel. Using this feature, patches are removed from all zones first and, once they are removed from all zones, removed from the global zone. For this removal to occur, the patch removal software starts a number of processes whose task is to remove patches from zones. The number of processes to be started would be determined by the num_proc parameter in the configuration file /etc/patch/pdo.conf.

The number of processes to be started is determined in the following order:

  1. The value of the num_proc parameter. Setting this to 1 retains the current behavior of the patch system.

  2. The number of online CPUs in the system.

The upper bound is the number of configured Solaris zones.

Options

The following options are supported:

-B backout_dir

Removes a patch whose backout data has been saved to a directory other than the package database. This option is only needed if the original backout directory, supplied to the patchadd command at installation time, has been moved. Specify backout_dir as an absolute path name.

-C net_install_image

Removes the patched files located on the mini root on a Net Install Image created by setup_install_server. Specify net_install_image as the absolute path name to a Solaris 2.6 or compatible version boot directory. See EXAMPLES.

-f

Forces the patch removal regardless of whether the patch was superseded by another patch.

-G

Remove patch(es) to packages in the current zone only. When used in the global zone, the patch is removed from packages in the global zone only and is not removed from packages in any existing non-global zone. When used in a non-global zone, the patch is removed from packages in the non-global zone only. See “Interaction of -G and pkginfo Variable in Zones,”, below.

-R client_root_path

Locates all patch files generated by patchrm under the directory client_root_path. client_root_path is the directory that contains the bootable root of a client from the server's perspective. Specify client_root_path as the absolute path name to the beginning of the directory tree under which all patch files generated from patchrm will be located. -R cannot be specified with the -S option.


Note - The root file system of any non-global zones must not be referenced with the -R option. Doing so might damage the global zone's file system, might compromise the security of the global zone, and might damage the non-global zone's file system. See zones(5).


-S service

Specifies an alternate service (for example, Solaris_2.3). This service is part of the server and client model, and can only be used from the server's console. Servers can contain shared /usr file systems that are created by smosservice(1M). These service areas can then be made available to the clients they serve. -S cannot be specified with the -R option.

-t

Maintains the patchrm return codes from the Solaris release prior to Solaris 10. On a system with zones(5) installed, a return code of 0 indicates success. Any other return code indicates failure.

Interaction of -G and pkginfo Variable in Zones

The following list specifies the interaction between the -G option and the SUNW_PKG_ALLZONES variable (see pkginfo(4)) when removing a patch in global and local (non-global) zones.

global zone, -G specified

If any packages have SUNW_PKG_ALLZONES set to true: Error; nothing changes.

If no packages have SUNW_PKG_ALLZONES set to true: Remove patch from package(s) in global zone only.

global zone, -G not specified

If any packages have SUNW_PKG_ALLZONES set to true: Remove patch from appropriate package(s) in all zones.

If no packages have SUNW_PKG_ALLZONES set to true: Remove patch from appropriate package(s) in all zones.

local zone, -G specified or not specified

If any packages have SUNW_PKG_ALLZONES set to true: Error; nothing changes.

If no packages have SUNW_PKG_ALLZONES set to true: Remove patch from package(s) in local zone only.

Operands

The following operands are supported:

patch_id

The patch number of a given patch. 104945-02 is an example of a patch_id.

Examples

The examples in this section assume that patch 104945-02 has been installed to the system prior to removal. All of the examples are relative to the /usr/sbin directory.

Example 1 Removing a Patch From a Stand-alone System

The following example removes a patch from a standalone system:

example# patchrm 104945-02

Example 2 Removing a Patch From a Client's System From the Server's Console

The following example removes a patch from a client's system from the server's console:

example# patchrm -R /export/root/client1 104945-02

Note the caveat on the use of the -R option in the description of that option, above.

Example 3 Removing a Patch From a Server's Service Area

The following example removes a patch from a server's service area:

example# patchrm -S Solaris_2.3 104945-02

Example 4 Removing a Patch From a Net Install Image

The following example removes a patch from a Net Install Image:

example# patchrm -C /export/Solaris_2.6/Tools/Boot 104945-02

Files

One configuration file of note:

/etc/patch/pdo.conf

Patch configuration file. Can be used to configure “Zones Parallel Patching” feature.

Exit Status

The following exit values are returned:

0

Successful completion.

>0

An error occurred.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
SUNWswmt, SUNWcsu

See Also

cpio(1), pkginfo(1), patchadd(1M), pkgadd(1M), pkgchk(1M), pkgrm(1M), showrev(1M), pdo.conf(4), pkginfo(4), attributes(5), zones(5)

Diagnostics

The following messages may help in determining some of the most common problems associated with backing out a patch.

Message
prebackout patch exited with return code code.
patchrm exiting.
Explanation and Recommended Action

The prebackout script supplied with the patch exited with a return code other than 0. Generate a script trace of the prebackout script to determine why the prebackout script failed. Add the -x option to the first line of the prepatch script to fix the problem and run patchadd again.

Message
postbackout patch exited with return code code.
patchrm exiting.
Explanation and Recommended Action

The postbackout script supplied with the patch exited with a return code other than 0. Look at the postbackout script to determine why it failed. Add the -x option to the first line of the prepatch script to fix the problem, and, if necessary, re-exececute the postbackout script only.

Message
Only one service may be defined.
Explanation and Recommended Action

You have attempted to specify more than one service from which to backout a patch. Different services must have their patches backed out with different invocations of patchrm.

Message
The -S and -R arguments are mutually exclusive.
Explanation and Recommended Action

You have specified both a non-native service and a client_root_path from which to backout a patch. These two arguments are mutually exclusive. If backing out a patch from a non-native usr partition, the -S option should be used. If backing out a patch from a client's root partition (either native or non-native), the -R option should be used.

Message
The service service cannot be found on this system
Explanation and Recommended Action

You have specified a non-native service from which to backout a patch, but the specified service is not installed on your system. Correctly specify the service when backing out the patch.

Message
Only one client_root_path may be defined.
Explanation and Recommended Action

You have specified more than one client_root_path using the -R option. The -R option may be used only once per invocation of patchrm.

Message
The dir directory cannot be found on this system.
Explanation and Recommended Action

You have specified a directory using the -R option which is either not mounted, or does not exist on your system. Verify the directory name and re-backout the patch.

Message
Patch patch_id has not been successfully installed to this system.
 
Explanation and Recommended Action

You have attempted to backout a patch that is not installed on this system. If you must restore previous versions of patched files, you may have to restore the original files from the initial installation CD.

Message
Patch patch_id has not been successfully applied to this system.
Will remove directory dir.
Explanation and Recommended Action

You have attempted to back out a patch that is not applied to this system. While the patch has not been applied, a residual /var/sadm/patch/patch_id (perhaps from an unsuccessful patchadd) directory still exists. The patch cannot be backed out. If you must restore old versions of the patched files, you may have to restore them from the initial installation CD.

Message
This patch was obsoleted by patch patch_id.
Patches must be backed out in the reverse order in
which they were installed. Patch backout aborted.
Explanation and Recommended Action

You are attempting to backout patches out of order. Patches should never be backed-out out of sequence. This could undermine the integrity of the more current patch.

Message
Patch patch_id is required to be installed by an already 
installed patch_id.
It cannot be backed out until the required patch is backed out first.
Explanation and Recommended Action

Backout the patch that is required to be installed then backout the desired patch.

Message
The installation of patch patch_id was interrupted.
Explanation and Recommended Action

A previous installation was interrupted. The interrupted patch needs to be installed before backing out the desired patch.

Message
Patch patch_id was installed without backing up the original
files. It cannot be backed out.
Explanation and Recommended Action

Either the -d option of patchadd was set when the patch was applied, or the save area of the patch was deleted to regain space. As a result, the original files are not saved and patchrm cannot be used. The original files can only be recovered from the original installation CD.

Message
pkgadd of pkgname package failed return code code.
See /var/sadm/patch/patch_id/log for reason for failure.
Explanation and Recommended Action

The installation of one of patch packages failed. See the log file for the reason for failure. Correct the problem and run the backout script again.

Message
Restore of old files failed.
Explanation and Recommended Action

The backout script uses the cpio command to restore the previous versions of the files that were patched. The output of the cpio command should have preceded this message. The user should take the appropriate action to correct the cpio failure. This is for Solaris 2.4 or previous versions.

Message
Illegal character found during parsing. Read the man page
for pdo config file.
Explanation and Recommended Action

The /etc/patch/pdo.conf follows a specific layout. Each entry in this file should conform to this layout. See pdo.conf(4).

Message
Warning: Cannot open configuration file %s for reading. Using
default serial patching behavior
Explanation and Recommended Action

The /etc/patch/pdo.conf file is missing from the system. This file is typically created during an initial install or update or by applying the patch for the “Zones Parallel Patching” feature. If the file is not present, the default, one-at-time behavior of adding or removing patches from a zoned system would ensue.

Notes

On client server machines the patch package is not removed from existing clients or from client root template space. Therefore, when appropriate, all client machines will need the patch removed directly using this same patchrm method on the client. A bug affecting a package utility (for example, pkgadd, pkgrm, pkgchk) could affect the reliability of patchadd or patchrm which use package utilities to install and backout the patch package. It is recommended that any patch that fixes package utility problems be reviewed and, if necessary, applied before other patches are applied. Existing patches are:

Solaris 2.1:

patch 100901

Solaris 2.2:

101122

Solaris 2.3:

10133

Solaris 2.4 Sparc Platform Edition:

102039

Solaris 2.4 Intel Platform Edition:

102041

Solaris 2.5.1 Sparc Platform Edition:

104578

Solaris 2.51 Intel Platform Edition:

104579

Solaris 2.6 Sparc Platform Edition:

106292

Solaris 2.6 Intel Platform Edition:

106293

Warnings

Certain patches are classified as “deferred activation” patches (sometimes with initial capitals, as “Deferred Activation” patches). Under conditions indicated below, such patches require special treatment. A patch's README file specifies whether that patch is of the deferred activation variety. (Search on “Deferred Activation” in the README file.)

If you are installing or removing a patch that uses deferred activation patching, you must check on the following: