2007年 5月 15日 火曜日
Messages in cipher reflected in the looking glass
(EN) Diskless Solaris x86 Part 3 : Apply patches to the diskless client
Part 3 is about adding patches to the diskless client.
I think this is very important.
smosservice command has an ability to apply patch to the OS image of the
diskless clients.
Applying patches which smosservice is two steps.
First step is that add patches to the spool by "smosservice patch" .
For example, the patch of in.telnetd is applied to the diskless client.
If you are using Solaris 10, you should apply this patch.
# /usr/sadm/bin/smosservice patch -- -a /tmp/120069-03
If smc service down with EXM_RMIERROR, you can restart it as follows.
# svcadm restart wbem
When the addition of the patch to the spool succeeds,
the patch copy into /export/diskless/Patches directory.
# ls /export/diskless/Patches 120069-03 Archive
Archive directory is an area where the applied patch is in.
You can check whether patch is added into spool
by "smosservice patch -- -p"
# /usr/sadm/bin/smosservice patch -- -P Patches In Spool Area Os Rel Arch Patch Id Synopsis -------------------------------------------------------------------------------- 10 i386 120069-03 SunOS 5.10_x86: in.telnetd patch 86 i386 120069-03 SunOS 5.10_x86: in.telnetd patch
The patch of the x86 edition seems to become two-line display,
the patch of the SPARC version is one line. In case of
Next step is applying(distributing) patches to all diskless client.
# /usr/sadm/bin/smosservice patch -- -m -U
After that, check whether patch was applied or not.
# /usr/sadm/bin/smosservice patch -- -P Os Rel Arch Patch Id Synopsis -------------------------------------------------------------------------------- 10 i386 120069-03 SunOS 5.10_x86: in.telnetd patch 86 i386 120069-03 SunOS 5.10_x86: in.telnetd patch
Patch seems not be applied.
Patch seems not be applied in the test environment, but this patch is very important patch.
So, I tried to apply patch by another way.
Generally, to use patchadd command to apply patch.
When the patch is applied to Solaris OS, the patchadd command is used usually.
Patchadd command has -R option to set directory (client root path).
The following is output of the patchadd command.
# patchadd
Patch or "-M patchdir" must be specified.
Usage:
patchadd [-G] [-t] [-d] [-u] [-n] [-B backout_dir]
[-k keystore] [-P passwd] [-x proxy] [target] source
patchadd -p [target]
patchadd -Z
[target] specifies destination system to apply or query patches,
and can be one of:
[-C net_install_image] - apply/query patch on mini root
[-R client_root_path] - apply/query patch on bootable
client root
Client root patch can be set with -R option,
but patchadd seems not have an option to use(set) admin file.
Therefore, patchadd command cannot change "basedir".
In diskless client environment,
/var directory is in /export/Solaris_10, this directory has package informations,
and /usr directory is in /export/Solaris_10/usr_i386.all/ ( /export/exec ).
So, to applied the patch, It is necessary to make the symbolic link as follows.
# cd /export/Solaris_10 # ln -s ./usr_i386.all/usr usr
After that, apply patch by patchadd -R .
# patchadd -R /export/Solaris_10 120069-03 Validating patches... Loading patches installed on the system... Done! Loading patches requested to install. Done! Checking patches that you specified for installation. Done! Approved patches will be installed in this order: 120069-03 Checking installed patches... Verifying sufficient filesystem capacity (dry run method)... Installing patch packages... Patch 120069-03 has been successfully installed. See /export/Solaris_10/var/sadm/patch/120069-03/log for details Patch packages installed: SUNWtnetd
You can check whether the patch is applied or not as follows.
Output of this sample includes patch information,
which is in /usr or /opt directory only.
If you want to know the information which in / (root) directory,
set diskless client's root directory to -R option.
( e.g. /export/root/w1100z )
# patchadd -p -R /export/Solaris_10 | grep 120069 Patch: 120069-01 Obsoletes: Requires: Incompatibles: Packages: SUNWtnetd Patch: 120069-03 Obsoletes: Requires: Incompatibles: Packages: SUNWtnetd
The followings are example to apply patch to / (root) directory.
# patchadd -R /export/root/cloneSolaris_10/i86pc/ ( clone ) # patchadd -R /export/root/w1100z ( diskless client : w1100z )
To use this method, you can apply patches to the diskless client,
but it becomes a problem in the following case.
- Target patch requires other patches. One is applied into / (root) directory, another is applied into /usr directory.
- Target patch has 2 or more packages, and some packages is applied into / (root) directory, other packages is applied into /usr directory.
If you want to applied these patch into diskless client enviroment with patchadd command, a more thorough customizing is needed.
Posted at 05:34午後 5 15, 2007 by Yasuhiro Fujitsuki in Linux & Solaris(EN) |