<?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>Capi's Corner &#187; troubleshooting</title>
	<atom:link href="http://www.dont-panic.cc/capi/tag/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dont-panic.cc/capi</link>
	<description>Development, Network, Security, Ideas &#038; Opinions</description>
	<lastBuildDate>Sat, 10 Dec 2011 19:31:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>OCZ Vertex2, Linux, and ancient nForce 430 chipset</title>
		<link>http://www.dont-panic.cc/capi/2010/12/01/ocz-vertex2-linux-and-ancient-nforce-430-chipset/</link>
		<comments>http://www.dont-panic.cc/capi/2010/12/01/ocz-vertex2-linux-and-ancient-nforce-430-chipset/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 21:58:16 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[computer]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ssd]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/?p=274</guid>
		<description><![CDATA[Today I finally received my brand-new Ocz Vertex2 OCZSSD2-2VTXE120G 120GB and eagerly wanted to install it in my 4-year-old HP workstation which currently is running Ubuntu 10.10 exclusively. After setting up the alignment according to some tutorials I found online, I started the setup process. Shortly after starting the copy step of the installation, the [...]]]></description>
			<content:encoded><![CDATA[<p>Today I finally received my brand-new Ocz Vertex2 OCZSSD2-2VTXE120G 120GB and eagerly wanted to install it in my 4-year-old HP workstation which currently is running <a href="http://www.ubuntu.com/">Ubuntu</a> 10.10 exclusively.</p>
<p>After setting up the alignment according to some <a href="http://www.ocztechnologyforum.com/forum/showthread.php?54379-Linux-Tips-tweaks-and-alignment">tutorials</a> I found online, I started the setup process. Shortly after starting the copy step of the installation, the whole process came to a grinding halt with filesystem errors. Looking into the kernel debug messages it seemed like <a href="http://en.wikipedia.org/wiki/Serial_ATA">SATA</a> commands were causing errors. After checking hardware, cables and switching SATA ports, I began researching the issue and soon found that the issue might be fixed in the next firmware version of the drive. So I wanted to upgrade from 1.23 to 1.24, which could only be done in Windows&#8230;</p>
<p>After installing a trial of Windows 7, I finally wanted to upgrade the firmware, but the drive was not detected, but was accessible. The release notes indicated that I would need to switch to <a href="http://en.wikipedia.org/wiki/Advanced_Host_Controller_Interface">AHCI</a> mode. After several attempts, includig a BIOS update, I realized that there was no way to do this with my old hardware, as my <a href="http://en.wikipedia.org/wiki/NForce">nForce</a> 430 chipset simply doesn&#8217;t support it.</p>
<p>So my only remaining option was to simply try the kernel arguments I read to be the fix for 1.24 with the 1.23 hardware.</p>
<p>So, if you add the following kernel option during installation and afterwards for every boot, the disk seems to work quite well (<a href="http://www.ocztechnologyforum.com/forum/showthread.php?72572-Vertex-LE-breakdown-in-Linux&amp;p=579861&amp;viewfull=1#post579861">source</a>):</p>
<blockquote><p><code>libata.force=norst</code></p></blockquote>
<p>Actually, this forces the ATA driver in Linux to <em>not</em> issue any reset commands on the bus. I really don&#8217;t understand why this improves/fixes the problem, but it seems the device has issues when being reset on my chipset. I can also notice this that in 2 out of 3 attempts if I reboot the PC the disk is not recognized any more before I reboot again.</p>
<p>Despite these issues, the SSD now runs with astonishing performance with the suggested 32 head / 32 sector alignment, and a 512kB partition alignment scheme. After an initial <a href="http://en.wikipedia.org/wiki/TRIM">TRIM</a> with <a href="http://sourceforge.net/projects/hdparm/">hdparm</a>&#8216;s <code>wiper.sh</code> I enabled <code>-o discard</code> for my ext4 partition and could also verify using hdparm that this results in the sectors being trimmed. Please note, that you need to manually compile and install the latest hdparm version on Ubuntu 10.10, as the included version fails with the very long free block list and doesn&#8217;t handle splitting the sectors in multiple requests. The latest version doesn&#8217;t have this issue any more.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2010/12/01/ocz-vertex2-linux-and-ancient-nforce-430-chipset/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to force Git to consider a file as binary</title>
		<link>http://www.dont-panic.cc/capi/2009/02/16/how-to-force-git-to-consider-a-file-as-binary/</link>
		<comments>http://www.dont-panic.cc/capi/2009/02/16/how-to-force-git-to-consider-a-file-as-binary/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 21:58:27 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[computer]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eps]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/?p=212</guid>
		<description><![CDATA[If you are using Git on Windows and follow my advise on how to get past the problem with the &#8220;suspicious patch lines&#8221;, you might run into problems if you are using Encapsulated PostScript (.eps) files in your repository. PostScript files are almost plain-text files, and if you set core.autocrlf and core.safecrlf, they might cause [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using <a href="http://git-scm.com/">Git</a> on Windows and follow my advise on how to get past <a href="http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/">the problem with the &#8220;suspicious patch lines&#8221;</a>, you might run into problems if you are using <a href="http://en.wikipedia.org/wiki/Encapsulated_PostScript">Encapsulated PostScript</a> (.eps) files in your repository.</p>
<p>PostScript files are almost plain-text files, and if you set core.autocrlf and core.safecrlf, they might cause problems with the EPS binary encoded parts, as they might be detected as text-files and therefore remove any CRLF and replace it with single LF, which can mess up the whole image.</p>
<p>To force Git to consider a file binary which it would consider as text-file otherwise, the easiest way is to add a .gitattributes file to the directory containing the file or to any parent directory. In my case, I normally add a .gitattributes file in the root of the repository, containing</p>
<blockquote><p>*.eps -crlf<br />
*.jpg -crlf<br />
*.png -crlf</p></blockquote>
<p>In the file you set attributes to a path (or a pattern), or unset them (with the minus sign).  The crlf attribute is the attribute which tells if a file is affected by the core.autocrlf options. If you unset it, Git won&#8217;t mess with the line endings in the file.</p>
<p>More details can be found on the <a href="http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html">gitattributes man page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2009/02/16/how-to-force-git-to-consider-a-file-as-binary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Missing dictionaries on OpenOffice.org 3</title>
		<link>http://www.dont-panic.cc/capi/2008/10/24/missing-dictionaries-on-openofficeorg-3/</link>
		<comments>http://www.dont-panic.cc/capi/2008/10/24/missing-dictionaries-on-openofficeorg-3/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 13:41:15 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[computer]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[openoffice]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/?p=165</guid>
		<description><![CDATA[I just upgraded to OpenOffice.org 3 and I really like it. But there was a small, but very anoying problem: OO.org seemed to be unable to find any dictionaries. I found out rather quicky, that starting with OO.org 3 dictionaries are only available as extensions. Well, basically this is no problem, but the English (at [...]]]></description>
			<content:encoded><![CDATA[<p>I just upgraded to <a href="http://www.openoffice.org/">OpenOffice.org 3</a> and I really like it. But there was a small, but very anoying problem: OO.org seemed to be unable to find any dictionaries. I found out rather quicky, that starting with OO.org 3 dictionaries are only available as extensions. Well, basically this is no problem, but the English (at least the US and GB variante) are supposed to be bundled with the installer and are not available as seperate extension.</p>
<p>It seems there is a little bug with the installation on Vista under certain circumstances which causes the extensions not being registered properly with OO.org.</p>
<p>To solve the problem, follow the same following steps:</p>
<ul>
<li>Locate your OO.org &#8220;install&#8221; directory of your installation, usually it is C:\Program Files\OpenOffice.org 3\share\extensions\install&#8221; [<strong>Updated 2008-12-21</strong> to include "extensions", thanks to the anonymous commenter!]</li>
<li>Manuylla install the appropriate dictionary extension (&#8220;dict-en.oxt&#8221;, &#8220;dict-de.oxt&#8221;, &#8220;dict-fr.oxt&#8221;, &#8220;dict-it.oxt&#8221;) by either launching the oxt directly or by chosing Tools -&gt; Extension Manager.</li>
</ul>
<p>For me this worked after restarting OO.org totally (i.e. closing down all Writer, Calc, &#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2008/10/24/missing-dictionaries-on-openofficeorg-3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>git-svn fails with fatal error: unable to remap</title>
		<link>http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-to-remap/</link>
		<comments>http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-to-remap/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 12:41:04 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[cygwin]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-to-remap/</guid>
		<description><![CDATA[Git&#8216;s nice Subversion (SVN) integration is one of the reasons I switched to using it within our company for my own revision control besides our official repository. Unfortunately, upgrading cygwin broke my system once again: $ git svn dcommit 6 [main] perl 4760 C:\cygwin\bin\perl.exe: *** fatal error - unable to remap C:\cygwin\lib\perl5\site_perl\5.8\cygwin\auto\SVN\_Core\_ Core.dll to same [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://git.or.cz/">Git</a>&#8216;s nice <a href="http://subversion.tigris.org/">Subversion</a> (SVN) integration is one of the reasons I switched to using it within our company for my own revision control besides our official repository. Unfortunately, upgrading <a href="http://www.cygwin.com/">cygwin</a> broke my system once again:</p>
<blockquote style="text-align: left;"><p><code>$ git svn dcommit</code><br />
<code>6 [main] perl 4760 C:\cygwin\bin\perl.exe: *** fatal error - unable to remap C:\cygwin\lib\perl5\site_perl\5.8\cygwin\auto\SVN\_Core\_ Core.dll to same address as parent(0x260000) != 0x990000 84 [main] perl 3224 fork: child 4760 - died waiting for dll loading, errno 11 panic: MUTEX_LOCK (45) [util.c:2331] at /usr/bin/git-svn line 787. panic: MUTEX_LOCK (45) [op.c:352].</code></p></blockquote>
<p>The reason behind this behavior is a huge difference in the way processes and threads and libraries are created/handled on Windows and Linux. <code>git-svn</code> relies on perl within cygwin and several perl libraries that use the same base-address for libraries internally. Of course, no two libraries can be loaded to the same base-address at the same time.</p>
<p>Long explanation, short way to fix the problem:</p>
<ol>
<li>Quit all cygwin processes</li>
<li>Start <em>ash</em> (&lt;cygroot&gt;\bin\ash.exe) (&lt;edit&gt;Use &#8220;Run as Administrator&#8230;&#8221;&lt;/edit&gt;)</li>
<li>Execute <em>/usr/bin/rebaseall</em></li>
</ol>
<p>Voilla, that&#8217;s all. git-svn should work again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-to-remap/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Vista UAC: Firefox (and other Mozilla apps) automatic updates</title>
		<link>http://www.dont-panic.cc/capi/2007/08/13/vista-uac-firefox-and-other-mozilla-apps-automatic-updates/</link>
		<comments>http://www.dont-panic.cc/capi/2007/08/13/vista-uac-firefox-and-other-mozilla-apps-automatic-updates/#comments</comments>
		<pubDate>Mon, 13 Aug 2007 10:45:44 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[computer]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[uac]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/08/13/vista-uac-firefox-and-other-mozilla-apps-automatic-updates/</guid>
		<description><![CDATA[If you disable the automatic installer detection of User Account Control (UAC), for instance because it interferes with your every-day operations (like in my &#8220;Git and Windows Vista&#8221; article), you will notice that the Mozilla updaters don&#8217;t work as expected. Automatic updates will fail. This is due to the fact that the updater will not [...]]]></description>
			<content:encoded><![CDATA[<p>If you disable the automatic installer detection of <a href="http://en.wikipedia.org/wiki/User_Account_Control">User Account Control</a> (UAC), for instance because it interferes with your every-day operations (like in my &#8220;<a href="http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/">Git and Windows Vista</a>&#8221; article), you will notice that the Mozilla updaters don&#8217;t work as expected. Automatic updates will fail. This is due to the fact that the updater will not be automatically elevated any longer.</p>
<p>As the easiest workaround, you should perform the following steps:</p>
<ul>
<li>Once you get notified about the update and you are asked if you want to install it, say &#8220;No&#8221;.</li>
<li>Close the Mozilla application in question.</li>
<li>Search for the application in your &#8220;Start&#8221; menu.</li>
<li>Right-click the entry and choose &#8220;Run as Administrator&#8230;&#8221;</li>
<li>Choose &#8220;Check for Updates&#8230;&#8221; in the &#8220;Help&#8221; menu</li>
<li>Confirm you want to install the update and walk through the update process.</li>
</ul>
<p>The installation will now work. For security reasons you should close the application once installation is finished, because it will still be running with elevated privileges.  Now start the application again normally.</p>
<p>The same principle works for any application that is not Vista-aware and fails on automatic update. For security reasons make sure you keep the time you run with elevated privileges as short as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/08/13/vista-uac-firefox-and-other-mozilla-apps-automatic-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>git-svn on Windows (cygwin)</title>
		<link>http://www.dont-panic.cc/capi/2007/07/23/git-svn-on-windows-cygwin/</link>
		<comments>http://www.dont-panic.cc/capi/2007/07/23/git-svn-on-windows-cygwin/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 17:34:25 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/07/23/git-svn-on-windows-cygwin/</guid>
		<description><![CDATA[Update 2008-10-10: Often perl will not work due to memory-remapping problems. A solution can be found in my article about the issue. What I really love about Git is the fact that it nicely integrates with existing Subversion repositories. At our company, we are using Subversion as our SCM, but I personally like Git more [...]]]></description>
			<content:encoded><![CDATA[<div style="border-style: dashed; border-width: 1px; margin-top: 14px;padding: 4px; background: #f0f0f0;"><strong>Update 2008-10-10:</strong> Often perl will not work due to memory-remapping problems. A solution can be found in <a href="http://www.dont-panic.cc/capi/2007/10/29/git-svn-fails-with-fatal-error-unable-to-remap/">my article about the issue</a>.</div>
<p>What I really love about <a href="http://git.or.cz/">Git</a> is the fact that it nicely integrates with existing <a href="http://subversion.tigris.org/">Subversion</a> repositories. At our company, we are using Subversion as our <a href="http://en.wikipedia.org/wiki/Revision_control">SCM</a>, but I personally like Git more and I want to use it as a side tool for more flexible branching, merging, and for checking in versions I wouldn&#8217;t check in the shared repository.</p>
<p>Git is supplied with <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn</a>, which can import an existing SVN repository and also commit back to it. Under cygwin, you need to perform two additional steps for getting git-svn to work, otherwise it is likely to fail with &#8220;failed to include Error.pm&#8221;.</p>
<ul>
<li>subversion-perl (install via <a href="http://www.cygwin.com/">cygwin</a>&#8216;s <a href="http://www.cygwin.com/setup.exe">setup.exe</a>)</li>
<li>Error.pm</li>
</ul>
<p>You need to <a href="http://search.cpan.org/src/UARUN/Error-0.15/Error.pm">download Error.pm from CPAN</a>. You have to save it to &lt;cygwin-dir&gt;\lib\perl5\Error.pm</p>
<p>Voila! git-svn should work now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/07/23/git-svn-on-windows-cygwin/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Git on Windows: &#8220;You have some suspicious patch lines&#8221;</title>
		<link>http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/</link>
		<comments>http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/#comments</comments>
		<pubDate>Fri, 13 Jul 2007 15:11:22 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/</guid>
		<description><![CDATA[Update 2008-04-24: as commenter Jakub Narebski correctly points out, it should be better to use core.autocrlf and crlf attribute for resolving this issue, but I have had no chance to test this up to now. The solution below is still valid, but more of the sort of an ugly hack. Update 2008-06-11: I have stopped [...]]]></description>
			<content:encoded><![CDATA[<div style="border-style: dashed; border-width: 1px; margin-top: 14px;padding: 4px; background: #f0f0f0;"><strong>Update 2008-04-24:</strong> as commenter Jakub Narebski correctly points out,  it should be better to use <em>core.autocrlf</em> and crlf attribute for resolving this issue, but I have had no chance to test this up to now. The solution below is still valid, but more of the sort of an ugly hack.</div>
<div style="border-style: dashed; border-width: 1px; margin-top: 14px;padding: 4px; background: #f0f0f0;"><strong>Update 2008-06-11:</strong> I have stopped using this solution and only use &#8220;git-config core.autocrlf true&#8221; and &#8220;git-config core.safecrlf true&#8221; any more. It works reliably and is exactly what I need and not such an ugly hack.</div>
<div style="border-style: dashed; border-width: 1px; margin-top: 14px;padding: 4px; background: #f0f0f0;"><strong>Update 2008-06-22:</strong> Well, of course you can still get &#8220;You have some suspicious patch lines&#8221; if you follow the core.autocrlf approach&#8230; but this time it really means you have trailing whitespace, not just line-breaks. If you really don&#8217;t care about trailing white-space at all, my initial solution is still valid, as it simply disables this check.</div>
<p>If you are using <a href="http://git.or.cz/">Git</a> under Windows using <a href="http://www.cygwin.com/">cygwin</a>, and you got through the <a href="http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/">initial problems</a>, you will soon realize that Git likes to fail with &#8220;You have some suspicious patch lines&#8221; when committing.</p>
<p>The cause for this problem is the carriage-return/line-feed problem of Git under Windows/cygwin: The patches contain a trailing line-feed if you edited them with a Windows editor and not strictly inside cygwin.  This will trigger the pre-commit hook to fail on patches where the last line of a file has been changed.</p>
<p>To solve the problem, you need to edit <code>.git/hooks/pre-commit</code> and comment out the following lines:</p>
<blockquote><p><code>if (/\s$/) {<br />
bad_line("trailing whitespace", $_);<br />
}</code></p></blockquote>
<p>Now committing should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/07/13/git-on-windows-you-have-some-suspicious-patch-lines/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Git and Windows Vista</title>
		<link>http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/</link>
		<comments>http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 20:01:02 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/</guid>
		<description><![CDATA[I recently started using Git, the version control system now used for developing the Linux Kernel. While there is no native support for Windows at the moment, you can install it using cygwin. While this works reasonably well in Windows XP, I got into severe troubles when trying the same in Windows Vista. First, I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started using <a href="http://git.or.cz/">Git</a>, the version control system now used for developing the Linux Kernel. While there is no native support for Windows at the moment, you can install it using <a href="http://www.cygwin.com/">cygwin</a>. While this works reasonably  well in <a href="http://en.wikipedia.org/wiki/Windows_XP">Windows XP</a>, I got into severe troubles when trying the same in <a href="http://en.wikipedia.org/wiki/Windows_Vista">Windows Vista</a>.</p>
<p>First, I ran into troubles installing cygwin. I figured out, that it seems to work well if you run both the installer and bash in &#8220;Windows XP SP2 compatibility mode&#8221;. I needed to adjust the file system permissions of the cygwin folder to give me write permissions, though. (Note: you have to manually install the TK-libs if you want the GUI elements of git to work.)</p>
<p>But Git kept failing with &#8220;access denied&#8221; messages when trying to commit from command line. The failure message said it was denied access to <code>git-update-index</code>.  I soon found out this is due to the &#8220;<a href="http://en.wikipedia.org/wiki/User_Account_Control">User Account Control</a>&#8221; (UAC) default behavior of auto-detecting installers and prompting if you want to execute them with raised privileges. You can see if this is the case by running <code>git-update-index</code> manually from bash; if you get the UAC confirmation dialog you have this problem. It seems the substring &#8220;update&#8221; triggers this behavior. As the <code>git-update-index</code> is launched by <code>git commit</code>, it won&#8217;t display the confirmation dialog of Vista, so the execution will be denied.</p>
<p>There are two possible workarounds:</p>
<ul>
<li>Run <code>bash</code> with administrative privileges (not recommended!)</li>
<li>Disable the auto-detection of installers by UAC.</li>
</ul>
<p>I used the latter way. You can disable the auto-detection by following <a href="http://www.realtime-vista.com/administration/2007/05/user_account_control_detection.htm">these instructions</a>. Brief summary:</p>
<ul>
<li>Open the Local Security Policies</li>
<li>Disable &#8220;User Account Control: Detect application installations and prompt for elevation&#8221;</li>
<li>Reboot (the security policy will not be updated before!)</li>
</ul>
<p>It should work now. You can confirm this by running <code>git-update-index</code> manually again. If you do not get the UAC confirmation dialog now, it worked. Try <code>git commit</code> now, and verify it is working. Of course, you will from now on have to right-click and &#8220;Run as Administrator&#8221; every installer you want to install, as most installers will require administrative privileges.</p>
<p><strong>Update 2007-08-22:</strong> Reader EGarcia posted an interesting comment below: using the Microsoft Manifest Tool you can add an according manifest to the git-update-index.exe and git-update-ref.exe</p>
<p><strong>Update 2009-02-12:</strong> Reader Kevin Broadey points out the best solution so far: create a seperate .manifest file for the affected files. He has provided an example for <a href="http://homepage.ntlworld.com/kevin.broadey/git-update-index.exe.manifest.txt">git-update.exe.manifest</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2007/07/06/git-and-windows-vista/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>OpenVPN and Tap-Win32-Adapter Problem</title>
		<link>http://www.dont-panic.cc/capi/2006/04/29/openvpn-and-tap-win32-adapter-problem/</link>
		<comments>http://www.dont-panic.cc/capi/2006/04/29/openvpn-and-tap-win32-adapter-problem/#comments</comments>
		<pubDate>Sat, 29 Apr 2006 18:28:43 +0000</pubDate>
		<dc:creator>Martin Carpella</dc:creator>
				<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[openvpn]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[vpn]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[workaround]]></category>

		<guid isPermaLink="false">http://www.dont-panic.cc/capi/archives/39</guid>
		<description><![CDATA[OpenVPN on Microsoft Windows has a problem with the TAP-Win32-Adapter driver used for the tunnel. The device needs to be deactivated/reactivated after a Windows restart before any connection can be established. In this article I present a very simple script and solution for automating this process. OpenVPN is my preferred tool for implementing low-cost VPN [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://openvpn.net/">OpenVPN</a>  on Microsoft Windows  has a problem with the  TAP-Win32-Adapter driver used for the tunnel. The device needs to be deactivated/reactivated after a Windows restart before any connection can be established. In this article I present a very simple script and solution for automating this process.</p>
<p><span id="more-39"></span>OpenVPN is my preferred tool for implementing low-cost VPN solutions for one reason: it simply works. It works very well on Linux and Windows. On Windows I commonly use <a href="http://openvpn.se/">one of the GUI frontends</a>. On Windows, OpenVPN uses a virtual network card for the tunnelled data, the TAP Win32 Adapter, currently in version 8. Unfortunately this driver has a issue at the moment: the adapter works only once, after restarting windows the device has to be deactivated and reactivated, otherwise it will not come up after the connection to the VPN server has been established.</p>
<p>To get around this anoying issue I wanted to write a script that will reactivate before starting the GUI. As I soon found out, there is no way in standard Windows XP to (de)activate a device from a script. After some time I found a tool in Microsoft&#8217;s DDK which can also be downloaded seperately: <a href="http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q311272">devcon</a>, a command line tool by Microsoft as an alternative to the Windows Device Manager.</p>
<p>First I needed to find the hardware id of the TAP device I wanted to restart:</p>
<blockquote><p><code>&gt; devcon findall *TAP*<br />
ISAPNP\READDATAPORT\0 : ISAPnP-Datenleseport<br />
ROOT\NET\0000 : TAP-Win32 Adapter V8<br />
2 matching device(s) found. </code></p></blockquote>
<p>Clearly I am interested in <code>ROOT\NET\0000</code> in my case. This device can now be (de)activated with &#8220;<code>devcon deactivate @ROOT\NET\0000</code>&#8221; resp. &#8220;<code>devcon activate @ROOT\NET\0000</code>&#8220;. The <code>@</code>-sign is important!</p>
<p>As I wanted to explore some alternatives to Microsoft&#8217;s shell scripts (.cmd), I discovered <a href="http://www.kixtart.org/">KiXtart</a>, a very powerful shell scripting language for Windows. Main advantage is, that KiXtart is able to run the script without showing an anyoing shell window during its runtime (which is the whole VPN connection in my case, as I want to disable the device after OpenVPN is shut down.</p>
<p>The script that needs to be executed is trivial: Instead of launching OpenVPN-GUI directly, I now launch the following KiXtart script from any shortcuts to OpenVPN GUI:</p>
<blockquote><p><code>shell "devcon disable @@root\net\0000"<br />
shell "devcon enable @@root\net\0000"<br />
shell "C:\Program Files\OpenVPN\bin\openvpn-gui.exe"<br />
shell "devcon disable @@root\net\0000"</code></p></blockquote>
<p>The KiXtart interpreter requries around 1.4MB of RAM during the session (which I accept and don&#8217;t care about as my machine has 1.5GB of RAM installed). If you want to spare this amount and you don&#8217;t care that the device is not deactivated right after exiting OpenVPN-GUI, you could adapt the script to execute the GUI without waiting for its termination. You&#8217;d also have to remove the last line of the script. In this case you can also simply use standard Windows shell commands, as the shell will immideatly close after calling &#8220;<code>start C:\...\openvpn-gui.exe</code>&#8220;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dont-panic.cc/capi/2006/04/29/openvpn-and-tap-win32-adapter-problem/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

