<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title><![CDATA[brycv.com]]></title>
  <link href="http://brycv.com/atom.xml" rel="self"/>
  <link href="http://brycv.com/"/>
  <updated>2016-01-01T08:48:25-08:00</updated>
  <id>http://brycv.com/</id>
  <author>
    <name><![CDATA[Bryan Vyhmeister]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
    <entry>
      




<title type="html"><![CDATA[The Official OS X Mavericks/Yosemite/El Capitan USB Installer Guide &rarr;]]></title>
<link href="http://support.apple.com/kb/HT5856"/>
<updated>2014-08-17T20:00:00-07:00</updated>
<id>http://brycv.com/blog/2014/the-official-os-x-mavericks-usb-installer</id>

      <content type="html"><![CDATA[<p>In the process of upgrading a <a href="http://link.brycv.com/a/B007477COO">Mac mini</a> to be a server, I installed two SSDs to be configured as a RAID 1. One of the caveats to this approach is that a recovery partition is not supported when using a RAID as your boot volume. I had previously come across these instructions from Apple but looked them back up in order to install OS X. Even with my extremely fast fiber connection, it is still much slower to install from the recovery partition than it is from a local USB drive.</p>

<p> <em>Update: This guide has been updated by Apple for Yosemite and El Capitan as well so the title of this post has been updated to reflect that change.</em></p>
<p><a rel="bookmark" href="http://brycv.com/blog/2014/the-official-os-x-mavericks-usb-installer/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[The Famous Home Office Hits 7.0 &rarr;]]></title>
<link href="http://www.stefandidak.com/office/"/>
<updated>2013-12-18T12:50:00-08:00</updated>
<id>http://brycv.com/blog/2013/the-famous-home-office-hits-7-0</id>

      <content type="html"><![CDATA[<p>One of the great things that can happen on the internet is meeting people that have common interests that you would otherwise not run into in the normal course of life. There have been a number of people I have met this way that I now keep in contact with and one of them is <a href="http://twitter.com/stefandidak">Stefan Didak</a>. We met up along with our wives in Southern California in 2011 and had a great time!</p>

<p>If you don&rsquo;t know who he is, you might recognize him from his home office. As a fellow home office aficionado, it&rsquo;s always fun to look at all the tech gear. (Yes, obviously I enjoy tech hardware and home office layouts.) This picture from <a href="http://www.stefandidak.com/office/">his site</a> gives some idea of how expansive the layout is.</p>

<p><a href="http://www.stefandidak.com/office/"><img class="center" src="http://brycv.com/images/stefan-didak-office7-nighttime-18.jpg" width="500"></a></p>

<p>The newest iteration is now at 7.0 and is very impressive. As I&rsquo;m designing my new home office that will be completed in January or February, it is very interesting to look at his whole design and assembly process.</p>

<p>The hardest part of the office design for me is choosing the right desk and desk layout. In particular, I have hesitated to buy an expensive desk since I tend to change things around frequently or, in the case of moves, change is required. It&rsquo;s great to see a really good layout for lots of systems and monitors and it gives me great idea for how to better design my own space.</p>

<p>You&rsquo;ll find the main office pictures at <a href="">Stefan Didak&rsquo;s Home Office</a> page and the assembly at the <a href="http://www.stefandidak.com/office/home-office-version-7-setup-making-of/">Home Office Version 7 Setup Making Of</a> page. Both are definitely worth a look and a bookmark!</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/the-famous-home-office-hits-7-0/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Downloading YouTube Videos with OpenBSD or Similar]]></title>
<link href="http://brycv.com/blog/2013/downloading-youtube-videos-with-openbsd-or-similar/"/>
<updated>2013-12-03T22:29:42-08:00</updated>
<id>http://brycv.com/blog/2013/downloading-youtube-videos-with-openbsd-or-similar</id>

      <content type="html"><![CDATA[<p>From time to time it is nice to be able to download a YouTube video for offline viewing. There are commercial tools to do this but I always tend to avoid those. Last week I discovered the tool I have wanted for years. I&rsquo;m probably the last one to know about this but here it is.</p>

<p>The tool is called <a href="https://github.com/rg3/youtube-dl"><em>youtube-dl</em></a> and simply takes the YouTube URL and downloads the best quality available. It&rsquo;s hard to beat that. I&rsquo;ve now downloaded a variety of BSD videos that I want to watch at my convenience or while traveling. (The <a href="http://www.youtube.com/channel/UCntL6bw6PoFR0r67cMYXLkg">bsdconferences YouTube Channel</a> is a great place to start.) There are, of course, many other command line options that I have yet to explore.</p>

<p><a href="http://www.youtube.com/channel/UCntL6bw6PoFR0r67cMYXLkg"><img class="center" src="http://brycv.com/images/youtube-bsdconferences-channel.png"></a></p>

<p>Fortunately, <em>youtube-dl</em> is available in <a href="http://www.openbsd.org/cgi-bin/cvsweb/ports/www/youtube-dl/">OpenBSD Ports</a> as well as <a href="http://www.macports.org">MacPorts</a> and <a href="http://brew.sh">Homebrew</a></p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/downloading-youtube-videos-with-openbsd-or-similar/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Updated SSD Guide Now Available &rarr;]]></title>
<link href="http://brycv.com/ssd/"/>
<updated>2013-11-25T23:25:00-08:00</updated>
<id>http://brycv.com/blog/2013/updated-ssd-guide-now-available</id>

      <content type="html"><![CDATA[<p>I have updated my SSD guide with the current crop of best-in-class SSDs that I recommend coming into the holiday season. For the first time in the guide I also added two enterprise SSDs to the lineup should your needs be for SSDs in your servers or heavy use workstations.</p>

<p><a href="http://brycv.com/ssd"><img class="center" src="http://brycv.com/images/Intel-DC-S3500-SSD.jpg" width="300"></a></p>

<p>I am using the SSDs I recommend with OS X laptops in external enclosures (reviews coming soon) as well as with OpenBSD, FreeBSD, and Linux systems. All of the recommended models are excellent solutions for high performance and some excellent options for exceptional value as well.</p>

<p>On to my <a href="http://brycv.com/ssd/">SSD guide</a>.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/updated-ssd-guide-now-available/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[HP Chromebook 11 with ARM and IPS]]></title>
<link href="http://brycv.com/blog/2013/hp-chromebook-11-with-arm-and-ips/"/>
<updated>2013-10-08T12:05:00-07:00</updated>
<id>http://brycv.com/blog/2013/hp-chromebook-11-with-arm-and-ips</id>

      <content type="html"><![CDATA[<p><em>Update: The HP Chromebook 11 has been voluntarily removed from sale while HP and Google are investigating an overheating charger problem. The units still work fine but it is recommended that you use a different USB charger. The details are available in an <a href="http://h20435.www2.hp.com/t5/The-Next-Bench-Blog/Important-Update-on-the-HP-Chromebook-11/ba-p/85525">HP blog post</a>.</em></p>

<p>The <a href="http://link.brycv.com/a/B00FJXVRM8">HP Chromebook 11</a> has arrived with many similarities to <a href="http://link.brycv.com/a/B009LL9VDG">Samsung&rsquo;s ARM-based Chromebook</a>. What the HP variety adds is an IPS display and what appears to be a higher quality casing. There are some additional accent colors and a clean exterior. The full spectrum of wireless connectivity is available with 802.11a/b/g/n and Bluetooth 4.0 and Verizon 4G LTE will be available in a future version as well.<!--more--></p>

<p><a href="http://link.brycv.com/a/B00FJXVRM8"><img class="center" src="http://brycv.com/images/hp-chromebook-11-group.jpg" width="600"></a></p>

<p>The HP Chromebook 11 comes in white along with various accent colors or all black. In an interesting move, this is the first Chromebook to charge via Micro USB but at 15.75W, even more than a 4th generation iPad&rsquo;s 12W. Google is touting the ability of this Chromebook to use the same charger as your Android phone.</p>

<p><a href="http://link.brycv.com/a/B00FJXVRM8"><img class="center" src="http://brycv.com/images/hp-chromebook-11-black-white.jpg" width="600"></a></p>

<p>The CPU in this Chromebook is the Exynos 5250 GAIA Application Processor, which is either identical or very similar to what Samsung used in its ARM-based Chromebook. Also in line with Samsung, HP has provided 2GB of memory and a 16GB SSD. What&rsquo;s lacking is any sort of SD card slot and USB 3.0 ports. The latter is really pointless in a device like this but an SD card slot was very useful. All four ports (2 USB 2.0, Micro USB, and combined headphone/microphone) are on the left side. The right side is completely lacking ports.</p>

<p><a href="http://link.brycv.com/a/B00FJXVRM8"><img class="center" src="http://brycv.com/images/hp-chromebook-11-left-side.jpg" width="427"></a></p>

<p>I like the design in many ways and this might make a good candidate for running <a href="http://docs.kali.org/category/armel-armhf/">Kali Linux</a> or <a href="http://www.ubuntu.com/">Ubuntu</a> in the future if support emerges as it has for the Samsung ARM-based Chromebook. <a href="http://chromeos-cr48.blogspot.com">Chrubuntu</a> or <a href="https://github.com/dnschneid/crouton">Crouton</a> will likely be feasible before too long. <a href="https://github.com/dnschneid/crouton">Crouton</a>, in particular, is very promising and provides an easier route than a full-fledged install in place of Chrome OS or on external media. The limiting factor for external media installs on this new Chromebook is the lack of a SD card slot. USB flash drives will have to do instead. The <a href="http://link.brycv.com/a/B00812F7O8">Sandisk Cruzer Fit</a> might be an excellent option although speed may be somewhat lacking.</p>

<p>The HP Chromebook 11 will ship on October 20 and is available for <a href="http://link.brycv.com/a/B00FJXVRM8">pre-order from Amazon.com</a> for $279.99. <a href="http://www.google.com/intl/en/chrome/devices/hp-chromebook-11/">Google&rsquo;s HP Chromebook 11 site</a> also provides additional details on the device. I pre-ordered one and we&rsquo;ll see how it works out with alternatives to vanilla Chrome OS. Hopefully some day we&rsquo;ll see <a href="http://www.openbsd.org/">OpenBSD</a> support for ARM-based laptops such as this one.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/hp-chromebook-11-with-arm-and-ips/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Adjusting Constrast and White Balance for ThinkPad X1 Carbon in OpenBSD]]></title>
<link href="http://brycv.com/blog/2013/adjusting-constrast-for-thinkpad-x1-carbon-in-openbsd/"/>
<updated>2013-10-07T12:30:00-07:00</updated>
<id>http://brycv.com/blog/2013/adjusting-constrast-for-thinkpad-x1-carbon-in-openbsd</id>

      <content type="html"><![CDATA[<p>I purchased a Lenovo <a href="http://bry.vc/1b4hoYB">ThinkPad X1 Carbon</a> recently and I immediately noticed that the screen&rsquo;s contrast and white balance were not very accurate at all. This system does not have and excellent IPS screen like the <a href="http://brycv.com/blog/2012/lenovo-thinkpad-x230-for-openbsd-and-linux/">ThinkPad X230</a> but it does have a slightly higher resolution TN display at 1600x900 instead of 1366x768. I wondered how I might solve this problem on <a href="http://www.openbsd.org/">OpenBSD</a>. A few searches and I found the answer.<!--more--></p>

<p>A particular program has been created for just this problem called <a href="http://jonls.dk/redshift/">Redshift</a>. A quick look at the options in the man page and I had some good ideas but another search yielded the exact syntax I needed.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>redshift -O 6500 -g 0.6:0.6:0.6</span></code></pre></td></tr></table></div></figure>


<p>The idea is that <em>-O</em> manually sets the color temperature in <em>one shot</em> mode. The <em>-g</em> option does gamma correction. If you&rsquo;re display is out of whack, you would have to adjust these values to whatever looks correct to you. Redshift is more powerful and can adjust the color temperature based on time of day and so forth but, at least for now, I&rsquo;m only using it as a one time fix in <em>.xinitrc</em>.</p>

<p>If you&rsquo;re in a purchase quandary, I would suggest purchasing a higher quality IPS display if possible but Redshift may still be useful to you.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/adjusting-constrast-for-thinkpad-x1-carbon-in-openbsd/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Notes on OpenBSD in QEMU on OpenBSD]]></title>
<link href="http://brycv.com/blog/2013/notes-on-openbsd-in-qemu-on-openbsd/"/>
<updated>2013-10-07T12:00:00-07:00</updated>
<id>http://brycv.com/blog/2013/notes-on-openbsd-in-qemu-on-openbsd</id>

      <content type="html"><![CDATA[<p>Although performance is not its strong point, <a href="http://www.qemu.org/">QEMU</a> can be a pretty useful tool for running <a href="http://www.openbsd.org/">OpenBSD</a> instances on OpenBSD. Some years back, kqemu support allowed for much better OpenBSD performance but, unfortunately, kqemu support was removed quite some time ago. While we are waiting for <a href="http://www.bhyve.org/">bhyve</a> to support OpenBSD guests and eventually maybe OpenBSD as a host, qemu will have to do.<!--more--></p>

<p>A few days ago, I started working on setting up an OpenBSD instance in qemu to do some custom package building. I immediately ran into some issues with bridging the qemu network interface to the physical interface. The OpenBSD qemu port&rsquo;s <a href="http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/emulators/qemu/pkg/README?rev=1.10;content-type=text%2Fplain">README file</a> gives some indication of what to do but I couldn&rsquo;t seem to get it functioning while running as a user other than root. I still plan to get this working right but, for the time being, I am using a simpler method running as root for now.</p>

<p>Before we get started, I should note that qemu provides its own built-in DHCP service and networking but setting up a bridged connection yourself allows for much greater flexibility and control over the process. There is also additional functionality not available with the built-in facilities.</p>

<p>I had talked to <a href="http://twitter.com/afresh1">Andrew Fresh</a> when we were in Portland in July about <a href="https://gist.github.com/afresh1/6059415">some scripts</a> he wrote to launch <a href="http://www.nmedia.net/flashrd/">flashrd</a> instances under qemu. I encouraged him to make them available publicly and he did just that shortly thereafter. Those scripts were very helpful in this process, especially for the idea to use vether(4).</p>

<h4>Settings up the interfaces and NAT</h4>

<p>The basic concept is that we will have a virtual interface (<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=vether&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">vether(4)</a>) that has an IP address, NAT that network through my main network interface, provide DHCP addresses to the virtual interface, and then <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=bridge&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">bridge(4)</a> the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=tun&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">tun(4)</a> interface to the virtual interface.</p>

<p>If you&rsquo;re brand new to OpenBSD, I would suggest you familiarize yourself with the system conventions and configurations before getting into all of this but this is the general idea of what is needed.</p>

<p>First, I need to create a vether(4) interface. I&rsquo;m going to do this by creating a <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=hostname.if&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">hostname.if(5)</a> for this interface. I picked a private address space range for this purpose in the 192.168.0.0/16 block. The <em>/etc/hostname.vether0</em> file contains this:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>inet 192.168.54.1 255.255.255.0 NONE</span></code></pre></td></tr></table></div></figure>


<p>All of my qemu instances will be running on the 192.168.54.0/24 network which I will then NAT through my main network. I&rsquo;m using macros in my <em>/etc/pf.conf</em> file but I will leave those out for the purposes of clarity. I added the following lines to <em>/etc/pf.conf</em> on my 5.4-current laptop above the default <em>block</em> and <em>pass</em> rules:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>ext_if="iwn0"
</span><span class='line'>int_if="vether0"
</span><span class='line'>
</span><span class='line'>match out from $int_if:network to any nat-to ($ext_if:0)</span></code></pre></td></tr></table></div></figure>


<p>These additions to <em>/etc/pf.conf</em> modify the existing rules in order to match all packets from the internal virtual network that are heading to another network. The <em>$inf_if:network</em> statement refers to the network associated with <em>$int_if</em> which is replaces with <em>vether0</em> in my case. The network ends up being 192.168.54.0/24. The <em>($ext_if:0)</em> part refers to the first address (referenced by <em>:0</em>) of the <em>$ext_if</em> which happens to be the address of the <em>iwn0</em> interface. The parentheses around <em>$ext_if:0</em> tell pf to update the address if it changes because it is a dynamic address. Without the parentheses, pf would statically use the current IP address which will change in the future.</p>

<p>Running <em>pfctl -sr</em> gives the following output:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>match out inet from 192.168.54.0/24 to any nat-to (iwn0)
</span><span class='line'>block drop all
</span><span class='line'>pass all flags S/SA
</span><span class='line'>block drop in on ! lo0 proto tcp from any to any port 6000:6010</span></code></pre></td></tr></table></div></figure>


<p>The first line is the only one I added. Lines 2-4 were there by default. The macro definitions are not shown by <em>pfctl -sr</em> but are there in <em>/etc/pf.conf</em>.</p>

<p>The final part of the network interfaces is configuring <em>tun0</em> and <em>bridge0</em>. I added the following <em>/etc/hostname.tun0</em> which enables layer 2 operation via the <em>link0</em> flag:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>link0 up</span></code></pre></td></tr></table></div></figure>


<p>I added the following <em>/etc/hostname.bridge0</em>:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>add vether0 add tun0 up</span></code></pre></td></tr></table></div></figure>


<p>With this completed, restart your network interfaces with:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>sh /etc/netstart</span></code></pre></td></tr></table></div></figure>


<h4>DHCP and DNS</h4>

<p>After the <em>vether0</em> and <em>pf.conf</em> configs, the next step is configuring <em>/etc/dhcpd.conf</em>. I simply took the default <em>/etc/dhcpd.conf</em> and modified it according to what I needed:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>option  domain-name "example.com";
</span><span class='line'>option  domain-name-servers 192.168.54.1;
</span><span class='line'>
</span><span class='line'>subnet 192.168.54.0 netmask 255.255.255.0 {
</span><span class='line'>        option routers 192.168.54.1;
</span><span class='line'>
</span><span class='line'>        range 192.168.54.100 192.168.54.199;
</span><span class='line'>
</span><span class='line'>}</span></code></pre></td></tr></table></div></figure>


<p>I then added the appropriate entry to <em>/etc/rc.conf.local</em> to launch <em>dhcpd</em> at startup:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>dhcpd_flags=""</span></code></pre></td></tr></table></div></figure>


<p>After getting <em>dhpcd</em> ready to go, the next step is providing a DNS resolver. Although it is possible to use some other resolver on the network, the easiest and most error-proof option is to install <a href="http://unbound.net/">unbound</a> from ports and configure it to allow requests on the localhost addresses and 192.168.54.1. I won&rsquo;t go into the details here but this should be relatively easy once you install the unbound package or build it from ports and then modify /var/unbound/etc/unbound.conf as needed. Finally add <em>unbound</em> to the <em>pkg_scripts</em> line of <em>/etc/rc.conf.local</em>.</p>

<p>With these steps done, we can now move on to working with qemu directly.</p>

<h4>Launching a VM</h4>

<p>The first step is creating a virtual machine image using <em>qemu-img</em>.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>qemu-img -f qcow2 first-image.img 10G</span></code></pre></td></tr></table></div></figure>


<p>In this case, I created a 10GB image in qcow2 format. This is also a good time to download the latest iso image for OpenBSD from any OpenBSD mirror. I used <em>install54.iso</em> from the latest snapshot.</p>

<p>I used the following script to launch the qemu instance of OpenBSD with the intention of installing from the iso image:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>#!/bin/sh
</span><span class='line'>
</span><span class='line'>export ETHER=vether0
</span><span class='line'>export BRIDGE=bridge0
</span><span class='line'>
</span><span class='line'>qemu-system-x86_64 -m 512 -monitor stdio -vnc :0 -no-fd-bootchk \
</span><span class='line'>   -net nic,model=e1000,macaddr=52:54:00:4e:62:8a -net tap \ 
</span><span class='line'>   -hda first-image.img -cdrom install54.iso -boot d</span></code></pre></td></tr></table></div></figure>


<p>This script launches an amd64 instance of OpenBSD with 512MB of memory, a VNC server running on port 5900, no floppy, a network interface using the e1000 driver with MAC address of 52:54:00:4e:62:8a (which should be changed), the network interface is bridged using tap, the 10GB image configured as the hard drive, the iso image configured as the cdrom, and the VM will boot from <em>d</em> which is the cdrom.</p>

<p>At this point you should have <em>ssvnc</em> installed from packages or ports and be able to connect to the newly created vm using <em>vncviewer 127.0.0.1:5900</em> run from the local command line.</p>

<p>After installation, shutdown the VM by typing <em>quit</em> at the qemu prompt after you have done <em>halt -p</em> from the VM&rsquo;s command line.</p>

<p>Next, modify the script by removing the <em>-cdrom</em> and <em>-boot</em> flags:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>#!/bin/sh
</span><span class='line'>
</span><span class='line'>export ETHER=vether0
</span><span class='line'>export BRIDGE=bridge0
</span><span class='line'>
</span><span class='line'>qemu-system-x86_64 -m 512 -monitor stdio -vnc :0 -no-fd-bootchk \
</span><span class='line'>   -net nic,model=e1000,macaddr=52:54:00:4e:62:8a -net tap \ 
</span><span class='line'>   -hda first-image.img</span></code></pre></td></tr></table></div></figure>


<p>This will launch your OpenBSD instance. Access it via vncviewer as above and you are off and running. You can copy the script to make additional instances but create a new disk image and change the MAC address for each new instance.</p>

<h4>Aftermath</h4>

<p>I&rsquo;m hoping that <a href="http://www.bhyve.org/">bhyve</a> will support OpenBSD eventually. Although qemu works for now, it is very slow. I compiled dovecot and associated packages inside the qemu instance and it took hours. I was surprised at how long it actually took. Where qemu is especially useful is to test router configs and such like <a href="http://twitter.com/afresh1">Andrew Fresh</a> is doing as I mentioned above. Another idea I&rsquo;ve had is to run a qemu instance of Debian and then rsync from it to OpenBSD in order to use <a href="http://www.dropbox.com/">Dropbox</a> with OpenBSD. It would probably work fine but is a hack at best.</p>

<p>Until bhyve or other solutions are faster, I&rsquo;m going to use <a href="http://smartos.org/">SmartOS</a> in the datacenter in order to facilitate OpenBSD VMs. I have been using it for about six months in brief stints and it seems to work quite well. OpenBSD also runs just fine under VMware ESXi with local datastores but I would rather focus on open source alternatives even though I am a VMware Certified Professional. If VMware completely moves away from its Windows requirement I would be more interested and it seems things are heading that direction.</p>

<p>In particular, thanks to <a href="http://twitter.com/afresh1">Andrew Fresh</a> for his <a href="https://gist.github.com/afresh1/6059415">scripts</a> and <a href="http://twitter.com/michaeldexter">Michael Dexter</a> for keeping me up to date on <a href="http://www.bhyve.org/">bhyve</a> and its progress.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/notes-on-openbsd-in-qemu-on-openbsd/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Netflix now Working on ARM Chromebook]]></title>
<link href="http://brycv.com/blog/2013/netflix-now-working-on-arm-chromebook/"/>
<updated>2013-03-14T07:00:00-07:00</updated>
<id>http://brycv.com/blog/2013/netflix-now-working-on-arm-chromebook</id>

      <content type="html"><![CDATA[<p>In a move that I hope is a sign of things to come, Netflix has added a special HTML5 interface to its streaming video survice to support <a href="http://bry.vc/VQUelC">Samsung&rsquo;s ARM-based Chromebook</a> (per <a href="http://www.engadget.com/2013/03/11/samsung-chromebook-netflix-html5-streaming/">Engadget</a>). I hope this is the writing on the wall for Netflix&#8217; use of Silverlight but time will tell. This move could also open the door to being able to use Netflix on various Linux flavors and other operating systems like <a href="http://www.freebsd.org/">FreeBSD</a> or <a href="http://www.openbsd.org/">OpenBSD</a> using <a href="http://www.chromium.org">Chromium</a>.<!--more--></p>

<p><a href="http://bry.vc/VQUelC"><img class="center" src="http://brycv.com/images/chromebook-arm-big.jpg" width="500"></a></p>

<p>I have always liked ARM devices due to their low power usage and, <a href="http://brycv.com/blog/2013/chromebook-pixel-an-odd-play/">as I previously mentioned</a>, I am very interested in running Ubuntu 13.04 on the ARM Chromebook once it is released on April 25. This new development makes the <a href="http://bry.vc/VQUelC">ARM Chromebook</a> far more interesting for home use. Netflix is the best source of documentaries we have found and being able to play them on a compact device that is relatively inexpensive is a great option.</p>

<p>As another benefit, our daughter enjoys playing some educational web-based games that don&rsquo;t work on an iPad or similar and the <a href="http://bry.vc/VQUelC">ARM Chromebook</a> might just be a good solution for this as well. Using Mommy&rsquo;s MacBook Air while Mommy needs to work doesn&rsquo;t really work out.</p>

<p>It seems that the $249 <a href="http://bry.vc/VQUelC">ARM Chromebook</a> is getting more and more potentially useful.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/netflix-now-working-on-arm-chromebook/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA["Why don't MacBooks come with cellular networking?" &rarr;]]></title>
<link href="http://www.marco.org/2013/02/26/why-no-4g-macbooks"/>
<updated>2013-03-04T20:00:00-08:00</updated>
<id>http://brycv.com/blog/2013/why-dont-macbooks-come-with-cellular-networking</id>

      <content type="html"><![CDATA[<p>Marco Arment made some <a href="http://www.marco.org/2013/02/26/why-no-4g-macbooks">excellent comments</a> as to why Apple is not including any sort of cellular data connectivity in any of the MacBook lines. This is one of the only major things lacking from Apple&rsquo;s laptop lines.</p>

<blockquote><p>&ldquo;With LTE, you can burn through a 5 GB data cap in an hour if you’re downloading big video files, and it would be easy to burn through the cap in just a few days if you’re streaming HD video — which, in 2013, is commonplace.&rdquo;</p></blockquote>

<p>Back in January, I had some major problems with my Verizon FiOS business connection where only the Verizon-provided ActionTec router would work. The rest of the details are for another post but I ended up using my Verizon 4G LTE USB data card as a stopgap until Verizon could do a truck roll. I only had the 4G LTE USB data card and router as our connection for about 36 hours and many of those hours were while we were sleeping. Using YouTube and a little bit of Netflix from our Apple TV units during that time we easily burned through 8GB of data. I had to upgrade our Share Everything plan with another 2GB so we didn&rsquo;t go over that month.</p>

<p>I have been using 3G EV-DO since around 2005 just like Marco. The advent of 4G LTE has really transformed the way I use cellular data. I would absolutely love to have it built-in to a MacBook of any sort. As it is, I currently either have some sort of router in the car, occasionally use a MiFi device, or tether (actually using Personal Hotspot via WiFi for the most part) to one of our 4G LTE iPads. Marco also makes some good suggestions about what could be done.</p>

<blockquote><p>&ldquo;To start, Apple could just put cellular-connection detection and responsible-usage logic into iTunes and Software Update. That would be sufficient to launch with new 4G MacBook models at WWDC, then they could have a session on the new API and start enforcing responsible practices in the Mac App Store. Along with maybe working something out with Netflix, they’ll have addressed the biggest accidental bandwidth hogs that most people will face.&rdquo;</p></blockquote>

<p>It would be very disturbing to have the latest HD TV show episode, which easily tops 1.5GB, download in the background. Unlike with 3G, you might not even notice because 4G LTE is so fast. As Marco points out, it would also be essential to disable automatic software update downloading. As a technical professional, I would be willing to deal with these issues manually but most consumers would not want to be bothered and would not have any idea there would even be an issue until they started receiving data usage alerts or, even worse, a massive cell phone bill.</p>

<p>Built-in cellular connectivity in laptops is also mostly aimed at business users except in the case of the various <a href="http://bry.vc/VQUelC">Chromebook models</a>. The Chromebook is unique in that everything is web-based and not very much data is transferred except for streaming media. Apple may not be including cellular data because of the focus on consumers rather than business users. In any case, I think Apple needs to create a new API for OS X as Marco suggested sooner rather than later. Apple can obviously implement 4G LTE cellular data just fine in the iPhone and iPad lines so I hope the MacBook lines are the next frontier. The next generation MacBook Air seems like the perfect candidate to me.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/why-dont-macbooks-come-with-cellular-networking/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Nexus 7 Becomes Interesting with Ubuntu Tablet &rarr;]]></title>
<link href="https://wiki.ubuntu.com/Nexus7"/>
<updated>2013-03-04T18:00:00-08:00</updated>
<id>http://brycv.com/blog/2013/nexus-7-becomes-interesting-with-ubuntu-tablet</id>

      <content type="html"><![CDATA[<p><a href="http://bry.vc/106NlOf"><img class="right" src="http://brycv.com/images/Nexus-7-200x200.jpg"></a></p>

<p>Due to my use of iOS devices like the iPhone, iPad, and iPad mini, I have not been interested in any Android devices. None of the available devices have had any advantages over whatever iOS devices I have been using at the time. That appears to be changing but it has nothing to do with Andriod. I still have no interest in Android at all but I do have an interest running Ubuntu on a tablet. As was announced a couple of weeks back, Ubuntu is pushing into the <a href="http://www.ubuntu.com/devices/phone">phone</a> and <a href="http://www.ubuntu.com/devices/tablet/">tablet</a> markets.</p>

<p>A couple of days ago I discovered the <a href="https://wiki.ubuntu.com/Nexus7">Ubuntu installation instructions</a> for the <a href="http://bry.vc/106NlOf">Nexus 7 tablet</a>. I&rsquo;m interested in any feedback from someone who has tried this process. I will probably wait until after Ubuntu 13.04 is released on April 25, 2013 but running Ubuntu on a Nexus 7 might just be worth it.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/nexus-7-becomes-interesting-with-ubuntu-tablet/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[elementary OS Looks Promising]]></title>
<link href="http://brycv.com/blog/2013/elementary-os-looks-promising/"/>
<updated>2013-02-21T18:07:00-08:00</updated>
<id>http://brycv.com/blog/2013/elementary-os-looks-promising</id>

      <content type="html"><![CDATA[<p>Last night, I was investigating some alternative operating systems to the <a href="http://brycv.com/blog/2012/lenovo-thinkpad-x230-for-openbsd-and-linux/">instability</a> I have experienced with Ubuntu 12.10 on my Lenovo ThinkPad X230. Because of virtualization software, I need some form of Linux that works well with Intel HD 4000 graphics and is pretty stable. I installed <a href="http://linuxmint.com/">Linux Mint 14 Cinnamon</a> two days ago on my X230 and I am somewhat impressed. On a forum post, I discovered something even more interesting.<!--more--></p>

<p>Like Linux Mint 14, quite a few other distros are based on a <a href="http://www.ubuntu.com/">Ubuntu</a> core. One I had never heard of before is <a href="http://elementaryos.org/">elementary OS</a>.</p>

<p><a href="http://elementaryos.org/"><img class="center" src="http://brycv.com/images/elementary-os-pantheon.png"></a></p>

<p>The above screenshot of a Pantheon desktop sure looks like what I like in Apple&rsquo;s <a href="http://www.apple.com/osx/">OS X</a>. The dock at the bottom and menubar at the top is great. I&rsquo;m tired of the Windows-modeled taskbar at the bottom that <a href="http://www.kde.org/">KDE</a>, <a href="http://cinnamon.linuxmint.com/">Cinnamon</a>, and most other desktop environments employ. I also just discovered that version 4.10 of <a href="http://www.xfce.org/">Xfce</a> appears to have some similarities to OS X as well.</p>

<p>I am put off somewhat by elementary OS Luna&rsquo;s status as Beta 1. There still appears to be some work to do to get to a stable release but once it does, elementary OS looks like it might be a very attractive option. If elementary OS interests you, now is a great time to <a href="http://elementaryos.org/get-involved">get involved</a>.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/elementary-os-looks-promising/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Chromebook Pixel an Odd Play]]></title>
<link href="http://brycv.com/blog/2013/chromebook-pixel-an-odd-play/"/>
<updated>2013-02-21T17:35:00-08:00</updated>
<id>http://brycv.com/blog/2013/chromebook-pixel-an-odd-play</id>

      <content type="html"><![CDATA[<p>I am rather surprised by Google&rsquo;s interesting move into the high-end laptop space with its new <a href="https://play.google.com/store/devices/details?id=chromebook_pixel_wifi">Chromebook Pixel</a>. The specs resemble the entry level <a href="http://bry.vc/YK6Upq">13-inch Retina MacBook Pro</a> in some respects but the Chromebook Pixel has a touchscreen, slower processor, less storage, less memory, and the option of built-in LTE. I&rsquo;m impressed with the design and would buy one immediately if I knew I could run <a href="http://www.openbsd.org/">OpenBSD</a> or at least <a href="http://www.ubuntu.com/">Ubuntu</a> on it. Why is Google moving into this space?<!--more--></p>

<p><a href="https://play.google.com/store/devices/details?id=chromebook_pixel_wifi"><img class="center" src="http://brycv.com/images/chromebook-pixel.jpg"></a></p>

<p>Google is quite literally targeting business users with the Chromebook Pixel. Most consumers will not spend $1299 for a WiFi Chromebook or $1449 for a Chromebook with LTE. <a href="http://www.google.com/intl/en/enterprise/apps/business/">Google Apps for Business</a> is now used by many, many businesses and much of what typical computer users do is covered by a Chromebook and Google&rsquo;s array of services. Another advantage of the Chromebook Pixel is that companies do not need to worry about lots of software upgrades and system management as would typically be true of a regular PC system.</p>

<p>The hard sell is for power users. I would never buy a Chromebook Pixel for $1299 just to run Google web apps. The latest <a href="http://bry.vc/VQUelC">ARM-based Samsung Chromebook</a>, on the other hand, is a much easier sell for $249. I can definitely understand buying one for the kids or just to do some browsing and writing around the house or out and about. In my opinion, the true interesting use case of the ARM Chromebook will be <a href="http://www.phoronix.com/scan.php?page=article&amp;item=samsung_chrome_a15&amp;num=1">running Ubuntu 13.04 for ARM</a> when it comes out in April.</p>

<p>Hopefully installing alternate operating systems on the Chromebook Pixel will not be too difficult since it uses a standard Intel Core i5 instead of a different architecture like the ARM Chromebook. I&rsquo;m glad to see Google making such an interesting Chromebook in the Chromebook Pixel. Perhaps other companies will follow suit with excellent designs that might pose options if you want to run open source operating systems with design similar to Apple&rsquo;s excellent designs.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/chromebook-pixel-an-odd-play/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[BSDCan 2013 Coming up in May &rarr;]]></title>
<link href="http://www.bsdcan.org/2013/"/>
<updated>2013-02-21T17:00:00-08:00</updated>
<id>http://brycv.com/blog/2013/bsdcan-2013-coming-up-in-may</id>

      <content type="html"><![CDATA[<p>If you haven&rsquo;t, like me, been to a BSDCan Conference before, this might be the year to go. The schedule looks great with lots of excellent presentations. This is also the 10th annual conference and the schedule looks excellent. All the details are available from the <a href="http://www.bsdcan.org/2013/">BSDCan web site</a>. I&rsquo;m not sure if we will be there yet but we shall see how the next few months pan out.</p>

<p><a href="http://www.bsdcan.org/2013/"><img class="center" src="http://brycv.com/images/bsdcan-300x250.png"></a></p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/bsdcan-2013-coming-up-in-may/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[New Things in 2013]]></title>
<link href="http://brycv.com/blog/2013/new-things-in-2013/"/>
<updated>2013-01-01T20:52:00-08:00</updated>
<id>http://brycv.com/blog/2013/new-things-in-2013</id>

      <content type="html"><![CDATA[<p>Today marks the start of 2013. This year will contain an amazing number of changes to our lives. As I mentioned a few days ago, we will give more details as to what the <em>major change</em> will be in the next several months as everything falls into place. As far as technology goes, the coming changes are requiring me to be more mobile and less tied to a desk so more articles are coming about working in mobile settings and without the typical peripherals and advantages of a desktop computer.<!--more--></p>

<p>There will also be more articles about photography, videography, camera bags (like <a href="http://www.thinktankphoto.com/">Think Tank Photo gear</a>), and related media technology. Storage technologies have been getting better. More articles are coming about SSDs, moving away from hard drives, and offsite backup.</p>

<p>A few months back I became a <a href="http://www.vmware.com/certification/">VMware Certified Professional on vSphere 5 &ndash; Datacenter Virtualization</a>, better known as a VCP5-DV. I have been working on some datacenter solutions that I will be writing about shortly. Virtualization also plays a big part in allowing us to embark on our major new project.</p>

<p>Check back for more exciting articles in the pipeline and the launch of a new web site related to the <em>major change</em>. I will also be following up on some questions I have received over the last few months. I think 2013 is shaping up to be an unforgettable year!</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2013/new-things-in-2013/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Thoughts about the iPad mini for Photographers &rarr;]]></title>
<link href="http://ipadforphotographers.com/2012/11/12/thoughts-about-the-ipad-mini-for-photographers/"/>
<updated>2012-12-27T17:33:00-08:00</updated>
<id>http://brycv.com/blog/2012/thoughts-about-the-ipad-mini-for-photographers</id>

      <content type="html"><![CDATA[<p>Jeff Carlson&rsquo;s <a href="http://ipadforphotographers.com/2012/11/12/thoughts-about-the-ipad-mini-for-photographers/"><em>Thoughts about the iPad mini for Photographers</em></a> points out some great points about how the iPad mini is an excellent tool for photographers just as the iPad with Retina Display is. The lack of a Retina Display is helped by the smaller physical pixels in the iPad mini&rsquo;s 1024x768 resolution display as opposed to the iPad 2 with its larger 1024x768 resolution display.</p>

<p>Which to buy? It&rsquo;s a hard choice. In every way but the display, I would prefer the iPad mini. I expect that in the next revision or two, the iPad mini will also get a Retina Display. Once that happens it will be no contest and I would definitely recommend the iPad mini for nearly all scenarios. For my uses, the iPad mini will be my choice. I am currently using a 3rd generation 32GB iPad with Verizon 4G LTE. This will shortly be replaced by a 64GB iPad mini with Verizon LTE.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/thoughts-about-the-ipad-mini-for-photographers/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Lenovo ThinkPad X230 for OpenBSD and Linux]]></title>
<link href="http://brycv.com/blog/2012/lenovo-thinkpad-x230-for-openbsd-and-linux/"/>
<updated>2012-12-27T17:00:00-08:00</updated>
<id>http://brycv.com/blog/2012/lenovo-thinkpad-x230-for-openbsd-and-linux</id>

      <content type="html"><![CDATA[<p>Back at the beginning of September, I ordered a Lenovo ThinkPad X230. I have been using mostly desktop systems but decided to get back to using laptops more due to some changes coming next year. I chose the X230 for a few different reasons. I also picked exactly the options I wanted since this laptop will be used for OpenBSD and Linux and will not see Windows at all.<!--more--></p>

<h4>Configuration</h4>

<p>I <a href="http://bry.vc/YRGqHy">configured the X230</a> with the following options direct from Lenovo:</p>

<ul>
<li>Intel Core i7-3520M (2.9GHz with 4MB of Cache, up to 3.6GHz Turbo, HD 4000 Graphics)</li>
<li>12.5-inch Premium IPS HD LED Screen (1366x768) with 3x3 Antenna</li>
<li>4GB of 1600MHz DDR3 (the minimum)</li>
<li>Backlit Keyboard</li>
<li>UltraNav without FingerPrint Reader</li>
<li>320GB Hard Drive, 7200RPM</li>
<li>9 Cell ThinkPad Battery X44++</li>
<li>Bluetooth 4.0</li>
<li>Intel Centrino Ultimate-N 6300 AGN Wireless</li>
</ul>


<p>As is obvious from my system choices, 4GB of memory will not be enough but astronomical memory upgrade prices from Lenovo make third party memory the only reasonable choice. The hard drive is also likewise useless to me and was never even powered on before its removal from the X230. Due to the slim size of the X230 I also elected not to have a webcam built into the display bezel and instead chose the 3x3 Wireless Antenna option which allowed me to choose the Intel 6300 AGN Wireless card. I have other systems to use for video conferencing and I would rather have better wireless performance.</p>

<h4>Memory</h4>

<p>I ordered the <a href="http://bry.vc/S2Nld5">Corsair Vengeance 1600MHz Laptop 16GB (2 x 8GB) memory kit</a> which maxed out the memory capacity of the X230. This makes more sense for my virtualization projects. I just make it a practice to max out the memory on whatever system I purchase these days.</p>

<p><a href="http://bry.vc/S2Nld5"><img class="center" src="http://brycv.com/images/DQ77KB/DQ77KB_System_18.jpg"></a></p>

<h4>SSD Storage</h4>

<p>After the memory, the next major upgrade is storage. Since I had already removed the 320GB drive, I needed to put two SSDs into the system. When I removed the 320GB drive I discovered it was a Seagate Momentus Thin drive. This means it has a 7mm z-height. The majority of 2.5-inch drives have a z-height of 9.5mm. Some older, high-capacity drives had a z-height of 12.5mm and a few oddball large storage 2.5-inch drives have a z-height of 15mm.</p>

<p>The 7mm z-height posed an immediate problem. I was planning to install my 512GB Crucial M4 or my 240GB Intel 520 SSD in the X230 but neither would fit properly. The 240GB Intel 520 SSD could be made to fit by removing the plastic bumper but this also required removing the screws which hold the SSD&rsquo;s cover on. Within the X230&rsquo;s hard drive bracket this posed no issue but I wasn&rsquo;t really comfortable with that solution. The Crucial M4 SSDs I had were all 9.5mm. At this point I discovered that there are 7mm versions of the Crucial M4 SSDs in the form of the SSD1 models. The 512GB I had was model CT512M4SSD2. The very similar but 7mm z-height version is model CT512M4SSD1.</p>

<p>At this point, I decided to sell both my Intel 520 SSD and the 512GB Crucial M4. I started researching the best large 7mm SSDs. I came to the conclusion that the Plextor M5 Pro would be a superb option. Plextor has done a great job with their M3 Pro series of SSDs and the M5 Pro would be even better.</p>

<p>I ended up ordering the <a href="http://bry.vc/Rdj2km">PX-512M5P</a> SSD which is a 512GB 7mm z-height SSD. I&rsquo;ll have some followup on this SSD in a future article but so far I think Plextor has done a fantastic job with the M5 Pro series.</p>

<p><a href="http://bry.vc/Rdj2km"><img class="center" src="http://brycv.com/images/Plextor-M5P-512GB-500.jpg"></a></p>

<p>I mentioned that I was going to install two SSDs rather than just one. Very few slim laptops support two SSDs but the X230 has the advantage of a Mini-PCIe slot that also supports mSATA SSDs. This slot is normally intended for 3G/4G mobile broadband cards such as the Gobi 3000 or Gobi 4000 cards offered by Lenovo. Since I am not running Windows, the usefulness of such a card would be diminished. I already have several mobile broadband routers from CradlePoint and a MiFi unit as well.</p>

<p>Since the mSATA/mPCIe slot is unused, I decided it would be a perfect place to install a Crucial M4 mSATA SSD. The largest available size is the 256GB size which is model number <a href="http://bry.vc/YCk5O5">CT256M4SSD3</a>. I wish a 512GB version were available but perhaps one will come as flash chips shrink.</p>

<p><a href="http://bry.vc/YCk5O5"><img class="center" src="http://brycv.com/images/Crucial-M4-mSATA-300.jpg"></a></p>

<h4>Operating Systems</h4>

<p>I have never been a fan of multi-boot installations on one storage device. The risks of corrupting one or both installations is very high as upgrades are done. On systems where I have been using multiple operating systems, I always dedicate a storage device to each operating system. The ability to install a 2.5-inch SSD and an mSATA SSD in the X230 allows me to do the same thing with this system.</p>

<p>I immediately installed OpenBSD on the 256GB Crucial M4 mSATA SSD. As I&rsquo;ve noted before, OpenBSD is my favorite open source operating system and the operating system I would use nearly full time if I were able to.</p>

<p>Because of my virtualization work, I need to use an operating system that can run VMware Workstation 9. This means one of the Linux distributions for now. (I wish VMware would support FreeBSD again as they did in the past.) I initially installed <a href="http://www.ubuntu.com/">Ubuntu Desktop</a> 12.04 LTS which seemed to work all right at this start. Within a few days I started running into problems with system freezes due to the 3.2 kernel not having very mature support for Intel HD 4000 Graphics. This forced me to move to Ubuntu Desktop 12.10 Beta which brought its own sets of problems including an incompatibility with the 3.5 kernel and VMware Workstation 9. This has since been corrected in <a href="http://bry.vc/T00xeT">VMware Workstation 9.0.1</a>.</p>

<p>As is typically expected with a beta, I also experienced many crashes of various programs. After the final release of Ubuntu Desktop 12.10, I erased the SSD and reinstalled. Unfortunately, no matter what I did, I still experienced crashes in various elements of the Ubuntu install. Most were just annoying but I got tired of the dialog boxes popping up indicating a crash had happened. I also found that system settings did not stick across reboots and the init scripts for VMware Workstation stopped the login screen from loading unless I disabled the VMware scripts and started them manually after login.</p>

<p>A few weeks ago I decided enough was enough. I have used <a href="http://www.gentoo.org/">Gentoo Linux</a> in the past but wasn&rsquo;t sure I wanted to sign up for that many hours of compiling. I also didn&rsquo;t want to put in the time to figure out exactly what optimized set of USE flags I needed. I had briefly installed <a href="http://www.archlinux.org/">Arch Linux</a> in a virtual machine but had heard it offered many of the advantages of Gentoo but without quite as much work.</p>

<p>I went ahead and installed Arch Linux with the December install media. This installed kernel 3.6.9 to begin with and has now been upgraded to 3.6.10. One of my favorite parts of OpenBSD is using the cwm window manager and I can do the same with Arch by <a href="https://aur.archlinux.org/packages/cwm-git/">installing cwm from the AUR</a>.</p>

<p>My OpenBSD and Arch environments are now nearly identical for desktop tasks. My shortcuts are the same, my applications are the same, and everything looks almost identical. My typical environment includes running multiple xterms with <a href="http://www.vim.org/">vim</a>, <a href="http://tmux.sourceforge.net/">tmux</a>, and <a href="http://www.mutt.org/">mutt</a>. <a href="http://www.chromium.org/Home">Chromium</a> is running in my second workspace and then additional applications in my third and fourth workspaces. <a href="http://bry.vc/T00xeT">VMware Workstation 9</a> is running in my third workspace with my OpenBSD install on the mSATA SSD running as a VM.</p>

<p>I am actually writing this article from a terminal session in my OpenBSD install that I accessed via SSH from my Arch Linux install. There are a few things to get used to with Arch like systemd but I&rsquo;m pretty happy with my choice. As I use it more I will get more familiar with its quirks.</p>

<p>I am actually pretty disappointed in Ubuntu. I thought Ubuntu might be a viable alternative to OS X on the desktop but, at least in my case, it is so unstable that I could never depend on it for my work. Perhaps it is because the X230 is using the latest Ivy Bridge integrated graphics rather than a discrete graphics card or an older integrated graphics chipset but, whatever the issue, the constant crashes are a show stopper for me.</p>

<p>Arch, on the other hand, has not crashed in any way since I installed it. Battery life is superb since I&rsquo;m running a very low resource window manager rather than a complete desktop environment and still everything works great for my needs. No, I don&rsquo;t have a fancy file manager to drag and drop files in but I don&rsquo;t need it. The tried and true <em>mv</em> command works just fine for me.</p>

<p>I should note that it is possible to configure an Arch Linux system with a full desktop environment similar to what Ubuntu uses but I have no interest in this configuration since I prefer cwm.</p>

<h4>Conclusion</h4>

<p>In the end, the <a href="http://bry.vc/YRGqHy">ThinkPad X230</a> is a superb system that I am very happy with. Running both <a href="http://www.openbsd.org/">OpenBSD</a> and <a href="http://www.archlinux.org/">Arch Linux</a> has turned out to be a great combination. The X230 will not supplant my <a href="http://www.apple.com/osx/">OS X</a> systems for media and other related tasks but for system administration and writing, the X230 setup works perfectly. <a href="http://bry.vc/T00xeT">VMware Workstation 9.0.1</a> also works perfectly and allows me to run a variety of other environments without fully committing to the operating system by directly installing it on a storage device. I am especially happy that I can use the same OpenBSD install on the mSATA SSD natively and also through VMware Workstation. I highly recommend the <a href="http://bry.vc/YRGqHy">Lenovo ThinkPad X230</a>.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/lenovo-thinkpad-x230-for-openbsd-and-linux/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Merry Christmas and Exciting New Plans]]></title>
<link href="http://brycv.com/blog/2012/merry-christmas-and-exciting-new-plans/"/>
<updated>2012-12-25T21:00:00-08:00</updated>
<id>http://brycv.com/blog/2012/merry-christmas-and-exciting-new-plans</id>

      <content type="html"><![CDATA[<p>Today marks the first Christmas for our fourth and youngest child. I remember each Christmas since my wife and I were married a few days short of five years ago. I&rsquo;m in a different place in my life as I appreciate the quiet time with our kids more than I have in the past. Each year is precious. They grow up so quickly.</p>

<p>I want to wish everyone a Merry Christmas. I hope that all of you have been able to focus on family, friends, and God, the source of all our blessings. In the next few days as 2012 winds to a close, remember the things that have been most important to you over this year and each year before it. Cherish the most important things in life.<!--more--></p>

<p>We have some amazing new plans for 2013 that we will reveal as the time gets closer. Look for updates over the next three months as everything falls into place. I will continue writing more articles as well. Some personal events in the last few months have kept me from writing very often but that will be changing as we go into 2013.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/merry-christmas-and-exciting-new-plans/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Build and Analyze Podcast Ended &rarr;]]></title>
<link href="http://www.marco.org/2012/11/18/build-analyze-ending"/>
<updated>2012-12-23T11:40:00-08:00</updated>
<id>http://brycv.com/blog/2012/build-and-analyze-podcast-ended</id>

      <content type="html"><![CDATA[<p>Altough this is old news now, <a href="http://5by5.tv/buildanalyze">Build and Analyze</a>, the excellent iOS and mobile development podcast with <a href="http://alpha.app.net/marco">Marco Arment</a> and <a href="http://alpha.app.net/dan">Dan Benjamin</a>, ended on December 17. I&rsquo;m disappointed it ended for several reasons but especially because the podcast gave some insight into iOS development from a successful developer&rsquo;s perspective. Marco&rsquo;s <a href="http://www.instapaper.com/">Instapaper</a> app and service has been a favorite of mine for several years now. I use it daily to save articles and information to read later.</p>

<p>I&rsquo;m happy that Marco is still planning to be involved in podcasting as he stated in his <a href="http://www.marco.org/2012/11/18/build-analyze-ending">November 18th post</a>:</p>

<blockquote><p>After Build and Analyze ends, I’d like to take a few weeks off for the holidays, be a guest on other shows, and then experiment with new shows, topics, and formats to try to figure out what I want to do next in the world of podcasting.</p></blockquote>

<p>I&rsquo;m looking forward to what&rsquo;s next in the new year.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/build-and-analyze-podcast-ended/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[Encryped Root Filesystem using softraid(4) on OpenBSD with an SLC SSD]]></title>
<link href="http://brycv.com/blog/2012/encrypted-root-filesystem-using-softraid-4-on-openbsd-with-an-slc-ssd/"/>
<updated>2012-09-17T10:00:00-07:00</updated>
<id>http://brycv.com/blog/2012/encrypted-root-filesystem-using-softraid-4-on-openbsd-with-an-slc-ssd</id>

      <content type="html"><![CDATA[<p>On Monday, my <a href="http://bry.vc/SsyN1A">ThinkPad X230</a> arrived. One of my goals for the system is to run <a href="http://www.openbsd.org/">OpenBSD</a> with an encrypted root filesystem. Fortunately, the support exists in <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> but it wasn&rsquo;t immediately clear how to accomplish this and allow the system to boot properly. Through a bit of trial and error, I figured it out and it works very well.<!--more--></p>

<p>I have used OpenBSD for almost 15 years now and have always enjoyed its simplicity, security, and robust feature set. I have also been a Mac user for even longer. Due to my work, I can&rsquo;t switch to OpenBSD entirely on the desktop but I can use it for much of what I do.</p>

<p>I came across a few different articles on the subject of encrypted <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> for the root filesystem but all seemed to cover aspects that didn&rsquo;t entirely fit my goals. One <a href="http://b.rontosaur.us/2012/04/10/howto-openbsd-disk-encryption/">softraid article</a> has much of the information needed but does not encrypt the entire system, only one filesystem.</p>

<p>In my own personal, non-server systems, I rarely separate out all of the different directores into their own filesystems like <em>/var</em>, <em>/usr</em>, <em>/home</em>, etc. On my <a href="http://bry.vc/SsyN1A">ThinkPad X230</a>, this is further compounded by the fact that I am using a relatively small SLC SSD which means I really don&rsquo;t want to limit my options with unnecessary filesystem complexity.</p>

<p>My goal is simple. I want the entire root filesystem which encompasses everything on this system to be encrypted with <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a>. I will have a very small swap partition on the SSD since swap is always encrypted in OpenBSD anyway.</p>

<p><em><strong>Warning: I should also note that the process of creating an encrypted <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> partition on your drive will destroy whatever data you have on there already so make sure you backup everything before starting this process in a way that you are prepared to restore from. Even better, buy a new SSD and start from scratch.</strong></em></p>

<h4>Choosing the SSD</h4>

<p>In a future article, I will cover what configuration of <a href="http://bry.vc/SsyN1A">ThinkPad X230</a> I purchased but for now I will just mention storage. Rather than pick the ridiculously overpriced storage available direct from Lenovo for the X230, I simply purchased the system with the cheapest storage available which was a 320GB 7200RPM 2.5-inch laptop drive. It wasn&rsquo;t spelled out clearly during the configuration stage but this is a 7mm 2.5-inch drive, not the typical 9.5mm 2.5-inch hard drive form factor that we have become accustomed to for laptops. This doesn&rsquo;t bother me at all since HGST and Seagate both make plenty of 7mm options now and SSDs are also readily available in the 7mm form factor.</p>

<p>The particular drive my X230 shipped with is a Seagate Momentus Thin 320GB 7200RPM 2.5-inch drive. As I have done with all my non-Apple system for a number of years, I had no intention of using the original drive at all and so without even booting up the system, I removed the 320GB drive and set about installing another storage device. As I&rsquo;ve covered extensively in past <a href="http://brycv.com/blog/categories/ssd/">articles on SSDs</a>, I use SSDs exclusively for my main systems and only use actual hard drives for bulk media storage, backups, and server arrays.</p>

<h4>SandForce is Out</h4>

<p>When choosing an SSD for software encryption, a number of parameters change in how you should pick the best SSD for your system. First off, any SSD that uses a controller that does compression in order to achieve its performance is out of the question. This is because any software encryption solution causes the data written to disk to be essentially random in nature and completely unable to take advantage of any compression.</p>

<p>The major SSDs on the market using compression are using the LSI SandForce line of controllers. The list includes many of the popular SSDs and one of my favorites that I highly recommend, the <a href="http://bry.vc/N1yJZD">Intel 520 SSD series</a>. While I still use and recommend the Intel 520 SSD series as my laptop, desktop and workstation top choice, they are a poor choice for software encryption.</p>

<h4>mSATA and 7mm 2.5-inch SSDs</h4>

<p>There are a number of other good choices on the market now but one particular consideration stood out in my mind for this system. The <a href="http://bry.vc/SsyN1A">ThinkPad X230</a> features a single 7mm 2.5-inch hard drive or SSD bay but also has a mini PCIe slot that also accepts mSATA SSDs. In some configurations, the mini PCIe slot is taken up by a 3G or 4G WWAN card such as the Gobi 3000 or Gobi 4000. For this system I elected against a built-in card for now until I have some time to test OpenBSD 4G LTE support.</p>

<p>My plan for the X230 has been to have two different SSDs installed, one in the 2.5-inch bay and another in the mSATA slot. One of the two would house an Arch, Gentoo, or Ubuntu install and the other SSD would contain my OpenBSD install. The 7mm restriction changed my plans somewhat and so far I am only using OpenBSD on my X230.</p>

<p>Since software encryption can be even more write-intensive than typical SSD use and cannot take advantage of compression to minimize write amplification I decided to look for an SLC SSD. The benefits of SLC over MLC flash have been extensively covered by many articles but for the sake of simplicity the major benefits of SLC are exponentially higher write endurance, lower power consumption, and increased speed in similar configurations. The final benefit has been reduced by more and more advanced controller configurations that have allowed MLC to meet or exceed the typical performance of SLC-based SSDs.</p>

<p>I started looking around at my mSATA SSD options and SLC options in general and only one contender emerged as my best choice. Intel has consistently made excellent and very stable SSDs since the beginning of readily available SSDs in the retail market. I have been extremely happy with the Intel 520 SSD series so it was only natural to start looking at the <a href="http://bry.vc/Ue9wKh">Intel 313 SSD series</a>.</p>

<h4>Intel 313 SSD Series</h4>

<p>The 313 series is the successor to the 311 series and is designed as a cache SSD for the Intel Rapid Start Technology present in some Sandy Bridge and Ivy Bridge motherboard chipsets. As such, the 313 series uses SLC flash memory since any type of cache drive will see extensive writes. As expected, the 313 series offers relatively small capacities. Only two Intel 313 SSD capacities are available. The first is a 20GB model and the second is a 24GB model. Both capacities are available in both a 7mm 2.5-inch and an mSATA form factor.</p>

<p>This makes for a total of four different configurations available in the Intel 313 SSD series. Since I would prefer to have as much capacity as possible while still using SLC flash memory, I elected to purchase the <a href="http://bry.vc/Ue9CkT">24GB mSATA model</a> which, while not particularly large, is quite adequate for my OpenBSD use.</p>

<p><a href="http://bry.vc/Ue9CkT"><img class="center" src="http://brycv.com/images/Intel-313-mSATA-SSD.jpg"></a></p>

<p>Installing any mSATA SSD in the X230 is a challenge but proved to be quite interesting and enjoyable. I will not cover the details in this article but I am glad to have it installed and will likely not touch it again. One major caveat is that nearly all mSATA slots are SATA 3Gb/s and not 6Gb/s. This means that the Intel 313 SSD&rsquo;s limitation of SATA 3Gb/s is really not a limitation at all.</p>

<h4>The softraid(4) Install</h4>

<p>In order to do your <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> crypto install, the first step is to boot into the OpenBSD installer with bsd.rd and select the <em>Shell</em> option. Once in the shell, you need to create the softraid volume but first you need create some additional devices. I should make note that all of this is on <a href="http://www.openbsd.org/amd64.html">OpenBSD/amd64</a> 5.2-current. In the shell, run the following commands assuming your SSD shows up as <em>sd0</em>:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># cd /dev
</span><span class='line'># sh MAKEDEV sd1
</span><span class='line'># sh MAKEDEV sd2</span></code></pre></td></tr></table></div></figure>


<p>Now that you have some additional <em>sd</em> devices, it is time to create partition your SSD for maximum efficiency. In order to boot from any softraid(4) partition other than a RAID 1 on OpenBSD/amd64 5.2 or later, you need a small <em>a</em> partition to hold your kernels. Here are the needed steps to prepare your SSD.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># fdisk -iy sd0</span></code></pre></td></tr></table></div></figure>


<p>This command initializes your MBR with an OpenBSD primary partition in preparation for <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">disklabel(8)</a>. The next step allows you to create the needed partitions for OpenBSD.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># disklabel -E sd0</span></code></pre></td></tr></table></div></figure>


<p>At this point using the built-in editor for <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">disklabel(8)</a>, you should be able to add several partitions. The first, <em>a</em>, should be large enough to hold the three kernels typically used for any system, <em>bsd</em>, <em>bsd.mp</em>, and <em>bsd.rd</em>. I use <em>64M</em> for the size of the a partition which ended up being rounded to about 70MB. I added a swap partition of about 32MB and then dedicated the rest of the SSD to the <em>RAID</em> parition. Here are the partitions for my SSD as viewed from <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">disklabel(8)</a>:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>#                size           offset  fstype [fsize bsize  cpg]
</span><span class='line'>  a:           144512               64  4.2BSD   2048 16384    1 
</span><span class='line'>  b:            64257           144576    swap                   # none
</span><span class='line'>  c:         46905264                0  unused                   
</span><span class='line'>  d:         46684902           208833    RAID                   </span></code></pre></td></tr></table></div></figure>


<p>In order to have a <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> crypto root filesystem work at bootup, you must use a keydisk. Unfortunately, there is no way to assemble the softraid volume by prompting for a password. To this end, I used an SDHC card I had lying around. It happened to be a 4GB Lexar Professional SDHC card but any card will do. I added a very small (1MB is fine) partition to it using <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">disklabel(8)</a>. I used the rest of the SDHC card for an <em>a</em> partition. In this case, I used the <em>d</em> partition for the keydisk and created it at the beginning of the SDHC card. Here is the output of <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=disklabel&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">disklabel(8)</a> for <em>sd1</em>, the device name of my SDHC card.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>#                size           offset  fstype [fsize bsize  cpg]
</span><span class='line'>  a:          8032448            16096  4.2BSD   2048 16384    1 
</span><span class='line'>  c:          8057856                0  unused                   
</span><span class='line'>  d:            16001               64    RAID                   
</span></code></pre></td></tr></table></div></figure>


<p>Now that I have both a prepared SSD and a prepared keydisk, it is time to format the <em>a</em> parition on the SSD for the kernel, and create the softraid volume which will utilize the keydisk.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># newfs /dev/rsd0a
</span><span class='line'># bioctl -c C -l /dev/sd0d -k /dev/sd1d softraid0</span></code></pre></td></tr></table></div></figure>


<p>You should now see output on the screen something like this for your new SR CRYPTO volume.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>sd2 at scsibus3 targ 1 lun 0: &lt;OPENBSD, SR CRYPTO, 005&gt; SCSI2 0/direct fixed
</span><span class='line'>sd2: 22795MB, 512 bytes/sector, 46684374 sectors</span></code></pre></td></tr></table></div></figure>


<p>At this point you can also format the <em>a</em> volume of your SDHC card but you can always do that later. The next step is to continue with the OpenBSD installer.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># cd /
</span><span class='line'># install</span></code></pre></td></tr></table></div></figure>


<p>Proceed through the whole process but use <em>sd2</em>, or whatever your SR CRYPTO volume shows up as, as the root disk. In my case, I only created an <em>a</em> partition on <em>sd2</em> that encompasses the entire SR CRYPTO volume since I already have a small swap partition on the SSD itself. Once the install is completed, you have two final steps.</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># mount /dev/sd0a /mnt2
</span><span class='line'># cp /mnt/bsd* /mnt2/
</span><span class='line'># /mnt/usr/mdec/installboot -v /mnt/boot /mnt/usr/mdec/biosboot sd2</span></code></pre></td></tr></table></div></figure>


<p>The <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=installboot&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">installboot(8)</a> command will generate output similar to the following:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>boot: /boot proto: /usr/mdec/biosboot device: /dev/rsd2c
</span><span class='line'>sd2: softraid volume with 2 disk(s)
</span><span class='line'>sd2: installing boot loader on softraid volume
</span><span class='line'>/boot is 3 blocks x 16384 bytes
</span><span class='line'>sd0d: installing boot blocks on /dev/rsd0c, part offset 208913
</span><span class='line'>master boot record (MBR) at sector 0
</span><span class='line'>        partition 3: type 0xA6 offset 64 size 46893671
</span><span class='line'>/boot will be written at sector 64
</span><span class='line'>sd2d: installing boot blocks on /dev/rsd2c, part offset 80
</span><span class='line'>master boot record (MBR) at sector 0</span></code></pre></td></tr></table></div></figure>


<p>With those steps completed, your <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> crypto install is done and you should be able to boot from your system as long as the keydisk is available. Remember that if you somehow do not have your keydisk, you cannot access your data. It is a good idea to backup your keydisk if possible as mentioned in an older <a href="http://www.undeadly.org/cgi?action=article&amp;sid=20110530221728">OpenBSD Journal article</a>. In my case I only backed up <em>sd1d</em> and not <em>sd1c</em> like the article suggested.</p>

<h4>Final Thoughts</h4>

<p>The whole process went rather smoothly once I discovered that a keydisk is required for a bootable <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=softraid&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">softraid(4)</a> crypto root filesystem. Normally, you would have to assemble the softraid volume which then asks for your password by just running the following after booting up your system:</p>

<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'># bioctl -c C -l /dev/sd0d softraid0</span></code></pre></td></tr></table></div></figure>


<p>The keydisk is what makes all the difference for allowing a bootable encrypted root setup. My attempts without a keydisk always ended in a kernel panic. So far performance seems excellent although I haven&rsquo;t done any major testing. For my needs the system is extremely responsive and everything is encrypted.</p>

<p>I would recommend that you use the <em>softdep</em> and <em>noatime</em> flags in your fstab for your filesystem since <em>softdep</em> will increase your filesystem&rsquo;s performance and <em>noatime</em> will cut down on unnecessary writes to your SSD. For details of both options and how to use them, read the <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fstab&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=amd64&amp;format=html">fstab(5)</a> and <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mount&amp;sektion=8&amp;arch=amd64&amp;apropos=0&amp;manpath=OpenBSD+Current">mount(8)</a> man pages.</p>

<p>I would caution anyone considering this type of setup to only use it with a machine where the processor supports AES-NI or your processor will have to work very, very hard to do the encryption on the fly. Any recent Core i5 or Core i7 does support AES-NI as do Xeon E3 chips and a few others as well. Celeron, Pentium, and Core i3 chips do not have support for AES-NI as an almost universal rule.</p>

<p>I am enjoying my ThinkPad X230 with OpenBSD so much that I will likely just keep it an OpenBSD-only system instead of the dual-SSD OpenBSD and <a href="http://www.ubuntu.com/">Ubuntu</a> system that I had originally planned.</p>

<p><em><strong>Update:</strong> tedu@, one of the OpenBSD developers, provided some additional insight in a <a href="https://lobste.rs/s/jigc21/encryped_root_filesystem_using_softraid_4_on_openbsd_with_an_slc_ssd/comments/n37j5k">comment on Lobste.rs</a>. He pointed out that for file sizes less than around 1GB, AES-NI hardware acceleration makes little difference. Essentially, normal desktop tasks without large file copies will not benefit very much from AES-NI. He also pointed out that the buffer cache is not encrypted so frequently used programs do not have to be decrypted each time they are used.</em></p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/encrypted-root-filesystem-using-softraid-4-on-openbsd-with-an-slc-ssd/">&infin; Permalink</a></p>]]></content>
    </entry>
  
    <entry>
      




<title type="html"><![CDATA[To C We Go]]></title>
<link href="http://brycv.com/blog/2012/to-c-we-go/"/>
<updated>2012-08-31T17:00:00-07:00</updated>
<id>http://brycv.com/blog/2012/to-c-we-go</id>

      <content type="html"><![CDATA[<p>I&rsquo;ve been wanting to learn a major programming language for years now but I&rsquo;ve always been too busy with other projects. I&rsquo;ve decided that now is the time to start learning. To that end I picked up an introductory book on C called <a href="http://bry.vc/Q8R8mV"><em>Head First C</em></a>. I also decided to look for a few other good books and ask some developers what they would recommend.<!--more--></p>

<p>I asked <a href="http://kyleisom.net">Kyle Isom</a>, an experienced C programmer, if he had any recommendations. He suggested a few more good resources. The gold standard for C books is <a href="http://bry.vc/PImxsT"><em>The C Programming Language</em></a> by Kernighan and Ritchie. This is often abbreviated as <em>C by KNR</em>. Another excellent introduction was put out by Stanford in the form of a 45 page document called <a href="http://cslibrary.stanford.edu/101/"><em>Essential C</em></a>.</p>

<p>Some more advanced books which are excellent are <a href="http://bry.vc/OOwWW9"><em>Advanced Programming in the UNIX Environment</em></a> and <a href="http://bry.vc/T1zwfv"><em>The Linux Programming Interface</em></a> often abbreviated as <em>TLPI</em>. I had already purchased <em>TLPI</em> based on the recommendation of <a href="http://www.biscade.com/">Mitch Haile</a>, another experienced developer. The author of <em>TLPI</em>, Michael Kerrisk, contacted me on Twitter after I discussed the book with Mitch. Michael is very, very nice and I appreciated his comments and suggestions.</p>

<p><a href="http://bry.vc/T1zwfv"><img class="center" src="http://brycv.com/images/TLPI-front-cover.png"></a></p>

<p>Kyle&rsquo;s final recommendation was the ever useful <a href="http://bry.vc/N4fNJL"><em>C Pocket Reference</em></a>. My intention in this process of learning C is to do some <a href="http://www.openbsd.org/">OpenBSD</a> development. I will be documenting this process here all along the way.</p>
<p><a rel="bookmark" href="http://brycv.com/blog/2012/to-c-we-go/">&infin; Permalink</a></p>]]></content>
    </entry>
  
</feed>
