<?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>Roo&#039;s View &#187; How To</title>
	<atom:link href="http://lowtek.ca/roo/category/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://lowtek.ca/roo</link>
	<description>A clever tagline should go here</description>
	<lastBuildDate>Sat, 05 May 2012 02:13:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How To: DD-WRT on the Netgear WNR3500L</title>
		<link>http://lowtek.ca/roo/2012/how-to-dd-wrt-on-the-netgear-wnr3500l/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-dd-wrt-on-the-netgear-wnr3500l</link>
		<comments>http://lowtek.ca/roo/2012/how-to-dd-wrt-on-the-netgear-wnr3500l/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 01:28:20 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lowtek.ca/roo/?p=1133</guid>
		<description><![CDATA[I&#8217;ve been a fan of DD-WRT for some time, a Linksys WRT54GL is the heart of my home network. While I don&#8217;t have an immediate need for a new router, I&#8217;ve been thinking for some time that I should pick up a reasonable backup in case the WRT54GL fails. There are also some really interesting [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lowtek.ca/roo/wp-content/uploads/2012/03/IMG_2608.jpg"><img class="aligncenter size-full wp-image-1134" title="IMG_2608" src="http://lowtek.ca/roo/wp-content/uploads/2012/03/IMG_2608.jpg" alt="" width="500" height="216" /></a></p>
<p>I&#8217;ve been a fan of <a href="http://en.wikipedia.org/wiki/DD-WRT">DD-WRT</a> for some time, a <a href="http://www.dd-wrt.com/wiki/index.php/WRT54GL">Linksys WRT54GL</a> is the heart of my home network. While I don&#8217;t have an immediate need for a new router, I&#8217;ve been thinking for some time that I should pick up a reasonable backup in case the WRT54GL fails. There are also some really interesting projects you can do with a modified router, and having a spare will let me tinker with some of those.</p>
<p>I came across a good deal on a refurbished <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L">Netgear WNR3500L</a>, it was about half the price of a <a href="http://www.canadacomputers.com/product_info.php?cPath=27_365&amp;item_id=031500">new unit</a>. This was too tempting: <a href="http://en.wikipedia.org/wiki/Wireless_N">N networking</a> (I don&#8217;t really need it, but why not stay current?), <a href="http://en.wikipedia.org/wiki/Gigabit_Ethernet">gigabit</a> wired networking (a must have), USB port (I wanted this for expansion options), but the feature that really sold me was 64MB <a href="http://en.wikipedia.org/wiki/Random-access_memory">RAM</a> and 8MB <a href="http://en.wikipedia.org/wiki/Read-only_memory">ROM</a> &#8211; more than enough for DD-WRT with all the features.</p>
<p>This particular router is also supported by <a href="http://tomatousb.org/doc:build-types">Tomato</a> another very popular firmware. There is also a somewhat suspect Netgear sponsored <a href="http://www.myopenrouter.com/">open firmware</a>, the site seems to have instructions for installing an older version of Tomato &#8211; personally I&#8217;d steer clear of this. Unfortunately the other popular router firmware <a href="http://wiki.openwrt.org/toh/netgear/wnr3500l">OpenWRT</a> doesn&#8217;t currently support this router. Of course, I prefer DD-WRT which <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L">does support this router</a>.</p>
<p>One of the reasons that I blog is to have a record of what I did, far too often I end up needing to do something again, or refer back when I&#8217;m doing an upgrade. Another reason is to help me get organized to do some of these things &#8211; finding the instructions is usually easy, understanding them and what you&#8217;re about to do takes some time. I probably spent 2hrs reading through forums and searching various things before I leapt in to flash the router, I strongly recommend you do the same. Also this write-up skips over some of the frustrating head scratching I do when things don&#8217;t work, that&#8217;s part of the learning process.</p>
<p>There is a <a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=148419">v2 of this router</a>, and v2 is NOT supported by DD-WRT. Apparently the boxes they come in are identical, but the router itself has a v2 marking. I did find a wiki that documents the <a href="http://www.wikidevi.com/wiki/Netgear_WNR3500Lv1">v1</a> and the <a href="http://www.wikidevi.com/wiki/Netgear_WNR3500Lv2">v2</a>, I was able to match the <a href="http://en.wikipedia.org/wiki/Federal_Communications_Commission">FCC</a> numbers listed to confirm I had a v1. For what it&#8217;s worth, my stock firmware was V1.0.2.50_31.1.25NA.</p>
<p>The DD-WRT site has some <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L#Installation_of_DD-WRT">excellent instructions on doing the installation</a>, I&#8217;ll avoid repeating those but will document the steps I took. I will repeat some of the cautions from the site:</p>
<ul>
<li>The WNR3500L requires a NEWD-2, K2.6 build of DD-WRT</li>
<li>You will first need to upload a special .chk build (also K2.6) of DD-WRT to the router to go from Netgear’s factory firmware. Then you may install a .bin build of DD-WRT.</li>
<li>Spend some time browsing the <a href="http://www.dd-wrt.com/phpBB2/">DD-WRT Forums</a>. There’s a lot of chaotic information to ingest.</li>
<li>Read the <a href="http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486">peacock thread</a>.</li>
</ul>
<p>Before we get started, let&#8217;s talk about the <a href="http://www.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30">30/30/30 reset</a>. Yes, it&#8217;s over the top and very conservative. Weigh those 90 seconds against the potential problems you might run into trying to by rushing through this, sure building a JTAG connector to resurrect a bricked router might be interesting but it&#8217;s going to take you a lot more than 90 seconds.</p>
<p>The following steps should not be considered an alternate installation procedure, please use the <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L#Installation_of_DD-WRT">official DD-WRT instructions</a> &#8211; consider this a walk through of the official instructions:</p>
<ol>
<li>Power on the device. Give it a minute to finish booting, the front panel LEDs should stabilize.</li>
<li>Plug in your linux box, it&#8217;ll automatically get an IP address (192.168.1.2)</li>
<li>Perform a <a href="http://www.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30">30/30/30 reset</a><br />
a) With unit powered on, press and hold the reset button for 30s<br />
b) Without releasing the reset button, unplug the router, wait 30s<br />
c) Still holding the reset button, plug the router in and wait 30s</li>
<li>Now wait for the PC to get an IP address assigned to it, this may take a minute or two be patient.</li>
<li>As I&#8217;m using Linux <a href="http://en.wikipedia.org/wiki/Firefox">Firefox</a> will be the browser of choice<br />
Connect to 192.168.1.1<br />
user: admin<br />
password: password<br />
(<a href="http://support.netgear.com/app/answers/detail/a_id/1148/~/default-password-for-netgear-devices">the default user and password</a>)</li>
<li>Since the router isn&#8217;t connected to anything except my PC the automatic upgrade process will fail due to no internet connection, that&#8217;s fine.</li>
<li>Click on &#8220;Router Upgrade&#8221; in the menu on the left side.</li>
<li>Choose the <a href="http://www.dd-wrt.com/routerdb/de/download/Netgear/WNR3500L/-/dd-wrt.v24-14311_NEWD-2_K2.6_mini-WNR3500L.chk/3467">.chk file you downloaded</a> as per the <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L#Installation_of_DD-WRT">DD-WRT site</a></li>
<li>You will get a warning: <em>&#8220;Warning! You are trying to download the firmware which the region is different from the current firmware you had.&#8221;</em> &#8211; this is ok, continue.</li>
<li>Wait for the upload process to complete.<br />
Once the upload is done, it will automatically move on to updating settings.<br />
A minute or so more it will show a DD-WRT screen.</li>
<li>Start a timer for 5 minutes and wait. Yes, likely paranoid as we could have probably started the timer when we started the upload process, but again this isn&#8217;t something you really want to rush. Time for coffee.</li>
<li>At this point we&#8217;re running DD-WRT, just not the version we want.</li>
<li>Do another <a href="http://www.dd-wrt.com/wiki/index.php/Hard_reset_or_30/30/30">30/30/30 reset</a></li>
<li>It took my system about 2 minutes to get an IP address (192.168.1.101)</li>
<li>DD-WRT will force us to set a username and password, for now I suggest the same as stock.</li>
<li>Click on the Administration tab, followed by the Firmware Upgrade sub-tab.</li>
<li>I set &#8216;After flashing, reset to&#8217; -&gt;  &#8221;Reset to Default settings&#8221;<br />
Pick the <a href="tp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2010/08-12-10-r14929/broadcom_K26/dd-wrt.v24-14929_NEWD-2_K2.6_big.bin">big file you downloaded</a> as per the <a href="http://www.dd-wrt.com/wiki/index.php/Netgear_WNR3500L#Installation_of_DD-WRT">DD-WRT site</a>.</li>
<li>It will flip to a reset screen once the firmware has been installed</li>
<li>Wait 5 minutes. If you&#8217;re really paranoid perform another 30/30/30 reset after that.</li>
<li>Done. Configure you&#8217;re new router.</li>
</ol>
<p>I primarily use <a href="http://en.wikipedia.org/wiki/Chrome_browser">Chrome</a>, but have experienced problems with DD-WRT and Chrome in the past. It turns out this time that FireFox was unable to configure the router (but it did handle the firmware install just fine). Consider this a caution, if you&#8217;re having trouble with this process it might be your browser.</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2012/how-to-dd-wrt-on-the-netgear-wnr3500l/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restore Rogers Galaxy Tab 7 to stock</title>
		<link>http://lowtek.ca/roo/2012/restore-rogers-galaxy-p1000r-to-stock/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=restore-rogers-galaxy-p1000r-to-stock</link>
		<comments>http://lowtek.ca/roo/2012/restore-rogers-galaxy-p1000r-to-stock/#comments</comments>
		<pubDate>Thu, 22 Mar 2012 01:52:20 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lowtek.ca/roo/?p=1121</guid>
		<description><![CDATA[When I got my Galaxy Tab 7&#8243; one of the first things I did was to see if I could collect the stock firmware in a format that was useful in case I ever wanted to restore the tablet back to it&#8217;s stock form. It turned out that the 2.2 based firmware was not easily [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lowtek.ca/roo/wp-content/uploads/2012/03/gtab_stock_heimdall.png"><img class="aligncenter size-full wp-image-1122" title="gtab_stock_heimdall" src="http://lowtek.ca/roo/wp-content/uploads/2012/03/gtab_stock_heimdall.png" alt="" width="500" height="351" /></a></p>
<p>When I got my <a href="http://en.wikipedia.org/wiki/Galaxy_Tab">Galaxy Tab 7&#8243;</a> one of the first things I did was to see if I could collect the stock firmware in a format that was useful in case I ever wanted to restore the tablet back to it&#8217;s stock form. It turned out that the <a href="http://en.wikipedia.org/wiki/Android_version_history#v2.2.x_Froyo">2.2</a> based firmware was not easily available on the net, and neither was the <a href="http://en.wikipedia.org/wiki/Android_version_history#v2.3.x_Gingerbread">2.3</a> version.</p>
<p>The results of my work are captured in <a href="http://forum.xda-developers.com/showthread.php?t=1365433">an XDA thread</a>, but restoring from those captures was an exercise left to the reader. The 2.2 (froyo) image is captured directly from the device, I first rooted the tablet with <a href="http://forum.xda-developers.com/showthread.php?t=803682">SuperOneClick</a> then used <a href="http://forum.xda-developers.com/showthread.php?t=850359">rotobackup</a> to capture a <a href="http://www.glassechidna.com.au/products/heimdall/">heimdall</a> friendly set of files for flashing. The original work was tracked in <a href="http://forum.xda-developers.com/showthread.php?t=1342365">another XDA thread</a> where you can read the blow by blow if you&#8217;re interested. For 2.3 (gingerbread) I was able to grab the intermediate files from <a href="http://en.wikipedia.org/wiki/Samsung_Kies">Kies</a> during the normal upgrade process &#8211; the rest of this post will talk about how to use those files to restore the P1000R to a stock 2.3 state.</p>
<p>I&#8217;m using heimdall version 1.3.1 on Linux, but other versions and platforms should work fine. I particularly like using Linux to flash the GalaxyTab as it doesn&#8217;t suffer the same driver madness that Windows seems to have, USB devices just work. I&#8217;ll assume you can find the <a href="http://forum.xda-developers.com/showthread.php?t=1365433">download</a> and extract the files.</p>
<p>You&#8217;ll want to specify the PIT file &#8211; <code>gt-p1000_mr.pit</code>, it&#8217;s safe to select the repartition box as we&#8217;ll be doing the <a href="http://en.wikipedia.org/wiki/The_Full_Monty_(phrase)">full monty</a> here [sharp eyed readers will notice that the picture at the top of this post doesn't have the box checked, that's a mistake on my part - go ahead and check it]. The files map to the heimdall partition names as follows:</p>
<p><code>MODEM -&gt; modem.bin<br />
CACHE -&gt; cache.rfs<br />
KERNEL -&gt; zImage<br />
FACTORYFS -&gt; factoryfs.rfs<br />
PARAM -&gt; param.lfs<br />
IBL+PBL -&gt; boot.bin<br />
SBL -&gt; sbl.bin</code></p>
<p>So click on the Add button and specify the partition type and files from the downloaded and extracted ROM.</p>
<p>Next you need to get your device into download mode. My preferred approach is to hold the power+volume down buttons until the download screen appears (yellow triangle with android digging). Now you can click start on heimdall.</p>
<p>Under Linux at least , this will hit 100% and then fail to reboot. That&#8217;s ok. Wait a minute or two to make sure it&#8217;s really done, then force it to reboot into recovery mode by holding power+volume up until you see the recovery screen.</p>
<p>Assuming the flash has gone well, the stock recovery will start up and automatically try to install some updates. You should see:</p>
<p><code>-- Updating filesystem...<br />
<span style="color: #ff0000;">E:failed to mount /dbdata (Invalid argument)</span><br />
<span style="color: #ff0000;"> E:discard_filesystem_for_rfs:Can't mount /dbdata</span></code></p>
<p><code>-- Wiping cache...<br />
Formatting /cache<br />
<span style="color: #ff0000;">Cache wipe failed.</span></code></p>
<p>Don&#8217;t panic. Remember that this update was expecting to have come from a properly installed 2.2 stock, we&#8217;re leaping into the middle of the process.</p>
<p><a href="http://lowtek.ca/roo/wp-content/uploads/2012/03/gtab_stock_home.png"><img class="alignright  wp-image-1124" title="gtab_stock_home" src="http://lowtek.ca/roo/wp-content/uploads/2012/03/gtab_stock_home.png" alt="" width="122" height="209" /></a>Using the recovery menus, select &#8216;factory reset + wipe data&#8217; followed by &#8216;wipe cache&#8217;. One hint for those not used to the stock recovery image, the capacitive home button is used to select entries and volume up/down for navigation.</p>
<p>Now you can reboot. The first boot will take a while as it sorts things out and rebuilds the cache(s).  All should go well and you&#8217;ll be greeted by the stock home screen.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2012/restore-rogers-galaxy-p1000r-to-stock/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows Vista Recovery</title>
		<link>http://lowtek.ca/roo/2012/windows-vista-recovery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=windows-vista-recovery</link>
		<comments>http://lowtek.ca/roo/2012/windows-vista-recovery/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 02:41:26 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lowtek.ca/roo/?p=1098</guid>
		<description><![CDATA[Like many geeks, I&#8217;m the family tech support. Somehow my nephew&#8217;s Windows Vista laptop had stopped booting. You&#8217;d get the blue screen of death (BSoD) on boot. Using F8 on boot also resulted in a BSoD. I even tried using a Vista recovery disk and it too crashed and burned in the same way. My first [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lowtek.ca/roo/wp-content/uploads/2012/02/0x0000C1F5.png"><img class="aligncenter size-full wp-image-1099" title="0x0000C1F5" src="http://lowtek.ca/roo/wp-content/uploads/2012/02/0x0000C1F5.png" alt="" width="506" height="93" /></a></p>
<p>Like many geeks, I&#8217;m the family tech support. Somehow my nephew&#8217;s <a href="http://en.wikipedia.org/wiki/Windows_Vista">Windows Vista</a> laptop had stopped booting. You&#8217;d get the blue screen of death (<a href="http://en.wikipedia.org/wiki/Bsod">BSoD</a>) on boot. Using F8 on boot also resulted in a BSoD. I even tried using a <a href="http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/">Vista recovery disk</a> and it too crashed and burned in the same way.</p>
<p>My first thought was to check that the hardware was ok. Running some diagnostics from an <a href="https://help.ubuntu.com/community/LiveCD">Ubuntu live CD</a> indicated that side of things looked fine.</p>
<p>So I tracked down the Vista Install disks, maybe I&#8217;d need to do a full re-install or at least it&#8217;d give me a way to move forward. What? Another BSoD?! This time instead of ignoring the data on the BSoD I wrote some of it down, it the main error code was: 0x0000C1F5. Searching for this turns up the specific problem, there is even a <a href="http://support.microsoft.com/kb/946084/en-us">Microsoft knowledge base article</a>. Of course the fix that is supplied by Microsoft won&#8217;t help you until you can actually boot Vista again.</p>
<p>I though I could solve the issue <a href="http://www.techjamaica.com/forums/showthread.php?62215-How-to-fix-the-quot-STOP-0x0000C1F5-quot-BSOD-(Vista-Version)">using Linux as was described in one of the forums</a>. While I could easily boot <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> and poke around, there was no sign of a <code>$TxfLog</code> log file. I suspect in this particular case there was some other file that was corrupted, but which one? A bit more digging around and I found <a href="http://support.microsoft.com/kb/970101">another Microsoft knowledge base article</a>.</p>
<p>This ended up being the solution: <a href="http://en.wikipedia.org/wiki/Windows_7">Windows 7</a> knows how to recover from this type of filesystem corruption. The knowledge base article suggests that you use a Windows 7 Beta installation disk &#8211; I wasn&#8217;t able to find one of these. What I did find was some <a href="http://www.raymond.cc/blog/archives/2010/05/09/download-windows-7-system-recovery-discs-iso-32bit-and-64bit/">Windows 7 recovery images</a>, these will work for what we need to do.</p>
<p>Burn the image to a CD or DVD. Boot the Windows 7 Recovery disk to the point where it&#8217;s going to try to recover, now shut down and cancel the recovery. The Windows 7 Recovery disk should have repaired the Vista filesystem so we can now boot from the hard drive into recovery mode and the system will perform it&#8217;s &#8220;self repair&#8221; fixing things up.</p>
<p>So while the BSoD screen can be intimidating, taking a bit of time to read the screen and take note of some of the magic numbers can help guide you to the right solution. Or just call up the geek in your family and get them to fix it.</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2012/windows-vista-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Apache2 &#8220;trusted&#8221; SSL Certificate from StartSSL</title>
		<link>http://lowtek.ca/roo/2012/ubuntu-apache2-trusted-ssl-certificate-from-startssl/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=ubuntu-apache2-trusted-ssl-certificate-from-startssl</link>
		<comments>http://lowtek.ca/roo/2012/ubuntu-apache2-trusted-ssl-certificate-from-startssl/#comments</comments>
		<pubDate>Thu, 12 Jan 2012 04:09:19 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://lowtek.ca/roo/?p=1049</guid>
		<description><![CDATA[I own the domain lowtek.ca and host a couple of personal projects as well as this blog on it. One of the areas is behind a password and that part of the site I redirect over to https to ensure that the communication is encrypted. While the whole Certificate Authority infrastructure has currently become questioned, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://lowtek.ca/roo/wp-content/uploads/2012/01/https_lowtek.png"><img class="aligncenter size-full wp-image-1050" title="https_lowtek" src="http://lowtek.ca/roo/wp-content/uploads/2012/01/https_lowtek.png" alt="" width="500" height="81" /></a></p>
<p>I own the domain <a href="https://lowtek.ca">lowtek.ca</a> and host a couple of personal projects as well as this blog on it. One of the areas is behind a password and that part of the site I redirect over to <a href="http://en.wikipedia.org/wiki/Https">https</a> to ensure that the communication is encrypted. While the whole Certificate Authority infrastructure has currently become questioned, the value of having a <a href="http://en.wikipedia.org/wiki/Secure_Sockets_Layer">SSL</a> connection between your browser and (hopefully) a specific destination machine still has value. I found a humorous <a href="http://www.youtube.com/watch?v=SJJmoDZ3il8">youtube video</a> that describes SSL basics if this is new to you.</p>
<p>If you were watching the tech news, you&#8217;ll have seen several of the CA&#8217;s had <a href="http://tech.slashdot.org/story/11/10/28/1954201/four-cas-have-been-compromised-since-june">security breaches</a>. Even <a href="http://en.wikipedia.org/wiki/StartCom">StartSSL</a> which this post will talk about using had <a href="http://www.eweek.com/c/a/Security/Another-Certificate-Authority-Compromised-No-Fake-SSL-Certificates-Issued-107625/">some</a> <a href="http://www.theregister.co.uk/2011/06/21/startssl_security_breach/">issues</a>, but it seems that <a href="https://github.com/diaspora/diaspora/issues/2099">it wasn&#8217;t as bad</a> as the others. There has even been some <a href="http://www.phreedom.org/research/rogue-ca/">research into how to attack / break SSL</a> entirely. The web is a scary place if you think too much about this stuff. Today SSL is the most convenient web security story there is, and for the most part it works well enough.</p>
<p>For most people hosting personal websites the simple path is to use a<a href="http://en.wikipedia.org/wiki/Self-signed_certificate"> self signed certificate</a>.  The one downside to this is that whatever browser you are using will not recognize the certificate as valid, you&#8217;ll either be prompted to download and remember it &#8211; or just trust it for this one session. The manner in which browsers trust commercial web sites https connections is the certificates are issued by one of the root CA&#8217;s (<a href="http://en.wikipedia.org/wiki/Certificate_authority">Certificate Authority</a>). The CA is a trusted 3rd party which the browser can check with to validate the certificate the website is offering up.</p>
<p>Ubuntu has some guides on <a href="https://help.ubuntu.com/11.10/serverguide/C/certificates-and-security.html">creating certificates</a>. What I&#8217;ll try to do here is provide a specific example of using StartSSL to generate a free certificate that is accepted by most web browsers. <a href="http://jasoncodes.com/posts/startssl-free-ssl">Much of the details come from another blog</a> that I referenced when creating my <a href="http://en.wikipedia.org/wiki/StartCom">StartSSL</a> certificate.</p>
<p>You&#8217;ll probably want to use <a href="http://en.wikipedia.org/wiki/Firefox">FireFox</a>. The web interface at <a href="http://www.startssl.com/">StartSSL.com</a> can be a bit finicky and FireFox is known to work &#8211; I used the somewhat old 3.6.25 version. Of course the first step is to sign-up and create an account on StartSSL. They use email confirmation and my <a href="http://lowtek.ca/roo/2011/greylisting-with-postfix-and-ubuntu/">greylisting</a> caused a bit of a hiccup here, waiting a few minutes and resubmitting the sign-up succeeded just fine. Then there will be a wizard that takes you through the rest of the sign-up process.</p>
<p>At the end of your account sign up you&#8217;ll be encouraged to back up the client certificate that has been installed into your browser. As I understand it, they use the client certificate as a form of authentication that it is really you they are connected to. The FAQ has details on <a href="https://www.startssl.com/?app=25#4">backing up the client certificate</a>. If for some reason you lose your client certificate they have a <a href="https://www.startssl.com/?app=25#14">FAQ for that too</a>.</p>
<p>Next we want to return to the &#8220;<a href="https://www.startssl.com/?app=11&amp;action=true">Control Panel</a>&#8221; and use the &#8220;Validations Wizard&#8221; to do the &#8220;Domain Name Validation&#8221;. This will require another email validation to ensure that you are the owner of the domain (you&#8217;ll need to be able to receive email for that domain).</p>
<p>Now we can actually create a certificate. There are pay options for certificates, but we want to use the free version. Use the &#8220;Certificates Wizard&#8221; to create a &#8220;Web Server SSL/TLS Certificate&#8221;. Again I&#8217;ll reference the <a href="http://jasoncodes.com/posts/startssl-free-ssl">very useful blog post from jasoncodes.com</a> that describes this set of steps (I will replicate here for completeness).</p>
<p>The first step of creating a certificate we can skip, as we plan to create our own Certificate Signing Request (<a href="http://en.wikipedia.org/wiki/Certificate_signing_request">CSR</a>) locally. Execute the follwoing on your server, obviously replacing mydomain.ca with your domain name:</p>
<p><code>openssl req -new -newkey rsa:4096 -days 380 -nodes -keyout mydomain.ca.key -out mydomain.ca.csr<br />
</code><br />
There will be several questions posed to you during this, here is a dump of the questions and some example answers:</p>
<p><code>Country Name (2 letter code) [AU]:CA<br />
State or Province Name (full name) [Some-State]:YourStateOrProvince<br />
Locality Name (eg, city) []:YourCity<br />
Organization Name (eg, company) [Internet Widgits Pty Ltd]:SomeName<br />
Organizational Unit Name (eg, section) []:<br />
Common Name (eg, YOUR name) []:mydomain.ca<br />
Email Address []:secret_email@mydomain.ca</code></p>
<p><code>Please enter the following 'extra' attributes<br />
to be sent with your certificate request<br />
A challenge password []:<br />
An optional company name []:</code></p>
<p>Some of the answers can be blank as should be evident above. If you&#8217;re having trouble with the 2 letter country codes, <a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">check on wikipedia</a>. I did find a reference that suggested that the c<a href="http://www-uxsup.csx.cam.ac.uk/~jw35/courses/using_https/html/x280.htm">ommon name must exactly match the host name of your server</a>, you might note that I&#8217;m not using a www prefix here. This will allow me to re-use this same certificate for email and other things in theory, it also follows the <a href="http://lowtek.ca/roo/2011/no-www/">no-www</a> approach. I opted to <a href="http://www.mail-archive.com/openssl-users@openssl.org/msg35862.html">leave the challenge password blank</a>.</p>
<p>The second step of the wizard on StartSSL for creating a certificate will ask for a cut &amp; paste of the <code>mydomain.ca.csr</code> we just created. Paste the entire contents of the file in, and move on to the next step where you should see that the request was received.</p>
<p>Moving along the next step is to &#8220;Add Domains&#8221;, since we&#8217;ve only validated one domain this should be easy. As part of this process it will ask for one sub domain. I used &#8220;www&#8221; since that will still resolve correctly to the lowtek.ca domain.</p>
<p>The remainder of the steps should be straight forward, you&#8217;ll arrive at the &#8220;Save Certificate&#8221; screen. You&#8217;ll want to save three things: 1) Text box contents as mydomain.ca.crt, then save-as the 2) intermediate and 3) root CA certificates (last two should be sub.class1.server.ca.pem and ca.pem respectively).</p>
<p>Now we need to install into Apache2. I&#8217;ll assume you&#8217;re running Ubuntu.</p>
<p>We&#8217;ll start by copying the <code>.crt</code> and <code>.pem</code> files we saved from the final step on StartSSL into the <code>/etc/apache2/ssl</code> directory. We also want the <code>.key</code> file that was created when we made our CSR copied to the same directory.</p>
<p>Again I must credit <a href="http://jasoncodes.com/posts/startssl-free-ssl">jasoncodes.com</a>, this is almost verbatim from his site. Run the following as root.</p>
<p><code>cd /etc/apache2/ssl<br />
mv ca.pem startssl.ca.crt<br />
mv sub.class1.server.ca.pem startssl.sub.class1.server.ca.crt<br />
cat startssl.sub.class1.server.ca.crt startssl.ca.crt &gt; startssl.chain.class1.server.crt<br />
cat mydomain.ca.{key,crt} startssl.chain.class1.server.crt &gt; mydomain.ca.pem<br />
ln -sf mydomain.ca.pem apache.pem<br />
chown root:root *.crt *.key *.pem<br />
chmod 640 *.key *.pem<br />
</code><br />
Now we need to modify the apache config file /etc/apache2/sites-available/ssl and add the following within the &lt;VirtualHost&gt; block:</p>
<p><code>SSLEngine On<br />
SSLCertificateFile /etc/apache2/ssl/mydomain.ca.crt<br />
SSLCertificateKeyFile /etc/apache2/ssl/mydomain.ca.key<br />
SSLCertificateChainFile /etc/apache2/ssl/startssl.chain.class1.server.crt</code></p>
<p>Check that your Apache config parses as valid:</p>
<p><code>apache2ctl -t</code></p>
<p>And then restart Apache with the new config:</p>
<p><code>sudo /etc/init.d/apache2 reload</code></p>
<p>Here is the the verification process verbatim from <a href="http://jasoncodes.com/posts/startssl-free-ssl">jasoncodes.com</a>:</p>
<blockquote><p>Run the following after restarting Apache to check the certificate chain:</p>
<p><code>echo HEAD / | openssl s_client -connect localhost:443 -quiet &gt; /dev/null</code></p>
<p>You should see something like:</p>
<p><code>depth=2 /C=IL/O=StartCom Ltd./OU=Secure Digital Certificate Signing/CN=StartCom Certification Authority<br />
verify error:num=19:self signed certificate in certificate chain<br />
verify return:0</code></p>
<p>A depth of 2 and a return value of 0 is good. If the certificate chain is wrong, you&#8217;ll probably see something like:</p>
<p><code>depth=0 /description=12345-ABCDEF123456/C=XX/O=Persona Not Validated/OU=StartCom Free Certificate Member/CN=host.example.com/emailAddress=hostmaster@example.com<br />
verify error:num=20:unable to get local issuer certificate<br />
verify return:1<br />
depth=0 /description=12345-ABCDEF123456/C=XX/O=Persona Not Validated/OU=StartCom Free Certificate Member/CN=host.example.com/emailAddress=hostmaster@example.com<br />
verify error:num=27:certificate not trusted<br />
verify return:1<br />
depth=0 /description=12345-ABCDEF123456/C=XX/O=Persona Not Validated/OU=StartCom Free Certificate Member/CN=host.example.com/emailAddress=hostmaster@example.com<br />
verify error:num=21:unable to verify the first certificate<br />
verify return:1</code></p></blockquote>
<p>I was pleased to see that it all verified correctly for me. Visiting <a href="https://lowtek.ca">https://lowtek.ca</a> resulted in a green lock icon under <a href="http://en.wikipedia.org/wiki/Google_Chrome">Google Chrome</a>.</p>
<p>The StartSSL certificate expires in 1 year, so next year around this time I&#8217;ll be doing the same process. There is another CA (<a href="http://www.affirmtrust.com/">AffirmTrust</a>) I came across that offers free 3 year certificates, I have no experience with them but would be interested to hear if anyone tries them out. There is <a href="http://www.cacert.org">CACert</a> as well, but it doesn&#8217;t appear to be included in any of the browsers &#8211; limiting the usefulness of a certificate from them.</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2012/ubuntu-apache2-trusted-ssl-certificate-from-startssl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unlocking Samsung Galaxy S Vibrant (Bell)</title>
		<link>http://lowtek.ca/roo/2011/unlocking-samsung-i9000m/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unlocking-samsung-i9000m</link>
		<comments>http://lowtek.ca/roo/2011/unlocking-samsung-i9000m/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 02:08:00 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=1021</guid>
		<description><![CDATA[I&#8217;ve been a big fan of unlocked GSM phones since my first one back in 2009. I&#8217;ve also been through a surprising number of different phone since then, but all of them have been 2nd (or 3rd) hand and have been a good price for a phone that still has lots of use left in [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2011/12/IMG_2425.jpg"><img class="aligncenter size-full wp-image-1023" title="IMG_2425" src="http://www.lowtek.ca/roo/wp-content/uploads/2011/12/IMG_2425.jpg" alt="" width="500" height="283" /></a></p>
<p>I&#8217;ve been a big fan of <a href="http://en.wikipedia.org/wiki/SIM_lock#Unlocking_technology">unlocked</a> GSM phones since my first one back in 2009. I&#8217;ve also been through a surprising number of different phone since then, but all of them have been 2nd (or 3rd) hand and have been a good price for a phone that still has lots of use left in it. My latest phone the <a href="http://en.wikipedia.org/wiki/Samsung_Galaxy_S">Samsung Galaxy S Vibrant (i9000m)</a> is no different, but it came to me locked to <a href="http://en.wikipedia.org/wiki/Bell_Mobility">Bell</a>.</p>
<p>I purchased the i9000m knowing it could be easily unlocked if you had the right magic. With the stock firmware, if you don&#8217;t have the phone unlocked you&#8217;ll see what&#8217;s pictured at the top of this post when you install a SIM card.</p>
<p>It turns out the forums have a great <a href="http://forum.xda-developers.com/showthread.php?t=761045">how to guide</a>, with pointers to an app on the <a href="https://market.android.com/">Android Market</a> if you&#8217;re afraid of a little bit of hex editing. It should go without saying that I selected the hex editing route. I&#8217;ll describe the steps I used here, but  <a href="http://forum.xda-developers.com/showthread.php?t=761045">all credit to the folks in the forums for figuring this out</a>.</p>
<p>I will assume that you&#8217;ve <a href="http://wiki.cyanogenmod.com/wiki/Overview_of_Modding#Root">rooted</a> your i9000m and you&#8217;re not incapable of using a <a href="http://en.wikipedia.org/wiki/Hex_editor">hex editor</a>.</p>
<p><strong>Step 1</strong>: We&#8217;re going to copy some <a href="http://en.wikipedia.org/wiki/Non-volatile_memory">non-volatile</a> memory off the phone that contains the &#8216;lock&#8217;. Perform the following commands on the phone (probably via <a href="http://wiki.cyanogenmod.com/wiki/ADB">ADB</a>).</p>
<p><code>$ su<br />
# cat /efs/nv_data.bin &gt;&gt; /sdcard/nv_data.bin<br />
</code></p>
<p>Now copy that file onto your PC for editing. Make a backup of the original before step 2.</p>
<p><strong>Step 2</strong>: Edit that file, I used <a href="http://packages.ubuntu.com/search?keywords=hexedit">hexedit on Ubuntu</a>. The lock bit is inside of the byte at <code>0x181469</code> in the file. See the green circle below, change that <code>01</code> into a <code>00</code> and save the file.</p>
<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2011/12/Screenshot-Hacking-SGS-unlock.png"><img class="aligncenter size-full wp-image-1022" title="Screenshot Hacking SGS-unlock" src="http://www.lowtek.ca/roo/wp-content/uploads/2011/12/Screenshot-Hacking-SGS-unlock.png" alt="" width="639" height="139" /></a></p>
<p>Starting at offset <code>0x181468</code> you should see the series of digits: <code>ff 01 00 00 00 00 46 46</code></p>
<p>The XDA post describes it as follows:</p>
<blockquote><p>There are 5 different types of locks in 5 different bytes</p>
<p>the FF byte should be left alone<br />
the first byte after the FF is the network lock<br />
the next byte is the network subset lock<br />
the next byte is the sp lock<br />
the next byte is the cp lock<br />
the last byte appears to be a data lock.<br />
the 46 46 should be left alone</p></blockquote>
<p><strong>Step 3</strong>: Use the modified file to update your phone. Let&#8217;s assume you copied the modified file to /sdcard/nv_data.bin on the phone, and again the commands below are executed on the phone.</p>
<p><code>$ su<br />
# rm /efs/nv_data.bin<br />
# rm /efs/nv_data.bin.md5<br />
# cat /sdcard/nv_data.bin &gt;&gt; /efs/nv_data.bin<br />
# chmod 755 /efs/nv_data.bin<br />
# chown radio.radio /efs/nv_data.bin || chown 1001.1001 /efs/nv_data.bin<br />
# reboot<br />
</code></p>
<p>That&#8217;s it, you&#8217;re unlocked. The unlock should persist across ROM (firmware) changes.</p>
<p>References: <a href="http://forum.xda-developers.com/wiki/index.php?title=Samsung_Galaxy_S_Series">a great article</a> with pointers to valuable information on the i9000 series.</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2011/unlocking-samsung-i9000m/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To: Migrate from Raid1 to Raid5</title>
		<link>http://lowtek.ca/roo/2011/how-to-migrate-from-raid1-to-raid5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-migrate-from-raid1-to-raid5</link>
		<comments>http://lowtek.ca/roo/2011/how-to-migrate-from-raid1-to-raid5/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 00:35:36 +0000</pubDate>
		<dc:creator>Roo</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[How To]]></category>

		<guid isPermaLink="false">http://www.lowtek.ca/roo/?p=986</guid>
		<description><![CDATA[Recently I discovered that the iPhoto data was actually stuffed under a deleted user that existed as part of the Mac migration process, this meant it wasn&#8217;t being seen by my rsnapshot backup of the active user directory. Fixing the location of the iPhoto library was relatively easy to do, but having an extra 130GB [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.lowtek.ca/roo/wp-content/uploads/2011/11/IMG_2415.jpg"><img class="aligncenter size-full wp-image-987" title="IMG_2415" src="http://www.lowtek.ca/roo/wp-content/uploads/2011/11/IMG_2415.jpg" alt="" width="500" height="313" /></a>Recently I discovered that the iPhoto data was actually stuffed under a deleted user that existed as part of the Mac migration process, this meant it wasn&#8217;t being seen by my rsnapshot backup of the active user directory. Fixing the location of the iPhoto library was relatively easy to do, but having an extra 130GB of data to back up immediately ran me into storage problems.</p>
<p>I had <a href="http://www.lowtek.ca/roo/2010/mirrored-drives-with-ubuntu/">setup a RAID1 system</a> using two 1TB volumes, I had decided to split the 1TB mirrored volume into 300Gb/700Gb so I could limit the space used by backups to 300Gb. In hindsight this was a silly idea, and it also made the migration process more complicated. If I had placed the 300Gb volume second, it might have been feasible to move that data somewhere then expand the 700Gb volume to fill the remainder of the drive &#8211; but I had put the 300Gb volume first. One day someone will write the utility to allow you to shift the start of a volume to the left (towards the start of a drive).</p>
<p>Instead of sticking with a <a href="http://en.wikipedia.org/wiki/RAID">RAID</a>1 setup, I decided to move to RAID5. While there is a little less redundancy with RAID5, the additional flexibility seems like a good trade off to me at this point. I&#8217;ll avoid getting into the religious debate over <a href="http://www.techrepublic.com/blog/datacenter/choose-a-raid-level-that-works-for-you/3237">which type of RAID</a> you should use, or <a href="http://www.zdnet.com/blog/storage/why-raid-5-stops-working-in-2009/162">if RAID makes sense at all with large sized drives</a>. Also there are some good off the shelf solutions now such as <a href="http://www.drobo.com/">Drobo</a> or <a href="http://www.qnap.com/USEng/">QNAP</a>.</p>
<p>With a project like this it is a good idea to make a plan in advance, then log your steps as you go along. Migration of 100&#8242;s of Gb of data will take time, lots of time. I did the work over about 5 days, some of it while on a trip outside the country (remote access!). Here was my plan:</p>
<ol>
<li>install new drive &#8211; ensure system is happy</li>
<li>break mirrored set &#8211; run in degraded mode</li>
<li>repartition new drive &amp; unused mirrored drive</li>
<li>create degraded raid 5 (2 drives only)</li>
<li>copy data from degraded mirror onto degraded raid5</li>
<li>decommission degraded mirror &amp; repartition</li>
<li>add volume to raid5 set</li>
</ol>
<p>I also was careful to check that the new volume had the same capacity as the other two having been <a href="http://www.lowtek.ca/roo/2010/how-to-resize-a-mirrored-volume/">bit by that in the past</a>. (I used <code>fdisk -l /dev/sde</code> to get the stats of the drive)(...)<br/>Read the rest of <a href="http://lowtek.ca/roo/2011/how-to-migrate-from-raid1-to-raid5/">How To: Migrate from Raid1 to Raid5</a> (535 words)</p>
]]></content:encoded>
			<wfw:commentRss>http://lowtek.ca/roo/2011/how-to-migrate-from-raid1-to-raid5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

