<?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>Tork Wrench &#187; Centos</title>
	<atom:link href="http://www.torkwrench.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torkwrench.com</link>
	<description>Things I learnt today, working on IBM Lotus Web Content Management.</description>
	<lastBuildDate>Tue, 17 Aug 2010 06:50:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DB2 9.5 install hangs on Linux during db2icrt</title>
		<link>http://www.torkwrench.com/2010/06/22/db2-9-5-install-hangs-on-linux-during-db2icrt/</link>
		<comments>http://www.torkwrench.com/2010/06/22/db2-9-5-install-hangs-on-linux-during-db2icrt/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 02:07:16 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[random]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[db2]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=243</guid>
		<description><![CDATA[How to fix a hung DB2 9.5 install on Linux. <a href="http://www.torkwrench.com/2010/06/22/db2-9-5-install-hangs-on-linux-during-db2icrt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I spent a bunch of time cleaning up our collection of kickstart files. It&#8217;s a grind, I must&#8217;ve rerun the Redhat installer 40 times in the last 24 hours. The nice thing is that we now have the same base linux install for all the different versions of Redhat and Fedora that we are using. </p>
<p>All this change has thrown up some new problems however. For each of the installs I was doing, the system would hang when trying to install DB2. </p>
<p>When there is a problem with the db2 install, the first place to go is the /tmp/db2setup.log. Inside that it seemed to be hanging on the instance creation step.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Command to be run: &quot;cd /opt/ibm/db2/V9.5/;/opt/ibm/db2/V9.5/instance/db2icrt -a server -s wse -u db2fenc1 -p db2c_db2inst1 db2inst1&quot;.</div></div>
<p>Looking through the output of <strong>ps -ef | grep db2</strong>, I saw a suspicious process called UpdateAutoRun.sh. </p>
<p>I couldn&#8217;t find a DB2 specific technote for this error, but a bit of searching brought up <a href="http://www-01.ibm.com/support/docview.wss?uid=swg1IZ18123">this one from Tivoli Monitoring (ITM).</a> Apparently DB2 installs an instance of ITM along with DB2 &#8211; I&#8217;m not sure what it is for. Anyway, there seems to be a dodgy script inside the ITM that relies on the venerable text editor &#8216;ed&#8217;. Without ed installed the log file <db2home>/itma/logs/UpdateAutoRun.log keeps filling up with the line:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">UpdateAutoRun.sh info: &nbsp;Delete of agent start all record successful.</div></div>
<p>Installing ed in (even while db2setup is running!) allows this script to finish and the rest of the install to complete successfully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/06/22/db2-9-5-install-hangs-on-linux-during-db2icrt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add additional packages to a Fedora repo</title>
		<link>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/</link>
		<comments>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 05:28:56 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[createrepo]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=212</guid>
		<description><![CDATA[How to add extra packages to your Fedora / CentOS / RHEL repository with the createrepo command. <a href="http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s time to give Fedora 12 a whirl on our servers. In the lab we are massive users of anaconda&#8217;s kickstart system for doing unattended installs. This means that everything has to be perfect, otherwise the install will hang. For instance, if a package that you have defined in the kickstart isn&#8217;t there, anaconda (the name for Fedora&#8217;s installer) will hang. </p>
<p>I&#8217;ve noticed that Fedora has dropped the compat-libstdc++-296 and compat-libstdc++-33, which we require for DB2. The compat packages are in still the &#8216;Everything&#8217; directory in the <a href="http://mirrors.fedoraproject.org/publiclist/Fedora/12/">Fedora 12 mirror sites</a>, so we can download them and add them to our repository. This approach would work with any RHEL/CentOS/Fedora type distro.</p>
<p>1. Extract the CD/DVD to a folder.<br />
2. Copy the packages you would like to add to the Packages subdirectory<br />
3. Cd to the top level directory of the extracted files (you should see directories like Packages, repodata, images as subdirectories )<br />
4. Run this command :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">createrepo --update -g repodata/comps.xml .</div></div>
<p>This will update the package metadata in the repodata directory to include the new packages that you have added.<br />
5. Add your new packages to the %packages section of the kickstart file &#8211; anaconda will now find the packages. For example, this is what mine says:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">%packages --nobase<br />
@core<br />
vim-enhanced<br />
-exim<br />
-samba-winbind<br />
-cairo<br />
-krb5-libs<br />
-fedora-release-notes<br />
-python<br />
-python-libs<br />
-gtk2<br />
-selinux-policy-targeted<br />
-selinux-policy<br />
-policycoreutils<br />
-system-config-samba<br />
-wireless-tools<br />
-openldap<br />
-libthai<br />
-cups-libs<br />
-efibootmgr<br />
-hicolor-icon-theme<br />
-fedora-logos<br />
-system-config-network-tui<br />
-system-config-firewall-tui<br />
-perl-Module-Pluggable<br />
-perl-Convert-ASN1<br />
-perl<br />
-popt<br />
-libtiff<br />
-libselinux<br />
-libselinux-devel<br />
-linux-atm-libs<br />
-cyrus-sasl-lib<br />
-ed<br />
-newt-python<br />
-mdadm<br />
-python-numeric<br />
-kudzu<br />
-gamin<br />
-parted<br />
-wireless-tools<br />
@smb-server<br />
libaio<br />
wget<br />
yum<br />
rpm-build<br />
createrepo<br />
sudo<br />
ntp<br />
openssh-server<br />
openssh-clients<br />
dhclient<br />
kernel-headers<br />
gcc<br />
gcc-c++<br />
mlocate<br />
anacron<br />
vixie-cron<br />
crontabs<br />
make<br />
curl<br />
unzip<br />
svn<br />
compat-libstdc++-296<br />
compat-libstdc++-33<br />
<br />
%post</div></div>
<p>This package selection is really minimal and enables us to build a Fedora machine from nothing in about 5 minutes!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/04/21/how-to-add-additional-packages-to-a-fedora-repo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing RHEL 5 using the VMware Paravirtualized SCSI driver (pvscsi)</title>
		<link>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/</link>
		<comments>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/#comments</comments>
		<pubDate>Wed, 06 Jan 2010 02:24:32 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[Centos]]></category>
		<category><![CDATA[kickstart]]></category>
		<category><![CDATA[pvscsi]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=184</guid>
		<description><![CDATA[How to install RHEL 5 with the VMware Paravirtualized SCSI driver embedded into the installation media, and then how to automate the installation using it <a href="http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>VMware ESX 4.0 offers a number of different SCSI disk controllers. One of the newer and more interesting ones is the paravirtualized scsi adapter. As with any type of paravirtualized  driver the paravirtualized scsi driver promises to be faster and use less CPU cycles than the other storage drivers, and since I/O performance is so important to overall system performance in virtualized environments, I thought it was worth a look. I don&#8217;t have any solid numbers about how it performs with WebSphere Portal, but once I do you will be the first to know.</p>
<p>The new driver has a number of drawbacks, most notably it is not supported as a boot device. VMware expect you to configure your OS on one &#8216;normal&#8217; drive and then install a secondary drive with the paravirtualized adaptor. As well as being a pain from a management standpoint , it also ignores the speed increases that you would derive from having the OS on this faster device.</p>
<p>The method below will allow you to install Red Hat Enterprise 5.4 on your primary boot device using the pvscsi driver, and includes steps about how to automate the process with Redhat&#8217;s excellent kickstart system. If you are just interested in doing this on one system, <a href="http://vmadmin.nt.com.au/?p=28" target="_blank">I would follow these steps instead .</a> My steps are good if you want to automate this procedure over many machines, but it&#8217;s probably overkill if you just want to try pvscsi on one machine. Hopefully these steps will be outdated soon when the pvscsi module makes it into the regular mainline kernel, which looks like it might happen in 2.6.33!</p>
<p>1. Create a new VM from the vSphere Console in the usual way.</p>
<p>2. Click edit settings on the new VM and select the SCSI controller 0 device, then up on the right hand side pane, click Change SCSI Controller Type and select VMware Paravirtual.</p>
<p><img class="aligncenter size-full wp-image-185" title="pvscsi-esx" src="http://www.torkwrench.com/wp-content/uploads/2010/01/pvscsi-esx.png" alt="pvscsi-esx" width="460" height="340" /></p>
<p>Now we must create boot media. I use iso images and the virtual cdrom device in VMware, but you could modify these steps and use them with PXE booting or USB booting quite easily. The process here is to add the pvscsi kernel module to the boot disk, so the RHEL installer can see the VMware disk.</p>
<p>3. Grab the prebuilt boot.iso from the images/ subdirectory and unextract it. You can do this by running:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mount -o loop boot.iso /mnt/boot<br />
<br />
cd /mnt/boot<br />
<br />
mkdir ~/boot<br />
<br />
cp -R * ~/boot<br />
<br />
cd ~/boot</div></div>
<p>You should now have an isolinux subdirectory in this directory.</p>
<p>4. Extract initrd.img . This is the initial ram disk which contains the boot files that the installer requires to run. Create a temp directory and extract it into it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mkdir tmp<br />
cd tmp<br />
gzip -dc ../initrd.img | cpio -ivd</div></div>
<p>5. Now we need to extract (again!) the modules archive, so we can add pvscsi to it.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd modules<br />
gzip -dc modules.cgz | cpio -ivd</div></div>
<p>This will make a new subdirectory which will have the same name as your kernel version. Mine looks like this :<br />
2.6.18-164.el5/x86_64<br />
If you are running a 32 bit kernel or a different version of Redhat, yours will look slightly different.</p>
<p>6. Extract the VMware tools rpm and copy the precompiled driver into the modules directory. Make another temp directory and copy the Vmware Tools rpm into it. You should be able to get the VMware tools rpm from your ESX host or from the VMware website.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm2cpio VMwareTools-4.0.0-latest.i386.rpm | cpio -idmv<br />
find . -name pvscsi.o | grep 2.6.18-164.el5 (this will return the path to where the driver is - the one below is my path)<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.o<br />
cp usr/lib/vmware-tools/modules/binary/bld-2.6.18-8.el5-x86_64smp-RHEL5/objects/pvscsi.o [temp dir from step 4]/modules/2.6.18-164.el5/x86_64/pvscsi.ko</div></div>
<p>Then delete the temporary VMware tools directory.</p>
<p>7. Now we need to edit a bunch of text files that are in the modules subdirectory so Redhat can find the new driver.</p>
<p>At the bottom of module-info add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; scsi<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;VMware PVSCSI driver&quot;</div></div>
<p>At the bottom of modules.alias add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">alias pci:v000015ADd000007C0sv*sd*bc*sc*i* pvscsi</div></div>
<p>At the bottom of modules.dep add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">pvscsi: scsi_mod</div></div>
<p>In pci.ids, search for &#8217;15ad&#8217; . You will see an entry for a few  VMware devices. To this list add:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>The whole stanza will look something like this:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">15ad &nbsp;VMware<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0405 &nbsp;SVGA II Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 0710 &nbsp;SVGA Adapter<br />
&nbsp; &nbsp; &nbsp; &nbsp; 07c0 &nbsp;PVSCSI SCSI Controller</div></div>
<p>8. Now we need to compress everything. First the modules.cgz (and still in the modules directory) :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">find 2.6.18-164.el5 | cpio -H newc -ov | gzip -9 -c - &gt; modules.cgz<br />
rm -rf 2.6.18-164.el5</div></div>
<p>9. Compress the initrd.img</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
find . | cpio -H newc -ov | gzip -9 -c - &gt; initrd.img</div></div>
<p>10. Everything is compressed up again, now to make a boot cd.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd ..<br />
mkisofs -o pvscsi.iso -V pvscsi -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -T .</div></div>
<p>11. Copy pvscsi.iso to your ESX datastore and click edit settings on your paravirtualized guest vm. Set the cdrom to boot from pvscsi.iso . </p>
<p>This is enough to get the installation image to boot correctly with the pvscsi driver, but what will happen next is that the server will reboot using the regular kernel, and it won&#8217;t have the pvscsi driver available to it, so the machine will not reboot. We need to install and configure the VMware tools rpm after the RHEL install so when the machine reboots it will have access to the pvscsi driver file. </p>
<p>If you don&#8217;t want to use kickstart to do this, and the end of the install, drop into a shell by typing ALT-CTRL-F2 and download the VMware tools rpm from a local webserver, or you could copy it to the guest VM using scp or something. For example :</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rpm -Uvh http://yourwebserver/vmwaretools.rpm<br />
vmware-config-tools.pl --default</div></div>
<p>Reboot and you should be good. Read on if you would like to automate this procedure.</p>
<p>12.The easiest way to create a kickstart file is to run through a normal install and then to copy the ~/anaconda-ks.cfg file from the server, which will have all your settings saved in it. <a href="http://www.torkwrench.com/wp-content/uploads/2010/01/example2.cfg">Or look at my example. </a> . All you should need to do here is change the url, key, hostname, rootpw parameters and edit the url to the vmware tools rpm to something valid for your environment and you should be good to go.</p>
<p>Stay tuned for performance numbers to show if any of this is even worth it! <img src='http://www.torkwrench.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/01/06/installing-rhel-5-using-the-vmware-paravirtualized-scsi-driver-pvscsi/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
