<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/2.4.2" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Robots Kill People...</title>
		<link>http://www.jasonash.com/techblog/index.php</link>
		<description></description>
		<language>en-US</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=2.4.2"/>
		<ttl>60</ttl>
				<item>
			<title>Enable Ubuntu 8.10 Root Password</title>
			<link>http://www.jasonash.com/techblog/index.php/linux/enable-ubuntu-8-10-root-password</link>
			<pubDate>Wed, 14 Jan 2009 19:44:28 +0000</pubDate>			<dc:creator>Jason</dc:creator>
			<category domain="main">Linux</category>			<guid isPermaLink="false">31@http://www.jasonash.com/techblog/</guid>
						<description>&lt;p&gt;One of my main frustrations with Ubuntu has always been the lack of a usable root account.&lt;/p&gt;

&lt;p&gt;As a result, I've taken to enabling the account on all of my boxes.&lt;/p&gt;

&lt;p&gt;All you have to do is assign a password to the account:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;sudo passwd root&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;and if you decide to disable the account later:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;sudo passwd -l root&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If you do add a password to root, don't mess with the sudoers file, as if you disable root in the sudoers file and later disable the account itself, you won't be able to do anything and will have to use a livecd to fix it.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.jasonash.com/techblog/index.php/linux/enable-ubuntu-8-10-root-password&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>One of my main frustrations with Ubuntu has always been the lack of a usable root account.</p>

<p>As a result, I've taken to enabling the account on all of my boxes.</p>

<p>All you have to do is assign a password to the account:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">sudo passwd root</span></code></td></tr>
</table></div>

<p>and if you decide to disable the account later:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">sudo passwd -l root</span></code></td></tr>
</table></div>

<p>If you do add a password to root, don't mess with the sudoers file, as if you disable root in the sudoers file and later disable the account itself, you won't be able to do anything and will have to use a livecd to fix it.</p><div class="item_footer"><p><small><a href="http://www.jasonash.com/techblog/index.php/linux/enable-ubuntu-8-10-root-password">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.jasonash.com/techblog/index.php/linux/enable-ubuntu-8-10-root-password#comments</comments>
		</item>
				<item>
			<title>ORA-27121: unable to determine size of shared memory segment</title>
			<link>http://www.jasonash.com/techblog/index.php/linux/ora-27121-unable-to-determine-size-of-sh</link>
			<pubDate>Wed, 14 Jan 2009 16:41:13 +0000</pubDate>			<dc:creator>Jason</dc:creator>
			<category domain="main">Linux</category>			<guid isPermaLink="false">30@http://www.jasonash.com/techblog/</guid>
						<description>&lt;p&gt;Installing Oracle 10G on Ubuntu this morning... &lt;/p&gt;

&lt;p&gt;Got the following error:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;ERROR:&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;ORA-01034: ORACLE not available&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;ORA-27121: unable to determine size of shared memory segment&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&amp;nbsp;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;Linux Error: 13: Permission denied&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;p&gt;This is caused by Oracle installer not setting setuid on $ORACLE_HOME/bin/oracle. To fix do:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;$ cd $ORACLE_HOME/bin&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;$ chmod 6751 oracle&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.jasonash.com/techblog/index.php/linux/ora-27121-unable-to-determine-size-of-sh&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>Installing Oracle 10G on Ubuntu this morning... </p>

<p>Got the following error:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">ERROR:</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">ORA-01034: ORACLE not available</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">ORA-27121: unable to determine size of shared memory segment</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code>&nbsp;</code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"></div></td><td><code><span class="amc_default">Linux Error: 13: Permission denied</span></code></td></tr>
</table></div>


