<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Running UNIX &#187; patch</title>
	<atom:link href="http://www.runningunix.com/tag/patch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.runningunix.com</link>
	<description>UNIX/Solaris tips, tricks, and advice</description>
	<lastBuildDate>Mon, 01 Aug 2011 17:37:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Backing out Patches from an Unbootable Server</title>
		<link>http://www.runningunix.com/2009/06/backing-out-patches-from-an-unbootable-server/</link>
		<comments>http://www.runningunix.com/2009/06/backing-out-patches-from-an-unbootable-server/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:52:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[patching]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[net]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[patchrm]]></category>
		<category><![CDATA[unbootable]]></category>

		<guid isPermaLink="false">http://www.runningunix.com/?p=251</guid>
		<description><![CDATA[Sometimes when patching gets interrupted &#8211; by a user, power outage, hardware failure, etc, you can end up with incomplete or mis-installed patches. If these patches are important ones &#8211; like kernel patches, your system may not even boot from disk. Many times this will cause an endless reboot cycle of kernel panics. Of course [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when patching gets interrupted &#8211; by a user, power outage, hardware failure, etc, you can end up with incomplete or mis-installed patches. If these patches are important ones &#8211; like kernel patches, your system may not even boot from disk. Many times this will cause an endless reboot cycle of kernel panics.</p>
<p>Of course you could have prevented this by breaking your root mirror before installing the patches, or by using LiveUpgrade. But I know sometimes we just don&#8217;t do these things, for various reasons.</p>
<p>One solution to this is to boot from the network into single-user mode, mount your root disk, and back out the patch or patches on disk, hopefully repairing the damage and returning you to a bootable state. Of course this is assuming you have a jumpstart server on your network as well. NOTE: I tested this with a Solaris 10 06/06 boot image on the jumpstart server &#8211; I haven&#8217;t tested earlier versions)</p>
<p>Where I am, all the root disks are mirrored with SVM. An procedure I&#8217;d used in the past was to boot from the network, run patchrm on the first disk in the mirror to back out the patch, and then disable the mirror, so the second disk would not be used when rebooted. Then re-mirror later. This was rather tedious and error-prone, especially with multiple metadevices, soft partitions, etc. I found a new way to accomplish this task: keep the mirror intact and back out the patches while booted from the network. Our systems also use zones, and their zonepaths are on soft partitions. This procedure will also back out the patches from the zones. Here is the exact procedure:<br />
<code><br />
1. Boot from network into single-user mode<br />
	ok> boot net -s<br />
2. Mount root file system READ ONLY from the first disk in the mirror:<br />
	# mount -o ro /dev/dsk/c1t0d0s0 /mnt<br />
3. Copy the SVM configuration to the running OS:<br />
	# cp /mnt/kernel/drv/md.conf /kernel/drv/md.conf<br />
4. Unmount the root disk<br />
	# umount /mnt<br />
5. Update the SVM driver to load the new configuration (ignore error messages)<br />
	# update_drv -f md<br />
6. Set up metadevices in configuration<br />
	# metainit -r<br />
7. Run metasync on root mirror metadevice<br />
	# metasync d10<br />
8. Mount root metadevice on /mnt<br />
	# mount /dev/md/dsk/d10 /mnt<br />
9. If the system has zones, run metasync on the metadevice containing the soft partitions, and mount all zone root file systems<br />
	# metasync d40<br />
	# mount /dev/md/dsk/d53 /mnt/zones/zonepath1<br />
	# mount /dev/md/dsk/d56 /mnt/zones/zonepath2<br />
10. Rollback the failed patch.<br />
	# patchrm -R /mnt $patch 2>&#038;1 | tee -a /mnt/backout.log<br />
11. umount /mnt and reboot server<br />
</code></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.runningunix.com%2F2009%2F06%2Fbacking-out-patches-from-an-unbootable-server%2F&amp;title=Backing%20out%20Patches%20from%20an%20Unbootable%20Server" id="wpa2a_2"><img src="http://www.runningunix.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.runningunix.com/2009/06/backing-out-patches-from-an-unbootable-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cleaning out /var in Solaris</title>
		<link>http://www.runningunix.com/2009/02/cleaning-out-var-in-solaris/</link>
		<comments>http://www.runningunix.com/2009/02/cleaning-out-var-in-solaris/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 04:59:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[var]]></category>

		<guid isPermaLink="false">http://www.runningunix.com/?p=234</guid>
		<description><![CDATA[Since your Solaris 10 installation, your data in the /var file system will grow each time you apply a patch. Depending on your patching strategy, over time you could find yourself running out of space, if you use a dedicated /var partition. This, in addition to mail, and logging from all kinds of applications can [...]]]></description>
			<content:encoded><![CDATA[<p>Since your Solaris 10 installation, your data in the /var file system will grow each time you apply a patch. Depending on your patching strategy, over time you could find yourself running out of space, if you use a dedicated /var partition. This, in addition to mail, and logging from all kinds of applications can worsen the problem.</p>
<p>I&#8217;d say the best strategy is to increase the size of /var. If you&#8217;re using the standard UFS file system with no volume management, this means backing up, re-creating the partition, and restoring the data. If you do have some sort of volume management, sometimes the answer is a simple metattach/growfs or vxresize command.</p>
<p>If you want another option, just to get your by until you have the time to increase /var, there is another easy method. When patchadd adds any patch to the system, the files being replaced get saved off in case you need to remove the patch later, restoring these files. These files are compressed and stored in /var/sadm/pkg/
<pkgname>/save/<PatchID> and in /var/sadm/pkg/
<pkgname>/save/pspool/
<pkgname>/save/<PatchID>.  The files are called undo.Z.</p>
<p>Note: It is completely safe to delete these .Z files, as long as you are sure you will never need to back out its associated patch! Doing this can free up significant space.</p>
<p>I&#8217;ve even done things like this in a pinch: (the shotgun approach)</p>
<blockquote><p>#find /var -name undo.Z -exec rm {} \;
</p></blockquote>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.runningunix.com%2F2009%2F02%2Fcleaning-out-var-in-solaris%2F&amp;title=Cleaning%20out%20%2Fvar%20in%20Solaris" id="wpa2a_4"><img src="http://www.runningunix.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.runningunix.com/2009/02/cleaning-out-var-in-solaris/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

