How to Remove a Solaris Patch While Booted From a Network or CD-ROMEnda O'Connor, April 2009 This article covers the following topics:
IntroductionThis document provides instructions on how to run the The main reason for booting alternate media in order to run Caution: Before running So the first step must be to determine the root cause of the problem that led to an unbootable or corrupted system to begin with.
This step is vital; without doing this,
To facilitate proper root-cause analysis, please read the BigAdmin article Analyzing a patchadd or patchrm Failure in the Solaris OS, which describes what files are most likely to be relevant for determining the root cause of a patch-related failure. When used with this document, the Patch Analysis article allows you to gather important system information that should help identify the underlying issue that caused the failure. Only as a last resort should you remove a patch without understanding the reason why it needs to be removed; you need to understand more than just that the patch appears to have caused a problem. A recurring theme during software maintenance is that a system fails to reboot, but this problem can be caused by numerous issues, such as underlying disk instability resulting in corruption. Removing a patch based on this, will make the situation much worse in all likelihood. The recommended way to prevent problems with critical software, such as the operating system, is by using mirroring on the root file system, particularly by using Solaris Volume Manager. This method allows you to mirror the operating system on two physical disks, and prior to patching, you can break the mirror and then patch only one half of the mirror. If a problem is discovered, it should be possible to boot from the other half of the mirror (the unpatched half). It is strongly advised that you use Solaris Volume Manager for mirroring root file systems, as opposed to using Veritas Volume Manager (VxVM) mirroring of root file systems. This is due to VxVM disk encapsulation, which, depending on the disk layout and free partitions on the root disk, might create a hard-to-manage disk layout that causes issues when trying to rescue such a layout. Also, there is the common misconception in the sys admin world that encapsulating a disk in VxVM equates to mirroring. This is a major mistake. Encapsulation is only the first step towards mirroring a root file system, whereby the currently installed root file system disk is given over to VxVM control and the data is preserved (encapsulated). You then need to mirror the encapsulated root disk using further VxVM commands. Please read the BigAdmin article How to Split a Root Mirrored With Solaris Volume Manager Prior to Updating Software for information on how to properly break a Solaris Volume Manager mirror and later reattach the mirror. If your system's boot disks are managed by VxVM, it is strongly advised that you read the Sun BluePrints document Towards a Reference Configuration for VxVM Managed Boot Disks (pdf, August 2000), so you are aware of the issues that affect boot disks that are managed by VxVM. Steps for Mounting the Root File System and Other Necessary File Systems1. Boot from the media or the network. 2. Mount the root file system and any other required file systems. This process is covered in the next section, Mounting Examples. Mounting ExamplesExample 1: Using Standard UFS Disk SlicesAssume that # mount /dev/dsk/c0t0d0s0 /a # mount /dev/dsk/c0t0d0s4 /a/var # mount /dev/dsk/c0t0d0s5 /a/zones # mount /dev/dsk/c0t0d0s6 /a/usr The root file system is now mounted under Now run #/usr/sbin/fsck -F ufs -m /dev/dsk/c0t0d0s0 The If a repair is necessary, run the following: /usr/sbin/fsck -F ufs -o p /dev/dsk/c0t0d0s0 Make sure you retain the output from the previous commands in case it becomes necessary to run Example 2: Using ZFS RootFor this example, you must be booted from at least the Solaris 10 10/08 OS media. Issue the following command, which displays the list of pools that are available for importing: zpool import After the root pool has been identified, run the following: zpool import -R /a <pool_name> If there are non-global zones on the system and they reside on a pool, import the pool as well using
If there are non-global zones installed and the zonepath resides on a Solaris Volume Manager metadevice, for example, if the following configuration existed prior to patching: /zones on d20 root@oyster # metastat -p d20 d20 -m d21 d22 1 d21 1 1 c0t2d0s0 d22 1 1 c0t3d0s0 Then mount # cp /a/kernel/drv/md.conf /kernel/drv/md.conf Now update the Solaris Volume Manager driver to load the configuration: # update_drv -f md Ignore any error messages from # metainit -r If you have mirrors, you should run # mount /dev/md/dsk/d20 /a/zones Please see Example 3: Mounting When the System Is Running a Solaris Volume Manager Mirror, which describes how to run
Example 3: Mounting When the System is Running a Solaris Volume Manager MirrorIn this scenario, the system was running a Solaris Volume Manager mirror prior to the system becoming unbootable. In such a case,
you need to do some manual work to enable you to mount the So, assume the root disk is laid out as follows:
Run the following: root@oyster # metastat -p d10 d10 -m d11 d12 1 d11 1 1 c0t2d0s0 d12 1 1 c0t3d0s0 root@oyster # metastat -p d20 d20 -m d21 d22 1 d21 1 1 c0t2d0s1 d22 1 1 c0t3d0s1 First, boot from the media: #boot net -s Now mount one of the subdisks read-only, so you cannot accidentally damage the subdisk: # mount -o ro /dev/dsk/c0t0d0s0 /a Then set up the current booted environment so it can use Solaris Volume Manager: # cp /a/kernel/drv/md.conf /kernel/drv/md.conf # umount /a Now update the Solaris Volume Manager driver to load the configuration: # update_drv -f md Ignore any error messages from # metainit -r If you have mirrors, you should run # mount /dev/md/dsk/d10 /a # mount /dev/md/dsk/d20 /a/var If non-global zones are installed, they need to be mounted prior to running Run #/usr/sbin/fsck -F ufs -m /dev/md/dsk/d10 The /usr/sbin/fsck -F ufs -o p /dev/md/dsk/d10 Make sure you retain the output from the previous commands in case it becomes necessary to run Running
|
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics | ||||