<p>This is caused by Oracle installer not setting setuid on $ORACLE_HOME/bin/oracle. To fix do:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">$ cd $ORACLE_HOME/bin</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">$ chmod 6751 oracle</span></code></td></tr>
</table></div><div class="item_footer"><p><small><a href="http://www.jasonash.com/techblog/index.php/linux/ora-27121-unable-to-determine-size-of-sh">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.jasonash.com/techblog/index.php/linux/ora-27121-unable-to-determine-size-of-sh#comments</comments>
		</item>
				<item>
			<title>Flush DNS Cache on OSX Leopard</title>
			<link>http://www.jasonash.com/techblog/index.php/linux/flush-dns-cache-on-osx-leopard</link>
			<pubDate>Wed, 14 Jan 2009 14:17:39 +0000</pubDate>			<dc:creator>Jason</dc:creator>
			<category domain="main">Linux</category>			<guid isPermaLink="false">29@http://www.jasonash.com/techblog/</guid>
						<description>&lt;p&gt;The method for flushing the DNS cache on OSX has changed with Leopard.&lt;/p&gt;

&lt;p&gt;Here is the right way:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;dscacheutil -flushcache&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;the old method (lookupd) has been deprecated.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.jasonash.com/techblog/index.php/linux/flush-dns-cache-on-osx-leopard&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>The method for flushing the DNS cache on OSX has changed with Leopard.</p>

<p>Here is the right way:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">dscacheutil -flushcache</span></code></td></tr>
</table></div>

<p>the old method (lookupd) has been deprecated.</p><div class="item_footer"><p><small><a href="http://www.jasonash.com/techblog/index.php/linux/flush-dns-cache-on-osx-leopard">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.jasonash.com/techblog/index.php/linux/flush-dns-cache-on-osx-leopard#comments</comments>
		</item>
				<item>
			<title>Add Swap to Linux...</title>
			<link>http://www.jasonash.com/techblog/index.php/linux/add-swap-to-linux</link>
			<pubDate>Tue, 13 Jan 2009 18:30:06 +0000</pubDate>			<dc:creator>Jason</dc:creator>
			<category domain="main">Linux</category>			<guid isPermaLink="false">28@http://www.jasonash.com/techblog/</guid>
						<description>&lt;p&gt;This is an old sysadmin trick, but a good one all the same.&lt;br /&gt;
Suppose that you finished installing a brand-new Debian GNU/Linux server, and for whatever reason you forgot to set aside some space for a swap partition. Or you correctly got some swap space at installation time but now you desperately need some more. Well, despair not. It&amp;#8217;s a little known fact that you can have swap space in a file on top of the filesystem instead of using a dedicated block device.&lt;br /&gt;
This simple recipe will give you 2Gb of swap space. Here we go:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# mkdir /var/swap&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# chown root.root /var/swap&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# chmod 700 /var/swap&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# dd if=/dev/zero of=/var/swap/01.swp bs=1024 count=2M&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# chown root.root /var/swap/01.swp&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# chmod 600 /var/swap&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc7&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# mkswap /var/swap/01.swp&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now add this newly created swap space to your /etc/fstab:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;/var/swap/01.swp none swap sw 0 0&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Theoretically, you won&amp;#8217;t get the same performance as using a dedicated block device, and if the file actually gets fragmented it might drop rigt to the floor, so if you try this at all do it as soon as possible after installation. So if what you&amp;#8217;re trying to do is to *increase* your available swap space instead, you may add a priority option to give preference to the block-device swap space:&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;/dev/hda1 none swap sw,pri=1 0 0&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;/var/swap/01.swp none swap sw,pri=2 0 0&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And just this time activate the swapspace with addswap (The initscripts will do it on every boot thereafter):&lt;/p&gt;
&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;# swapon -av&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That&amp;#8217;s all there is to it.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.jasonash.com/techblog/index.php/linux/add-swap-to-linux&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>This is an old sysadmin trick, but a good one all the same.<br />
Suppose that you finished installing a brand-new Debian GNU/Linux server, and for whatever reason you forgot to set aside some space for a swap partition. Or you correctly got some swap space at installation time but now you desperately need some more. Well, despair not. It&#8217;s a little known fact that you can have swap space in a file on top of the filesystem instead of using a dedicated block device.<br />
This simple recipe will give you 2Gb of swap space. Here we go:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default"># mkdir /var/swap</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default"># chown root.root /var/swap</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default"># chmod 700 /var/swap</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default"># dd if=/dev/zero of=/var/swap/01.swp bs=1024 count=2M</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default"># chown root.root /var/swap/01.swp</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code><span class="amc_default"># chmod 600 /var/swap</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc7"></div></td><td><code><span class="amc_default"># mkswap /var/swap/01.swp</span></code></td></tr>
</table></div>

