Solaris Jumpstart: applying patches before running install

Solaris Jumpstart: applying patches before running install

Post by Scott Croma » Tue, 10 Jun 1997 04:00:00



Is there any way to set up a Solaris 2.5.1 Jumpstart so that the patches
are installed in the source directory BEFORE the Jumpstart installation
is run?  It is taking much longer to install the entire required patch set
as a post-install script than the actual Jumpstart takes.  If we can patch
the packages in the installation directory rather than patching the OS on
each new machine, we will be able to run Jumpstarts in something like 1/3
as long as it currently takes.

--Scott

 
 
 

Solaris Jumpstart: applying patches before running install

Post by Rob Cas » Mon, 16 Jun 1997 04:00:00



> Is there any way to set up a Solaris 2.5.1 Jumpstart so that the patches
> are installed in the source directory BEFORE the Jumpstart installation
> is run?  It is taking much longer to install the entire required patch set
> as a post-install script than the actual Jumpstart takes.  If we can patch
> the packages in the installation directory rather than patching the OS on
> each new machine, we will be able to run Jumpstarts in something like 1/3
> as long as it currently takes.

> --Scott

I doubt it seeing as how the patch installation utilities only
understand software that is already installed instead of a directory
with a bunch of packages in it.

But if you *do* hear anything, I'd be very interested.

Cheers,
Rob
--
---------------------------------------------------------------------
 Rob Cash, Sr Information Systems Specialist  
 Nortel, Dept 9475
 4001 E. Chapel Hill-Nelson Hwy               Phone: 919/847-1420
 P.O. Box 13010                               FAX:   919/992-1646

---------------------------------------------------------------------

 
 
 

Solaris Jumpstart: applying patches before running install

Post by Chris Barrer » Tue, 17 Jun 1997 04:00:00


You have to trick the install program to get them to install. I wrote
these sets of scripts to be executed within jumpstart to do this. I
haven't
seen anyone else do it this way so feel free to pass it around or repost
it
to the newsgroup. I list two scripts here, the .fin script, and the
script
that installs the recommended patches. I think from there you can handle
anything else.

Within your install.fin script do this:
-----------------------------------------------------------------
#!/bin/sh -x
# This is the REAL root where Solaris gets installed.
ROOT=/a

# Specify the fileserver here where your jumpstart scripts reside
INSTALL_SERV=

# The root path to your jumpstart directory
INSTALL_DIR=

# Our Jumpstart scripts are here:
JUMPSTARTDIR=${INSTALL_DIR}/jumpstart

# Now run all script that install patches, packages, custom
# configurations, etc... That must be done so in a chroot'ed
# environment.
#
# This chroot'ed environment is necessary because during the
# solaris installation, the local disk filesystem on which
# solaris was installed is root'ed under /a. The cdrom image
# is currently the real root, "/".

mkdir -p ${ROOT}/${INSTALL_DIR}
mount -F nfs ${INSTALL_SERV} ${ROOT}/${INSTALL_DIR}

if [ $? = 0 ] ; then  # mount succeeded, we can proceed

   # Most Solaris install utilities bomb when run after OS install
   # in the chroot'ed environment because they need to check on
   # disk space. The dependancies are on primarily these two files:
   # /etc/mnttab and /etc/.mnttab.lock. There may be others.
   # We must put appropriate versions out there for the chroot'ed
   # environment.
   touch ${ROOT}/etc/.mnttab.lock
   cat /etc/mnttab | sed -e 's/\/a/\//' | sed -e 's/\/\//\//' \
        > ${ROOT}/etc/mnttab

   # Now having done that, we can call all routines that require
   # this environment.

   /usr/sbin/chroot ${ROOT} ${JUMPSTARTDIR}/install_root_pw
   /usr/sbin/chroot ${ROOT} ${JUMPSTARTDIR}/install_patches
   /usr/sbin/chroot ${ROOT} ${JUMPSTARTDIR}/install_cde
   /usr/sbin/chroot ${ROOT} ${JUMPSTARTDIR}/install_custom_files

   # Clean up

   # The following tells solaris to not prompt for root passwd
   # on reboot after install since we just set the password.
   sed -e 's/0  # root/1        # root/' ${SI_SYS_STATE} > /tmp/state.$$
   mv /tmp/state.$$ ${SI_SYS_STATE}

   umount ${ROOT}/${INSTALL_DIR}

else # mount failed
   echo "Error: Could not mount ${INSTALL_SERV} for installation."
fi

# Final cleanup, remove the install mount-point.
rm -rf ${INSTALL_DIR}

######
# END
######
=====================================================================
Here is the ${JUMPSTARTDIR}/install_patches script
=====================================================================
#!/bin/sh

# The root path to location of your install stuff (mounted in the .fin
script)
INSTALL_DIR=

PATCH_DIR=${INSTALL_DIR}/patches/2.5.1_Recommended

if [ -d ${PATCH_DIR} -a -x ${PATCH_DIR}/install_cluster ] ; then
   echo "Applying Recommended Patch cluster and Security Patches"
   cd ${PATCH_DIR}
   ${PATCH_DIR}/install_cluster -q /${PATCH_DIR}
else
   echo "Error: install_cluster script not found."
fi
######
# END
######
=====================================================================
=====================================================================

 
 
 

1. Applying Solaris 10 patches during Jumpstart

If you are doing network installs of Solaris 10 machines, you may
be interested a procedure that I've developed.  As the last step
in the finish script, it uses `smpatch' to analyze the target
machine and download patches.  During the reboot, it applies the
patches and does a second reboot.  I'm quite pleased with the
result.

Source and instructions are available at:

        ftp://ftp.cc.umanitoba.ca/src

Look for `js-apply-patches.tar.Z'.  The tar file unpacks into the
current directory.

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

2. upgrade or start from scratch? (was: /boot files missing?)

3. Solaris jumpstart fails after applying patch cluster..

4. newfs avgfilesize mp3 - Is Disk Tuning a waste of time?

5. Problems applying patches with Jumpstart

6. Memory management from Unix to Windows/Mac

7. Apply patches by a JumpStart finish script?

8. email acknowledgement

9. Applying latest Recommended/Security patches installs grub, but "Solaris failsafe" grub option is missing.

10. Year 2000 patch: to apply or not to apply?

11. 2.6 cron patch broken (after applying Y2K patch) ?

12. Recommended patch cluster - patch not applied

13. compiling 1.2.13 after applying io.h patch and elf patch