<?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>Brandon W. King&#039;s Blog &#187; Linux</title>
	<atom:link href="http://www.brandonking.net/blog/tag/linux-it/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brandonking.net/blog</link>
	<description>Blogging about Python, Bioinformatics, Programming, System Administration, Cognitive Science, Philosophy and Life</description>
	<lastBuildDate>Wed, 09 Dec 2009 01:24:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dell Vostro 400 &#8211; Ubuntu/Kubuntu Linux</title>
		<link>http://www.brandonking.net/blog/2008/02/22/dell-vostro-400-ubuntukubuntu-linux/</link>
		<comments>http://www.brandonking.net/blog/2008/02/22/dell-vostro-400-ubuntukubuntu-linux/#comments</comments>
		<pubDate>Fri, 22 Feb 2008 22:42:00 +0000</pubDate>
		<dc:creator>Brandon W. King</dc:creator>
				<category><![CDATA[Computers/IT]]></category>
		<category><![CDATA[Error Fixes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[livecd]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.brandonking.net/?p=35</guid>
		<description><![CDATA[I was able to get a Dell Vostro 400 to work with Kubuntu 8.4 Alpha 4 LiveCD. I used the installer and it resized the Windows XP partition just fine&#8230; What I did to get this to work is written below:
Okay, SATA cdroms and Linux don&#8217;t seem to be mixing very well&#8230; at least not [...]]]></description>
			<content:encoded><![CDATA[<p>I was able to get a Dell Vostro 400 to work with Kubuntu 8.4 Alpha 4 LiveCD. I used the installer and it resized the Windows XP partition just fine&#8230; <span style="font-style: italic;">What I did to get this to work is written below:</span></p>
<p>Okay, SATA cdroms and Linux don&#8217;t seem to be mixing very well&#8230; at least not with Ubuntu/Kubuntu 7.10. If you pop in one of the live cds, it will likely give you an IO Error when you select any item on the live cd boot menu.</p>
<p>As it turns out, that problem is fixed in Ubuntu/Kubuntu 8.4&#8230; but it&#8217;s not out yet being Feb 22nd (Release date scheduled for April). But, the live cd works with 8.4 Alpha 4 (looks like Alpha 5 came out today), which can be found here: https://wiki.kubuntu.org/HardyHeron/.</p>
<p>When I booted the live cd, the <span style="font-weight: bold;">screen went blank</span>&#8230; The next time I booted off the live cd, I choose<span style="font-weight: bold;"> F6, and removed &#8220;quiet splash&#8221;</span> from the kernel arguments.</p>
<p>At some point you might run into an error like:</p>
<pre>Feb 22 21:55:19 localhost ata2: failed to recover some devices, retrying in 5 secs</pre>
<p>If this happens add the kernel argument <span style="font-weight: bold;">irqpoll</span> and it should bypass/fix the problem (not sure which; it just worked).</p>
<p>To add the irqpoll option in the live cd:</p>
<ol>
<li>Select F6</li>
<li>Remove &#8220;quite splash&#8221;</li>
<li>Add &#8220;irqpoll&#8221;</li>
</ol>
<p>To add the irqpoll option to grub (once installed):</p>
<ol>
<li>Replace <span style="font-weight: bold;"># defoptions=quiet splash</span> with<span style="font-weight: bold;"> # defoptions=irqpoll<br />
</span></li>
</ol>
<p>I am in a bit of a hurry during this post today, so if you have any questions or would like me to expand on something, just post a comment.<span style="font-weight: bold;"><br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonking.net/blog/2008/02/22/dell-vostro-400-ubuntukubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django App + mod_fcgid + Apache 2 Setup on Mac OS X &amp; Debian/Ubuntu Linux</title>
		<link>http://www.brandonking.net/blog/2008/01/31/django-app-mod_fcgid-apache-2-setup-on-mac-os-x-debianubuntu-linux/</link>
		<comments>http://www.brandonking.net/blog/2008/01/31/django-app-mod_fcgid-apache-2-setup-on-mac-os-x-debianubuntu-linux/#comments</comments>
		<pubDate>Fri, 01 Feb 2008 00:54:00 +0000</pubDate>
		<dc:creator>Brandon W. King</dc:creator>
				<category><![CDATA[Computers/IT]]></category>
		<category><![CDATA[Error Fixes]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[apache2]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[fcgi]]></category>
		<category><![CDATA[flup]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[mod_fcgid]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[mod_wsgi]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.brandonking.net/?p=34</guid>
		<description><![CDATA[

Update 2008Feb11:
From rather obscure comment from &#8216;apt-cache show python-flup&#8217; on a Debian system, I discovered that flup has been superseded by http://www.modwsgi.org/. It is probably worth checking out mod_wsgi instead of mod_fcgid for Python web applications. Based on the documentation for mod_wsgi integration with Django, I am planning on switching. I will post my results [...]]]></description>
			<content:encoded><![CDATA[<div class="wikipage">
<div id="searchable">
<h2 id="RequiredSoftware">Update 2008Feb11:</h2>
<p>From rather obscure comment from &#8216;apt-cache show python-flup&#8217; on a Debian system, I discovered that flup has been superseded by <a href="http://www.modwsgi.org/">http://www.modwsgi.org/</a>. It is probably worth checking out mod_wsgi instead of mod_fcgid for Python web applications. Based on the documentation for <a href="http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango">mod_wsgi integration with Django</a>, I am planning on switching. I will post my results in a future post.</p>
<h2 id="RequiredSoftware">Required Software<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#RequiredSoftware"><br />
</a></h2>
<ul>
<li>Apache 2 &#8211; <a class="ext-link" href="http://httpd.apache.org/"><span class="icon">http://httpd.apache.org/</span></a></li>
<li>mod_rewrite &#8211; (comes with Apache2)</li>
<li>mod_fcgid &#8211; <a class="ext-link" href="http://fastcgi.coremail.cn/"><span class="icon">http://fastcgi.coremail.cn/</span></a></li>
<li>flup &#8211; <a class="ext-link" href="http://trac.saddi.com/flup"><span class="icon">http://trac.saddi.com/flup</span></a></li>
</ul>
<h2 id="mod_fcgid">mod_fcgid<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#mod_fcgid"><br />
</a></h2>
<h3 id="DownloadSourceandInstall">Download Source and Install<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#DownloadSourceandInstall"><br />
</a></h3>
<ul>
<li><a class="ext-link" href="http://fastcgi.coremail.cn/download.htm"><span class="icon">Download</span></a></li>
</ul>
<p>For reference, here is the mod_fcgid INSTALL.txt&#8230; see my Mac OS X notes below it for changes required to get it working on Mac OS X 10.5 (Leopard):</p>
<pre class="wiki">NOTE: This module is for Apache2 ONLY

UNIXIt's tested on my RedHat8 and Solaris. But it should work on other *NIX platform.NOTE: This module MUST run on share memory supported system

1. If your Apache2 installation isn't in /usr/local/apache2, please edit Makefile and correct it2. cd $mod_fcgid_dir3. make   //in Mac you need Xcode tools, optional install on Install CD4. make install5. add the following line in httpd.conf

LoadModule fcgid_module modules/mod_fcgid.so</pre>
<h4 id="MACOSXNotes">MAC OS X Notes<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#MACOSXNotes"><br />
</a></h4>
<ul>
<li>In Mac OS X Leopard, the Makefile needs to be changed from /usr/local/apache2 to /usr/share/httpd, then steps 3 and 4 above should work.</li>
<li>Step 4 requires: sudo make install</li>
<li>Step 5, you need to add the following to /etc/apache2/httpd.conf: LoadModule fcgid_module libexec/apache2/mod_fcgid.so</li>
<li>IMPORTANT: apache 2 on Mac OS X Leopard is 64-bit and by default, the make file does not build the 64-bit module. To do this, you need to add the following to the Makefile after the EXTRA_CFLAGS option (too far above that will cause it not to work apparently):</li>
</ul>
<pre class="wiki">CFLAGS = -arch ppc -arch ppc64 -arch i386 -arch x86_64</pre>
<p>The above will make a universal binary for all Mac OS X.</p>
<p>If at some point, you get this message either in the error_log or by running &#8216;apachectl configtest&#8217;</p>
<pre class="wiki">httpd: Syntax error on line 117 of /private/etc/apache2/httpd.conf: Cannot load/usr/libexec/apache2/mod_fcgid.so into server:dlopen(/usr/libexec/apache2/mod_fcgid.so, 10): no suitable image found.Did find: /usr/libexec/apache2/mod_fcgid.so: mach-o, but wrong architecture</pre>
<p>Then your mod_fcgid.so module probably was not built with x86_64 architecture&#8230; To check, type</p>
<pre class="wiki">file /usr/libexec/apache2/mod_fcgid.so</pre>
<p>And it should list the architectures that the mod_fcgid.so was built for.</p>
<h3 id="Enablemod_fcgid">Enable mod_fcgid<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#Enablemod_fcgid"><br />
</a></h3>
<h4 id="Linux">Linux<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#Linux"><br />
</a></h4>
<p>At least with Debian/Ubuntu you can enable fcgid by typing (as root):</p>
<pre class="wiki">a2enmod fcgid</pre>
<h4 id="MacOSXLeopard">Mac OS X Leopard (10.5)<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#MacOSXLeopard"><br />
</a></h4>
<p>Add the following to /etc/apache2/httpd.conf:</p>
<pre class="wiki">AddHandler    fcgid-script .fcgiSocketPath    /tmp/fcgid_sockSharememPath  /tmp/fcgid_shmIPCConnectTimeout 20</pre>
<h2 id="mod_rewrite">mod_rewrite<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#mod_rewrite"><br />
</a></h2>
<p>We need to tell apache for what urls it should pass off the request to the fcgi script. This is accomplished with mod_rewrite which is normally turned on by default w/ apache 2 (at least the installations I have seen).</p>
<p>We&#8217;ll start with the full setup required for gaworkflow.frontend, but test it with a &#8220;Hello World&#8221; style dispatch.fcgi script.</p>
<h3 id="gaworkflow.frontendapache2mod_rewritesetup">gaworkflow.frontend apache2 mod_rewrite setup<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#gaworkflow.frontendapache2mod_rewritesetup"><br />
</a></h3>
<h4 id="Linux1">Linux<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#Linux1"><br />
</a></h4>
<p>Add the following to your apache2 /etc/apache2/sites-available/default or other vhost specific file:</p>
<pre class="wiki"># Enable access to the django admin mediaAlias /media /usr/lib/python2.5/site-packages/django/contrib/admin/media

# Turn on the rewrite engineRewriteEngine on

# Enable http:///admin/ and related urlsRewriteRule ^/admin(.*)$ /usr/lib/cgi-bin/dispatch.fcgi/admin$1 [QSA,L]RewriteRule ^/logout(.*)$ /usr/lib/cgi-bin/dispatch.fcgi/logout$1 [QSA,L]RewriteRule ^/login(.*)$ /usr/lib/cgi-bin/dispatch.fcgi/login$1 [QSA,L]</pre>
<h4 id="MacOSXLeopard1">Mac OS X Leopard<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#MacOSXLeopard1"><br />
</a></h4>
<p>Add the following to your apache2 /etc/httpd.conf:</p>
<pre class="wiki"># Enable access to the django admin media# NOTE: the following did not work for me... I had to copy the media directory to#    /Library/WebServer/Documents/media#Alias /media /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/media/

# Turn on the rewrite engineRewriteEngine on

# Enable http:///admin urlsRewriteRule ^/eland_config(.*)$ /Library/WebServer/CGI-Executables/dispatch.fcgi/eland_config$1 [QSA,L]RewriteRule ^/admin(.*)$ /Library/WebServer/CGI-Executables/dispatch.fcgi/admin$1 [QSA,L]RewriteRule ^/logout(.*)$ /Library/WebServer/CGI-Executables/dispatch.fcgi/logout$1 [QSA,L]RewriteRule ^/login(.*)$ /Library/WebServer/CGI-Executables/dispatch.fcgi/login$1 [QSA,L]</pre>
<h3 id="RestartApache2">Restart Apache 2<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#RestartApache2"><br />
</a></h3>
<h4 id="LinuxDebianUbuntu">Linux (Debian/Ubuntu)<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#LinuxDebianUbuntu"><br />
</a></h4>
<pre class="wiki">sudo /etc/init.d/apache2 restart</pre>
<h4 id="MacOSXLeopard2">Mac OS X Leopard<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#MacOSXLeopard2"><br />
</a></h4>
<pre class="wiki">sudo apachectl restart</pre>
<h2 id="dispatch.fcgi">dispatch.fcgi<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#dispatch.fcgi"><br />
</a></h2>
<h3 id="HelloWorldTest">Hello World Test<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#HelloWorldTest"><br />
</a></h3>
<p>Now to test that we have the mod_fcgid setup properly, create a file called dispatch.fcgi:</p>
<pre class="wiki">#!/usr/bin/python

def myapp(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) return ['Hello World!\n']

if __name__ == '__main__': from flup.server.fcgi import WSGIServer WSGIServer(myapp).run()</pre>
<p>And move it to your cgi-bin directory:</p>
<h4 id="Linuxcgi-bin">Linux cgi-bin<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#Linuxcgi-bin"><br />
</a></h4>
<pre class="wiki">sudo mv dispatch.fcgi /usr/lib/cgi-bin/</pre>
<h4 id="MacOSXLeopardcgi-bin">Mac OS X Leopard cgi-bin<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#MacOSXLeopardcgi-bin"><br />
</a></h4>
<pre class="wiki">sudo mv dispatch.fcgi /Library/WebServer/CGI-Executables/</pre>
<h4 id="LinuxMacOSXFilePermissions">Linux/Mac OS X File Permissions<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#LinuxMacOSXFilePermissions"><br />
</a></h4>
<pre class="wiki">sudo chmod a+x /dispatch.fcgi</pre>
<p>Mac OS X 10.5 users will need to update the Options for  to include +ExecCGI&#8230; by default it is set to &#8220;Options None&#8221;. The updated entry should look like:</p>
<pre class="wiki"> AllowOverride None Options +ExecCGI Order allow,deny Allow from all</pre>
<p><strong>WARNING:</strong> You will get a <strong>message saying &#8220;Forbidden&#8221;</strong> in the web browser if you do not update the directive above.</p>
<h4 id="WebBrowserTest">Web Browser Test<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#WebBrowserTest"><br />
</a></h4>
<p>Point your web browser to <a class="ext-link" href="http://localhost/admin/"><span class="icon">http://localhost/admin/</span></a> and you should see  if it prints &#8220;Hello World!&#8221;. If you see &#8220;Hello World!&#8221; continue to the next section.</p>
<h2 id="InstallingtheDjangodispatch.fcgiscript">Installing the Django App dispatch.fcgi script<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#InstallingtheDjangodispatch.fcgiscript"><br />
</a></h2>
<h3 id="copyofgaworkflowcode">copy of mydjangoapp code<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#copyofgaworkflowcode"><br />
</a></h3>
<p>Make a copy of the mydjangoapp code and database and put it in a location that will be the &#8220;live&#8221; version of the code/database. On Mac OS X, I choose /Library/WebServer/mydjangoapp. Initialize the database like your normally would, but you will need to update the settings.py module so that DATABASE_NAME is an absolute path, otherwise you will get errors in the apache 2 error_log saying that the python code could not connect to the database. Assuming you also choose /Library/WebServer/mydjangoapp, your DATABASE_NAME variable in settings.py should be:</p>
<pre class="wiki">DATABASE_NAME = '/Library/WebServer/mydjangoapp/mydjangoapp.db'</pre>
<p>You will also need to update the settings.py TEMPLATE_DIRS to be an absolute path (relative paths don&#8217;t work for some reason) of &#8220;/Library/WebServer/gaworkflow/templates&#8221;&#8230; so the update version should look like:</p>
<pre class="wiki">TEMPLATE_DIRS = ( "/Library/WebServer/mydjangoapp/templates",)</pre>
<p>Also, you will need to make a link to the admin templates in our /Library/WebServer/mydjangoapp/templates directory by typing:</p>
<p><strong>Mac OS X 10.5:</strong></p>
<pre class="wiki">ln -s /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/admin /Library/WebServer/mydjangoapp/templates/adminln -s /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/admin_doc /Library/WebServer/mydjangoapp/templates/admin_docln -s /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/widget /Library/WebServer/mydjangoapp/templates/widgetln -s /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/contrib/admin/templates/registration /Library/WebServer/mydjangoapp/templates/registration</pre>
<p><span style="font-weight: bold;">Warning: The following directions will tell you how to get past the db read/access errors but may not be the best choice for security&#8230; you consider the possible security issues before following the following instructions.</span></p>
<p>To get the dispatch.fcgi to work properly, I needed to change ownership of /Library/WebServer/mydjangoapp to be owned by the apache2 user, which is _www on Mac OS X 10.5 and www-data on Debian/Ubuntu systems. The the apache user also needs access to the mydjangoapp.db as well. I ran the following commands on Mac OS X 10.5 when placing the files in /Library/WebServer/gaworkflow:</p>
<pre class="wiki">sudo chown _www:_www /Library/WebServer/mydjangoappsudo chown _www:_www /Library/WebServer/mydjangoapp/mydjangoapp.dbsudo chmod o-rwx /Library/WebServer/mydjangoapp/mydjangoapp.dbsudo chmod ug+rwx /Library/WebServer/mydjangoapp/mydjangoapp.db</pre>
<h3 id="newdispatch.fcgi">new dispatch.fcgi<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#newdispatch.fcgi"> ¶</a></h3>
<p>Replace the hello world dispatch.fcgi with the following script:</p>
<pre class="wiki">#!/usr/bin/python                                                            import syssys.path += ['/Library/WebServer/mydjangoapp']from flup.server.fcgi import WSGIServerfrom django.core.handlers.wsgi import WSGIHandlerimport osos.environ['DJANGO_SETTINGS_MODULE'] = 'mydjangoapp.settings'WSGIServer(WSGIHandler()).run()</pre>
<p>You will need to update these two rows:</p>
<ul>
<li>sys.path += ['/Library/WebServer/mydjangoapp']</li>
<li>os.environ['DJANGO_SETTINGS_MODULE'] = &#8216;mydjangoapp.settings&#8217;</li>
</ul>
<p>Where &#8216;/Library/WebServer/gaworkflow should be replaced by PYTHONPATH that would allow your Django package to be imported&#8230; one directory level below the directory containing <span class="underline">init</span>.py.</p>
<p><strong>NOTE:</strong> Make sure you dispatch.fcgi is executable:</p>
<pre class="wiki">sudo chmod a+x dispatch.fcgi</pre>
<p>If everything worked out properly, you should have a working installation of gaworkflow.frontend using mod_fcgid.</p>
<h2 id="TroubleShooting">Trouble Shooting<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#TroubleShooting"><br />
</a></h2>
<ul>
<li>Check apache error logs.</li>
<li>run: sudo apachectl configtest</li>
<li>Check that dispatch.fcgi has #!/usr/bin/python and not #!/usr/bin/env python as that will screw up the environment variables at least w/ Apache 2 that ships on Mac OS 10.5.</li>
<li>run &#8216;python dispatch.fcgi&#8217; to see if you get any standard Python errors.</li>
</ul>
<h3 id="Apache2-error_log--warnmod_fcgid:stderr:OperationalError:unabletoopendatabasefile">Apache2 &#8211; error_log &#8212; [warn] mod_fcgid: stderr: OperationalError: unable to open database file<a class="anchor" title="Link to this section" href="https://woldlab.caltech.edu/cgi-bin/gaworkflow/wiki/FcTrackerApache2#Apache2-error_log--warnmod_fcgid:stderr:OperationalError:unabletoopendatabasefile"><br />
</a></h3>
<p>This means the database is not accessible by the user that is running apache. On Mac OS X 10.5, the user is _www. On Debian/Ubuntu Linux the user is www-data. See the &#8220;copy of gaworkflow code&#8221; section above for directions on changing file permissions for the database.</p></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonking.net/blog/2008/01/31/django-app-mod_fcgid-apache-2-setup-on-mac-os-x-debianubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rescuing a Linux installation</title>
		<link>http://www.brandonking.net/blog/2007/01/30/rescuing-a-linux-installation/</link>
		<comments>http://www.brandonking.net/blog/2007/01/30/rescuing-a-linux-installation/#comments</comments>
		<pubDate>Wed, 31 Jan 2007 00:35:00 +0000</pubDate>
		<dc:creator>Brandon W. King</dc:creator>
				<category><![CDATA[Computers/IT]]></category>
		<category><![CDATA[Error Fixes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Systems Administration]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debootstrap]]></category>
		<category><![CDATA[fdisk]]></category>
		<category><![CDATA[mount]]></category>
		<category><![CDATA[rsync]]></category>
		<category><![CDATA[system adminstration]]></category>

		<guid isPermaLink="false">http://blog.brandonking.net/?p=24</guid>
		<description><![CDATA[In an attempt to save a system without doing a fresh reinstall by copying the contents from dying hard drive to new hard drive using external hard drive enclosure. This method seems to have worked well for me. I&#8217;m posting it as reference so others have a guide to work from and improve upon. I [...]]]></description>
			<content:encoded><![CDATA[<p>In an attempt to save a system without doing a fresh reinstall by copying the contents from dying hard drive to new hard drive using external hard drive enclosure. This method seems to have worked well for me. I&#8217;m posting it as reference so others have a guide to work from and improve upon. I have only used this method once so make sure you know what you are doing if you follow the guide.</p>
<p>WARNING: Use the following formation at your own risk. Make sure you make proper backups. The following information may have errors or may not work properly<span style="font-weight: bold;"> and could possibly <span style="font-style: italic;">damage your system</span> or <span style="font-style: italic;">cause the loss of data</span>. Once again, <span style="font-style: italic;">use the following at your own risk</span>. Research how to use each individual command so you know what you are doing.</span></p>
<p><span style="font-weight: bold;">Guide to moving a Debian or Ubuntu Linux installation from an old hard drive to a new hard drive without re-installing.</span></p>
<ol>
<li>Attach external hard drive</li>
<li>Reboot computer into single user mode (i.e. rescue mode)</li>
<li>Find the new device of the external hard drive (probably sda or sdb) dmesg | grep hd; dmesg | grep sd</li>
<li>create new partions on new drive: fdisk /dev/sd(a,b, etc.)
<ol>
<li>create swap partition</li>
<li>create linux partition(s)</li>
</ol>
</li>
<li>initialize swap: mkswap</li>
<li>create filesystem (I&#8217;m using ext3): mkfs.ext3</li>
<li>Mount the new hard drive (referred to as /dev/sda2 from now on): mount -t ext3 /dev/sda2 /mnt</li>
<li>Use debootstrap to get base install (ubuntu edgy example): debootstrap edgy /mnt http://us.archive.ubuntu.com/ubuntu</li>
<li>Now the copy command: rsync -av &#8211;exclude=/dev &#8211;exclude=/sys &#8211;exclude=/mnt &#8211;exclude=/proc &#8211;exclude=/media / /mnt</li>
<li>Make partition bootable: fdisk /dev/sda2  # use the &#8216;a&#8217; option</li>
<li>Shutdown system and put in the new drive.</li>
<li>Get Grub working again:
<ol>
<li>Insert Ubuntu or other Debian based live CD (Knoppix is a good choice too).</li>
<li>Mount the new drive: mount -t ext3 /dev/hda2 /mnt</li>
<li>Install grub: install-grub &#8211;root-directory=/mnt /dev/hda2</li>
<li>chroot into new drive: chroot /mnt</li>
<li>edit /boot/grub/menu.lst
<ol>
<li>Update groot(hd0,)  #if bootable partition changed (i.e. Was /dev/hda5 is now /dev/hda2&#8230; Old: <span style="font-weight: bold;">groot(hd0,4)</span> New: <span style="font-weight: bold;">groot(hd0,1)</span></li>
<li>Update kopt=root #if bootable partition changed (i.e. Was /dev/hda5 is now /dev/hda2&#8230;  Old: <span style="font-weight: bold;">kopt=root=UUID=</span> or <span style="font-weight: bold;">kopt=root=/dev/hda5</span> New:  <span style="font-weight: bold;">kopt=root=/dev/hda2</span> (NOTE: There is probably a way of getting the new UUID of the new partition, in which case you can just update the UUID option, but I don&#8217;t know enough about this yet to offer advice&#8230; Feel free to post a comment if you know more.)</li>
</ol>
</li>
<li>type: update-grub</li>
</ol>
</li>
<li>Reboot and hope everything works properly.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonking.net/blog/2007/01/30/rescuing-a-linux-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom Debian Linux Kernel Debian package w/ initrd</title>
		<link>http://www.brandonking.net/blog/2006/12/06/custom-debian-linux-kernel-debian-package-w-initrd/</link>
		<comments>http://www.brandonking.net/blog/2006/12/06/custom-debian-linux-kernel-debian-package-w-initrd/#comments</comments>
		<pubDate>Wed, 06 Dec 2006 23:11:00 +0000</pubDate>
		<dc:creator>Brandon W. King</dc:creator>
				<category><![CDATA[Computers/IT]]></category>
		<category><![CDATA[Error Fixes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[debian package]]></category>
		<category><![CDATA[kernel]]></category>

		<guid isPermaLink="false">http://blog.brandonking.net/?p=21</guid>
		<description><![CDATA[My attempt to build a new Debian Linux Kernel was thwarted by initrd! Thanks to Diane Trout mentioning that when using make-kpkg, to build a kernel image, doesn&#8217;t automatically make an initrd image. I investigated further and found out if you use &#8211;initrd, it will automatically generate the initrd image.
Below are the instructions for building [...]]]></description>
			<content:encoded><![CDATA[<p>My attempt to build a new <span style="font-weight: bold;">Debian Linux Kernel</span> was thwarted by initrd! Thanks to <a href="http://alienghic.livejournal.com/">Diane Trout</a> mentioning that when using <span style="font-weight: bold;">make-kpkg</span>, to build a kernel image, doesn&#8217;t automatically make an initrd image. I investigated further and found out if you use <span style="font-weight: bold;">&#8211;initrd</span>, it will automatically generate the initrd image.</p>
<p>Below are the instructions for building a custom Debian Linux Kernel Debian package:</p>
<p>1) Install the following Debian packages (Need access to Universe repository for Ubuntu):</p>
<ul>
<li>kernel-package</li>
<li>initrd-tools</li>
</ul>
<p>2) Get the kernel source (choose version, I used 2.6.17):</p>
<p>apt-get install linux-source-2.6.17</p>
<p>3) Decompress /usr/src/linux-source-2.6.17.tar.bz2</p>
<p>4) cd /usr/src/linux-source-2.6.17</p>
<p>5) Switch to root if you haven&#8217;t done so already (sudo -s)</p>
<p>6) type &#8216;make menuconfig&#8217; to configure your kernel</p>
<p>It may require installing libncurses5 and libcurses5-dev.</p>
<p>7) type &#8216;make-kpkg &#8211;revision 1.0 &#8211;append-to-version -custom &#8211;initrd kernel_image&#8217;</p>
<p>Feel free to change the revision number or and use something other than custom (or omit &#8211;revision and &#8211;append-to-version to use defaults).<br />
 <img src='http://www.brandonking.net/blog/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> type &#8216;cd ..&#8217;</p>
<p>9) dpkg &#8211;install linux-image-2.6.17-custom_1.0_amd64.deb</p>
<p>Except using the .deb package name which was generated on your computer.</p>
<p>10) Reboot and enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonking.net/blog/2006/12/06/custom-debian-linux-kernel-debian-package-w-initrd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tri-boot WinXP / Windows Vista / Ubuntu Linux</title>
		<link>http://www.brandonking.net/blog/2006/11/22/tri-boot-winxp-windows-vista-ubuntu-linux/</link>
		<comments>http://www.brandonking.net/blog/2006/11/22/tri-boot-winxp-windows-vista-ubuntu-linux/#comments</comments>
		<pubDate>Thu, 23 Nov 2006 00:52:00 +0000</pubDate>
		<dc:creator>Brandon W. King</dc:creator>
				<category><![CDATA[Computers/IT]]></category>
		<category><![CDATA[Error Fixes]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[tri-boot]]></category>
		<category><![CDATA[windows vista]]></category>
		<category><![CDATA[winxp]]></category>

		<guid isPermaLink="false">http://blog.brandonking.net/?p=16</guid>
		<description><![CDATA[I now have WinXP, Windows Vista RC1, and Ubuntu/Kubuntu Linux tri-booting on my laptop. A key to success if you are going to attempt this is the order of installation:

Windows XP
Windows Vista
Linux

If you install Windows Vista first, Windows XP&#8217;s boot loader won&#8217;t find Vista, and if you try to do a repair on Vista, WinXP [...]]]></description>
			<content:encoded><![CDATA[<p>I now have WinXP, Windows Vista RC1, and Ubuntu/Kubuntu Linux tri-booting on my laptop. A key to success if you are going to attempt this is the <span style="font-weight: bold;"><span style="font-style: italic;">order of installation</span></span>:</p>
<ol>
<li>Windows XP</li>
<li>Windows Vista</li>
<li>Linux</li>
</ol>
<p>If you install Windows Vista first, Windows XP&#8217;s boot loader won&#8217;t find Vista, and if you try to do a repair on Vista, WinXP won&#8217;t be found. There may be a way to fix this, but it&#8217;s easier just to install in the order listed above.</p>
<p>When Linux installs grub, at least with Ubuntu, it automatically finds the Vista boot loader. When you select the Vista option from grub, the Vista boot loader should have two options &#8220;Run previous version of windows&#8221; (i.e. WinXP) or &#8220;Run Vista&#8221;.</p>
<p>I hope this saves you some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.brandonking.net/blog/2006/11/22/tri-boot-winxp-windows-vista-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