<p>Now add this newly created swap space to your /etc/fstab:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">/var/swap/01.swp none swap sw 0 0</span></code></td></tr>
</table></div>

<p>Theoretically, you won&#8217;t get the same performance as using a dedicated block device, and if the file actually gets fragmented it might drop rigt to the floor, so if you try this at all do it as soon as possible after installation. So if what you&#8217;re trying to do is to *increase* your available swap space instead, you may add a priority option to give preference to the block-device swap space:</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">/dev/hda1 none swap sw,pri=1 0 0</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">/var/swap/01.swp none swap sw,pri=2 0 0</span></code></td></tr>
</table></div>

<p>And just this time activate the swapspace with addswap (The initscripts will do it on every boot thereafter):</p>
<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default"># swapon -av</span></code></td></tr>
</table></div>

<p>That&#8217;s all there is to it.</p><div class="item_footer"><p><small><a href="http://www.jasonash.com/techblog/index.php/linux/add-swap-to-linux">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.jasonash.com/techblog/index.php/linux/add-swap-to-linux#comments</comments>
		</item>
				<item>
			<title>IE7 and PHP $_SESSION Vars...</title>
			<link>http://www.jasonash.com/techblog/index.php/linux/php/ie7phpsessionnightmare</link>
			<pubDate>Sat, 10 Jan 2009 22:24:19 +0000</pubDate>			<dc:creator>Jason</dc:creator>
			<category domain="main">PHP</category>			<guid isPermaLink="false">27@http://www.jasonash.com/techblog/</guid>
						<description>&lt;p&gt;OK, most people have heard of the dreaded IE7/PHP $_SESSION[''] nightmares... and there are about a million different solutions out there.&lt;/p&gt;

&lt;p&gt;Here is the bit of code that worked for me:&lt;/p&gt;

&lt;p class=&quot;amcode&quot;&gt;Code:&lt;/p&gt;&lt;div class=&quot;codeblock amc_code amc_short&quot;&gt;&lt;table&gt;&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc1&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;&amp;lt;?&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc2&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;header('P3P: CP=&quot;CAO PSA OUR&quot;'); &lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc3&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;session_start();&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc4&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_odd&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc5&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;...&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;amc_code_even&quot;&gt;&lt;td class=&quot;amc_line&quot;&gt;&lt;div class=&quot;amc6&quot;&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;span class=&quot;amc_default&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It turns out that you have to add a special header before opening the session.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;http://www.jasonash.com/techblog/index.php/linux/php/ie7phpsessionnightmare&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>OK, most people have heard of the dreaded IE7/PHP $_SESSION[''] nightmares... and there are about a million different solutions out there.</p>

<p>Here is the bit of code that worked for me:</p>

<p class="amcode">Code:</p><div class="codeblock amc_code amc_short"><table><tr class="amc_code_odd"><td class="amc_line"><div class="amc1"></div></td><td><code><span class="amc_default">&lt;?</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc2"></div></td><td><code><span class="amc_default">header('P3P: CP="CAO PSA OUR"'); </span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc3"></div></td><td><code><span class="amc_default">session_start();</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc4"></div></td><td><code><span class="amc_default">...</span></code></td></tr>
<tr class="amc_code_odd"><td class="amc_line"><div class="amc5"></div></td><td><code><span class="amc_default">...</span></code></td></tr>
<tr class="amc_code_even"><td class="amc_line"><div class="amc6"></div></td><td><code><span class="amc_default">?&gt;</span></code></td></tr>
</table></div>

<p>It turns out that you have to add a special header before opening the session.</p><div class="item_footer"><p><small><a href="http://www.jasonash.com/techblog/index.php/linux/php/ie7phpsessionnightmare">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>http://www.jasonash.com/techblog/index.php/linux/php/ie7phpsessionnightmare#comments</comments>
		</item>
			</channel>
</rss>
