<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[the crosseroads]]></title>
  <link href="http://www.thecrosseroads.net/atom.xml" rel="self"/>
  <link href="http://www.thecrosseroads.net/"/>
  <updated>2014-06-09T16:53:12-04:00</updated>
  <id>http://www.thecrosseroads.net/</id>
  <author>
    <name><![CDATA[Seth Wright]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Blog Moved to Google App Engine]]></title>
    <link href="http://www.thecrosseroads.net/2014/05/moved-to-gae/"/>
    <updated>2014-05-31T22:38:20-04:00</updated>
    <id>http://www.thecrosseroads.net/2014/05/moved-to-gae</id>
    <content type="html"><![CDATA[<p>I&rsquo;ve been playing with Google App Engine for a project lately, and I
decided to give it a shot for hosting this blog.  Since Octopress is
just a bunch of static files, there isn&rsquo;t much fiddling to do at all to
make it work.  In fact, simply copying the app.yaml file from
<a href="https://github.com/relarge/octopress-gae/">this Github repository</a> was all that was needed.</p>

<p>Neat!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Basic Network Configuration With Windows 8]]></title>
    <link href="http://www.thecrosseroads.net/2012/03/basic-network-configuration-with-windows-8/"/>
    <updated>2012-03-21T20:02:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2012/03/basic-network-configuration-with-windows-8</id>
    <content type="html"><![CDATA[<p>With Windows Server &ldquo;8&rdquo;, you no longer have to use <code>netsh</code> to set IP
addresses from the command-line.  Thanks to the new <em>NetTcpip</em> module,
you can do a whole lot more network configuration via PowerShell.</p>

<!-- more -->


<p>Here is a listing of cmdlets included in the <a href="http://technet.microsoft.com/en-us/library/hh826123.aspx">NetTcpip</a> module:</p>

<pre><code>PS C:\&gt; Get-Command -Module NetTcpip

Capability  Name                           ModuleName
----------  ----                           ----------
CIM         Get-NetIPAddress               NetTcpip
CIM         Get-NetIPInterface             NetTcpip
CIM         Get-NetIPv4Protocol            NetTcpip
CIM         Get-NetIPv6Protocol            NetTcpip
CIM         Get-NetNeighbor                NetTcpip
CIM         Get-NetOffloadGlobalSetting    NetTcpip
CIM         Get-NetPrefixPolicy            NetTcpip
CIM         Get-NetRoute                   NetTcpip
CIM         Get-NetTCPConnection           NetTcpip
CIM         Get-NetTCPSetting              NetTcpip
CIM         Get-NetTransportFilter         NetTcpip
CIM         Get-NetUDPEndpoint             NetTcpip
CIM         Get-NetUDPSetting              NetTcpip
CIM         New-NetIPAddress               NetTcpip
CIM         New-NetNeighbor                NetTcpip
CIM         New-NetPrefixPolicy            NetTcpip
CIM         New-NetRoute                   NetTcpip
CIM         New-NetTransportFilter         NetTcpip
CIM         Remove-NetIPAddress            NetTcpip
CIM         Remove-NetNeighbor             NetTcpip
CIM         Remove-NetPrefixPolicy         NetTcpip
CIM         Remove-NetRoute                NetTcpip
CIM         Remove-NetTransportFilter      NetTcpip
CIM         Set-NetIPAddress               NetTcpip
CIM         Set-NetIPInterface             NetTcpip
CIM         Set-NetIPv4Protocol            NetTcpip
CIM         Set-NetIPv6Protocol            NetTcpip
CIM         Set-NetNeighbor                NetTcpip
CIM         Set-NetOffloadGlobalSetting    NetTcpip
CIM         Set-NetPrefixPolicy            NetTcpip
CIM         Set-NetRoute                   NetTcpip
CIM         Set-NetTCPSetting              NetTcpip
CIM         Set-NetUDPSetting              NetTcpip                                            
</code></pre>

<p>To view the IP addresses on a given interface, use
<em><a href="http://technet.microsoft.com/en-us/library/hh826136.aspx">Get-NetIpAddress</a></em>:</p>

<pre><code>PS C:\&gt; Get-NetIPAddress -InterfaceIndex 17 | ft -AutoSize

ifIndex IPv4Address    IPv6Address                       PrefixLength SuffixOrigin Store
------- -----------    -----------                       ------------ ------------ -----
17                     fe80::901:6a7e:d676:2a88%17       64           Link         Active
17                     2001:470:8:1ee:901:6a7e:d676:2a88 64           Link         Active
17      169.254.42.136                                   16           Link         Active
</code></pre>

<p>As you can see, I only have an auto-configured IPv4 address on this
particular interface.  You can remove addresses with
<em><a href="http://technet.microsoft.com/en-us/library/hh826145.aspx">Remove-NetIPAddress</a></em>,
like so:</p>

<pre><code>PS C:\&gt; Get-NetIPAddress -InterfaceIndex 17 -AddressFamily IPv4 | Remove-NetIPAddress

Confirm
Are you sure you want to perform this action?

Performing operation "Remove" on Target "NetIPAddress -IPv4Address 192.168.2.3 -InterfaceIndex 17 -Store Active"
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
</code></pre>

<p>To view route information, use
<em><a href="http://technet.microsoft.com/en-us/library/hh826148.aspx">Get-NetRoute</a></em>:</p>

<pre><code>PS C:\&gt; Get-NetRoute -InterfaceIndex 17

ifIndex    RouteMetric     DestinationPrefix                        NextHop                      Store
-------    -----------     -----------------                        -------                      -----
17         1               0.0.0.0/0                                192.168.2.1                  Persistent
17         256             255.255.255.255/32                       0.0.0.0                      Active
17         256             224.0.0.0/4                              0.0.0.0                      Active
17         256             192.168.2.3/32                           0.0.0.0                      Active
17         1               0.0.0.0/0                                192.168.2.1                  Active
17         256             ff00::/8                                 ::                           Active
17         256             fe80::901:6a7e:d676:2a88/128             ::                           Active
17         256             fe80::/64                                ::                           Active
17         256             2001:470:8:1ee:901:6a7e:d676:2a88/128    ::                           Active
17         256             2001:470:8:1ee::/64                      ::                           Active
17         256             ::/0                                     fe80::20d:b9ff:fe15:e69d     Active    

PS C:\&gt; Get-NetRoute -InterfaceIndex 17 -RouteMetric 1

ifIndex    RouteMetric     DestinationPrefix     NextHop         Store
-------    -----------     -----------------     -------         -----
17         1               0.0.0.0/0             192.168.2.1     Persistent
17         1               0.0.0.0/0             192.168.2.1     Active    
</code></pre>

<p>&hellip;and to remove routes, use the appropriately-named
<em><a href="http://technet.microsoft.com/en-us/library/hh826124.aspx">Remove-NetRoute</a></em>
cmdlet:</p>

<pre><code>PS C:\&gt; Get-NetRoute -InterfaceIndex 17 -RouteMetric 1 | Remove-NetRoute

Confirm
Are you sure you want to perform this action?

Performing operation "Remove" on Target "NetRoute -DestinationPrefix 0.0.0.0/0 -InterfaceIndex 17 -NextHop 192.168.2.1
-Store Persistent"
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

Confirm
Are you sure you want to perform this action?

Performing operation "Remove" on Target "NetRoute -DestinationPrefix 0.0.0.0/0 -InterfaceIndex 17 -NextHop 192.168.2.1
-Store Active"
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y
</code></pre>

<p>Finally, to assign a static IP address to an interface, use the
<em><a href="http://technet.microsoft.com/en-us/library/hh826150.aspx">New-NetIpAddress</a></em>
cmdlet.</p>

<pre><code>PS C:\&gt; New-NetIPAddress -InterfaceIndex 17 -IPv4Address 192.168.2.3 `
&gt; -DefaultGateway 192.168.2.1 -AddressFamily IPv4

Store             : Active
IPv4Address       : 192.168.2.3
IPv6Address       :
InterfaceIndex    : 17
InterfaceAlias    : NicTeam
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 32
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Tentative
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False

Store             : Persistent
IPv4Address       : 192.168.2.3
IPv6Address       :
InterfaceIndex    : 17
InterfaceAlias    : NicTeam
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 32
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
</code></pre>

<p>When you assign a static IP address to an interface and set the default
gateway, it also inserts a default route into the routing table (as it
should).  (This is why I removed the default route earlier; to show this
behavior.)</p>

<pre><code>PS C:\&gt; Get-NetRoute -InterfaceIndex 17 

ifIndex    RouteMetric     DestinationPrefix      NextHop         Store
-------    -----------     -----------------      -------         -----
17         256             0.0.0.0/0              192.168.2.1     Persistent
17         256             255.255.255.255/32     0.0.0.0         Active
17         256             224.0.0.0/4            0.0.0.0         Active
17         256             192.168.2.3/32         0.0.0.0         Active
17         256             0.0.0.0/0              192.168.2.1     Active
[...]
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[NIC Teaming With Windows 8]]></title>
    <link href="http://www.thecrosseroads.net/2012/03/nic-teaming-with-windows-8/"/>
    <updated>2012-03-19T22:38:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2012/03/nic-teaming-with-windows-8</id>
    <content type="html"><![CDATA[<p>It&rsquo;s pretty easy to create a <a href="http://en.wikipedia.org/wiki/Link_aggregation">NIC team</a> with Windows Server &ldquo;8&rdquo;.  If you
have tried with previous versions of Windows you know that third-party
software was required.  Now, it&rsquo;s just a cmdlet away.</p>

<!--more-->


<p>Have a look a the new <em>NetLbfo</em> module:</p>

<pre><code>PS C:\Users\Administrator&gt; Get-Command -Module NetLbfo

Capability  Name                       ModuleName
----------  ----                       ----------
CIM         Add-NetLbfoTeamMember      NetLbfo
CIM         Add-NetLbfoTeamNic         NetLbfo
CIM         Get-NetLbfoTeam            NetLbfo
CIM         Get-NetLbfoTeamMember      NetLbfo
CIM         Get-NetLbfoTeamNic         NetLbfo
CIM         New-NetLbfoTeam            NetLbfo
CIM         Remove-NetLbfoTeam         NetLbfo
CIM         Remove-NetLbfoTeamMember   NetLbfo
CIM         Remove-NetLbfoTeamNic      NetLbfo
CIM         Rename-NetLbfoTeam         NetLbfo
CIM         Set-NetLbfoTeam            NetLbfo
CIM         Set-NetLbfoTeamMember      NetLbfo
CIM         Set-NetLbfoTeamNic         NetLbfo
</code></pre>

<p>Using the (also-new) <em><a href="http://technet.microsoft.com/en-us/library/hh826135.aspx">Get-NetIPInterface</a></em> cmdlet, find the interfaces that
you wan to team&hellip;</p>

<pre><code>PS C:\Users\Administrator&gt; Get-NetIPInterface

ifIndex ifAlias                        AddressFamily ConnectionState NlMtu(Bytes)   InterfaceMetric Dhcp     Store
------- -------                        ------------- --------------- ------------   --------------- ----     -----
24      Teredo Tunneling Pseudo-Int... IPv6          Disconnected    1280           50              Enabled  Persistent
23      isatap.crosse.org              IPv6          Disconnected    1280           50              Enabled  Persistent
13      Wired Ethernet Connection 2    IPv6          Disconnected    1500           10              Enabled  Persistent
12      Wired Ethernet Connection      IPv6          Disconnected    1500           10              Enabled  Persistent
10      Local Area Connection* 9       IPv6          Disconnected    0              0               Enabled  Persistent
13      Wired Ethernet Connection 2    IPv6          Connected       1500           10              Enabled  Active
12      Wired Ethernet Connection      IPv6          Connected       1500           10              Enabled  Active
24      Teredo Tunneling Pseudo-Int... IPv6          Connected       1280           50              Disabled Active
23      isatap.crosse.org              IPv6          Disconnected    1280           50              Disabled Active
1       Loopback Pseudo-Interface 1    IPv6          Connected       4294967295     50              Disabled Active
13      Wired Ethernet Connection 2    IPv4          Disconnected    1500           10              Enabled  Persistent
12      Wired Ethernet Connection      IPv4          Disconnected    1500           10              Enabled  Persistent
10      Local Area Connection* 9       IPv4          Disconnected    0              0               Enabled  Persistent
13      Wired Ethernet Connection 2    IPv4          Connected       1500           10              Enabled  Active
12      Wired Ethernet Connection      IPv4          Connected       1500           10              Enabled  Active
1       Loopback Pseudo-Interface 1    IPv4          Connected       4294967295     50              Disabled Active
</code></pre>

<p>&hellip;and then use the <em>New-NetLbfoTeam</em> cmdlet to create the team.  I&rsquo;m
using this server for Hyper-V, hence choosing that for the
load-balancing algorithm.</p>

<pre><code>PS C:\Users\Administrator&gt; New-NetLbfoTeam -Name "NicTeam" -TeamMembers `
&gt; "Wired Ethernet*" -TeamNicName "NicTeam" -TeamingMode SwitchIndependent `
&gt; -LoadBalancingAlgorithm HyperVPort

Confirm
Are you sure you want to perform this action?

Creates Team:'NicTeam' with TeamNic:'NicTeam'; Members:'Wired Ethernet Connection 2'; 'Wired Ethernet Connection';
TeamingMode:'SwitchIndependent'; LoadBalancingAlgorithm:'HyperVPort'
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): Y

Name                   : NicTeam
Members                : {Wired Ethernet Connection 2, Wired Ethernet Connection}
TeamNics               : NicTeam
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : HyperVPort
Status                 : Down
</code></pre>

<p>When I ran <em>Get-NetLbfoTeam</em> immediately after creating the team, it
took a minute or so before the Status went from Down to Up:</p>

<pre><code>PS C:\Users\Administrator&gt; Get-NetLbfoTeam NicTeam

Name                   : NicTeam
Members                : {Wired Ethernet Connection 2, Wired Ethernet Connection}
TeamNics               : NicTeam
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : HyperVPort
Status                 : Degraded

[time passes]

PS C:\Users\Administrator&gt; Get-NetLbfoTeam

Name                   : NicTeam
Members                : {Wired Ethernet Connection 2, Wired Ethernet Connection}
TeamNics               : NicTeam
TeamingMode            : SwitchIndependent
LoadBalancingAlgorithm : HyperVPort
Status                 : Up
</code></pre>

<p>And that&rsquo;s pretty much it!</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Lion Resources (and a Little Humility)]]></title>
    <link href="http://www.thecrosseroads.net/2011/07/lion-resources-and-a-little-humility/"/>
    <updated>2011-07-27T10:53:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/07/lion-resources-and-a-little-humility</id>
    <content type="html"><![CDATA[<p>As my friends and coworkers will tell you, I&rsquo;ve been somewhat obsessed
with checking my site stats for the past few days.  I&rsquo;m not lying when I
say that the four posts I wrote about Lion and the ensuing visitors to
this site now account for almost 13% of my total views–<em>since 2008</em>.
 None of the numbers involved are all that high, mind you, but they&rsquo;re
higher than I really ever thought I&rsquo;d see on this little old site.
 Still, it&rsquo;s hard not to see your view count &ldquo;skyrocket&rdquo; and think
you&rsquo;re doing something right and/or helping others who seem to be having
similar problems.  I&rsquo;ll admit it:  I found some pride somewhere in all
this.</p>

<p>Then I went trolling on Google.</p>

<p>It turns out that thecrosseroads.net doesn&rsquo;t turn up in the first page
of search results for pretty much any of the search terms that brought
people to the site (which leads me to believe that the users who are
finding my site are some pretty persistent people!).  And when you do
those searches, a lot better people than me have lent their pens to the
topic of Lion.  Don&rsquo;t mistake me, though; I&rsquo;m glad people have found my
posts useful, if only so that they know someone else feels the same way
they do, notices the same things, and holds the same ideas about how
things &ldquo;should work.&rdquo;</p>

<p>Anyway, enough about me.  Hit the break for a couple of resources that
may help you make more sense of Lion.</p>

<!--more-->


<ul>
<li><a href="http://arstechnica.com/apple/reviews/2011/07/mac-os-x-10-7.ars">Mac OS X 10.7 Lion: the Ars Technica review</a> &ndash; 19 pages of Lion.
 I haven&rsquo;t even made it through this one yet.</li>
<li><a href="http://www.guardian.co.uk/technology/2011/jul/20/mac-osx-lion-review">Mac OS X Lion: in-depth review with pictures (Guardian)</a> I
haven&rsquo;t read this one, but by the size of the scroll-bar it looks to
be a rather detailed review.</li>
<li><a href="http://eggfreckles.net/">Egg Freckles</a> - a site one of my coworkers
sent me.  Don&rsquo;t like the new look of iCal or Address Book?  He shows
you how to <a href="http://eggfreckles.net/tech/skinning-ical/">re-skin</a> <a href="http://eggfreckles.net/tech/unbinding-address-book/">them</a>.</li>
<li><a href="http://en.wikipedia.org/wiki/Mac_OS_X_Lion">Wikipedia&rsquo;s Lion article</a> &ndash; just the facts, ma&#8217;am.</li>
<li><a href="http://mattgemmell.com/2011/07/27/using-spaces-on-os-x-lion">Using Spaces on OS X Lion</a> &ndash; a nice article that covers how
to work with Mission Control.  Whereas I assumed readers knew how it
all worked and so was only pointing out what I believed are its flaws,
he actually shows you <em>how</em> to use it.</li>
<li><a href="http://mattgemmell.com/2011/07/25/network-link-conditioner-in-lion">Network Link Conditioner in Lion</a> &ndash; a neat utility that
comes with Lion&rsquo;s Developer Tools that allows you to simulate various
network types.</li>
</ul>


<p>I&rsquo;ll add more links as I come across them.  The Ars article should keep
you tied up for a while, at least&hellip;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mac OS X Lion: My Take, Part IV – App Resume, Auto-Save, Miscellaneous]]></title>
    <link href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iv-app-resume-auto-save-miscellaneous/"/>
    <updated>2011-07-24T22:11:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iv-app-resume-auto-save-miscellaneous</id>
    <content type="html"><![CDATA[<p>It&rsquo;s Sunday and I&rsquo;m really trying to fight off the urge to go take a nap
instead of finishing up my little series on Lion. Over the past couple
of days I&rsquo;ve written down my thoughts on <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control/">Mission Control</a>; the
<a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-ii-mail-ical-and-address-book/">Mail, iCal, and Address Book apps</a>; and
<a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences/">changes in Finder, spelling auto-correct, and some miscellaneous preferences</a>.
This final post will concern the new Application/OS Resume, Auto-Save
and Versions, and a couple of miscellaneous applications for which I
didn&rsquo;t have enough to say to warrant creating another post.</p>

<!--more-->


<h2>Miscellaneous Apps</h2>

<p>You know, I really thought I had more to write in the &ldquo;miscellaneous
apps&rdquo; category. It turns out I only have a few things written down, and
one of them is really just a product of App Resume that goes away when
disabled.</p>

<ul>
<li><strong>Preview–the sidebar opens on the left now, instead of the right.</strong> I
have no idea why you would change this, but it&rsquo;s not that big of a
deal. One of my coworkers mentioned that it looks a lot more like
Adobe Reader now, which I guess it does.</li>
<li><strong>Terminal–previous scrollback history should not persist when
Quitting and restarting the app.</strong> You guessed it, this was actually
because of App Resume. After disabling that, Terminal no longer
exhibited that behavior.</li>
<li><strong>TextEdit <em>refuses</em> to abide by my App Resume setting for one very
important case.</strong> There are times when all I want to do is open
TextEdit, throw some text in there for about five seconds (say, to
remove formatting or use it as a scratchpad), then quit the app
without saving. With the new TextEdit in Lion, quitting the
application without first closing the window (using Cmd-W) will just
save whatever text was in the window and display it again the next
time I open TextEdit. If I left App Resume enabled, I could see this
being correct behavior. However, I disabled App Resume in System
Preferences. So why is it saving this data between sessions? It&rsquo;s
getting very annoying.</li>
</ul>


<h2>App/System Resume</h2>

<p><strong><a href="href=%22http://www.apple.com/macosx/whats-new/features.html#resume">App/System Resume</a> is one of those features that sounds great
on paper, but ends up being less-than-useful in practice.</strong> The idea of
being able to start an application&mdash;or your Mac&mdash;and immediately start
where you left off is pretty cool. The problem lies in the reason why I
restart applications: I actually <em>want</em> a clean slate. Turns out this is
the same reason I reboot. (Well, okay, mainly that&rsquo;s to patch the
OS&hellip;or Safari, but don&rsquo;t get me started on why a browser upgrade should
ever need a full system restart.)</p>

<p>So, I like the idea of being able to resume an application right where I
left off, but I really don&rsquo;t want it to be the default behavior. What
I&rsquo;ve found (through spelunking the web) is that you can now use Cmd-Q
and Cmd-Opt-Q to quit apps. Governing their behavior is whether Resume
is enabled or not in System Preferences. When Resume is enabled, Cmd-Q
will quit the app and save state, while Cmd-Opt-Q will quit the app
cleanly. When Resume is disabled, however, the two shortcuts are
reversed. This means that I can disable Resume by default, but if I ever
want to save the application&rsquo;s state, I can quit using Cmd-Opt-Q. I
could see being this very handy for those
<a href="http://xkcd.com/214/">marathon Wikipedia sessions</a> where I look up after five hours and
realize that a) I have four hundred tabs open to Wikipedia articles in
Safari; and b) OS X would like to patch itself.  With Resume, I can just
Cmd-Opt-Q quit Safari, patch OS X, reboot, and reopen Safari to continue
&ldquo;learning&rdquo;.</p>

<p>Of course, System Resume is pretty much the same thing but on a grander
scale. When you log off or shut down / restart, you&rsquo;re asked whether or
not you want to resume your apps when you reboot. What I haven&rsquo;t found
is a way to default that little check box to disabled (to not save
state), which seems to frustrate one of my coworkers a bit. I haven&rsquo;t
decided if I mind yet, having only rebooted a total of one time after
the upgrade.</p>

<h2>Auto Save and Versions</h2>

<p>This early in the game I really do not have that much to say about these
<a href="http://www.apple.com/macosx/whats-new/auto-save.html">two features</a>. I was actually afraid that Apple had taken
the ability away to arbitrarily save in apps that support Auto Save, but
I realize now that that is not the case. What I find interesting is that
(at least in TextEdit) the Lock, Duplicate, and Browse All Versions
commands are nowhere in any menu: you have to click on the title of the
document in the actual window to get to those features. How very
un-Mac-like. I was also apprehensive about what the auto-save /
versioning thing would do to the size of files, but (having read nothing
yet about how these two features work) it looks like version data is
stored somewhere outside the document. (What I was really apprehensive
about was what a plaintext document created in TextEdit would look like
with the command-line utility cat(1). It looks fine.) <strong>One thing that
does bother me is that when I quit TextEdit, it does not ask me whether
I want to save my changes, it just does it.</strong> Many times I&rsquo;ll modify a
document knowing full well that I don&rsquo;t want to keep the changes.
Perhaps I just need to build a string out of text already in the
document. (Yes, this is probably a &ldquo;dangerous&rdquo; practice, but I&rsquo;ve done
it since something like 1990 without any major repercussions.) <strong>With
Auto Save, it seems like I&rsquo;ll be forced to change the way I work. I
don&rsquo;t view this as a plus.</strong> I do not like it when my tools force me to
work a different way.</p>

<h2>Summary</h2>

<p>I&rsquo;ve now had Lion installed for three days. My world has neither stopped
nor really sped into the future with this latest release from Apple. I
have identified a few things in Lion that I do not care for at all, yet
have also stumbled upon a few other things that may make using a
computer just a little nicer. At the end of the day, I have to remind
myself that&hellip;well, that I probably need to get out more. :&ndash;) It&rsquo;s been
kind of fun writing these posts up. Hopefully they will prove useful to
someone other than me.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mac OS X Lion: My Take, Part III - Finder, Spelling, Miscellaneous Preferences]]></title>
    <link href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences/"/>
    <updated>2011-07-24T00:04:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences</id>
    <content type="html"><![CDATA[<p>Part three of my initial impressions of Lion covers Finder, the new
spelling auto-correct feature, and some miscellaneous settings. Make
sure to read parts <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control/">one</a>, <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-ii-mail-ical-and-address-book/">two</a>, and <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iv-%e2%80%93-app-resume-auto-save-miscellaneous/">four</a> of this series as
well!</p>

<!--more-->


<h2>Finder</h2>

<p>I haven&rsquo;t found many changes in Finder, so I don&rsquo;t have too many things
to say about it (yet?).</p>

<h3>The Negative</h3>

<ul>
<li><strong>For some reason, the upgrade unset my &ldquo;Snap to Grid&rdquo; preference on
the Desktop.</strong>  I just realized it apparently also reset my grid
spacing. Just an annoyance, and easily fixed.</li>
<li><strong>The default view when opening a new Finder window is something
called &ldquo;All My Files&rdquo;.</strong>  Really? What a useless view. It shows you
six or seven files of various formats in the window, and if you scroll
down there is a &ldquo;More&rdquo; icon. <em>Hardly</em> all my files. Maybe I&rsquo;m now just
one of the few people left in the world who actually <em>remembers</em> where
I put my files for whom this new view is worthless, but I doubt it.
Besides, what was wrong with Spotlight? Or search? Whatever. At least
you can change the default back to opening your home folder–or any
other folder for that matter.</li>
<li><strong>The status bar at the bottom of Finder windows is not shown by
default.</strong>  I can only think that perhaps Apple took a page out of
Microsoft&rsquo;s book by hiding this by default. Again, whatever&mdash;it&rsquo;s easy
to un-hide it.</li>
</ul>


<h3>The Positive</h3>

<ul>
<li><strong>You can change the default search behavior from &ldquo;search my entire
friggin&#8217; Mac&rdquo; to &ldquo;just search the folder I&rsquo;m in and its
subfolders&rdquo;.</strong> Somehow I missed that in previous iterations of OS X.
That would have been a handy option to change.</li>
</ul>


<h2>Spelling Auto-Correction</h2>

<p>If I had left auto-correct enabled, it probably would have been the
death of me–or at least a contributing factor. If you&rsquo;ve ever used an
iDevice, it&rsquo;s the same sort of cutesy little pop-up window-thing as in
iOS. And for iPhones and iPads it seems to work well enough, because
typically most people could probably race a snail trying to type out a
sentence on an iDevice&hellip;and lose. But it does give the user time to
realize that the auto-correct box has popped up.</p>

<p>Contrast this with a real computer. I&rsquo;m not a super-fast typist or
anything, but I can probably roll at about 70-80 words per minute when I
get going. On the downside, I do make a decent amount of mistakes while
typing. The &ldquo;problem&rdquo; is that when I&rsquo;m typing and make a mistake or
misspell something, <strong>I don&rsquo;t wait before hitting the space bar to see
if Lion would like to suggest an alternate spelling.</strong>  No, I just
cruise right along like I&rsquo;ve done since that typing class I took in the
7th grade, and therein lies the problem: instead of only marking words
as misspelled, by default Lion will just auto-correct the word for you
(because you <em>did</em> after all press that convenient space bar to accept
whatever inane word Lion suggested).</p>

<p>The example I wrote down for reference was a reply to an email I was
trying to type dealing with the website
<a href="http://www.vascan.org/">www.vascan.org</a>. Got help me, but I almost
punched my iMac trying to get that thing written. Every time I tried to
type &ldquo;vascan.org&rdquo;, as soon as I hit the period separating the domain
from the <abbr title="Top-Level Domain">TLD</abbr>, Lion would helpfully
change it to &ldquo;va scan.org&rdquo; (adding a space between &ldquo;va&rdquo; and &ldquo;scan&rdquo;).
<strong>That is not useful, it&rsquo;s detrimental.</strong></p>

<p>Fortunately disabling auto-correct is as easy as opening System
Preferences, clicking on the &ldquo;Language &amp; Text&rdquo; icon, choosing the
&ldquo;Text&rdquo; tab, and unchecking the box next to &ldquo;correct spelling
automatically&rdquo;. <strong>Pro-tip: be sure you close and reopen whatever
applications you have open in order for the autocorrect changes to take
effect.</strong>  I had issues with this and restarting the application seemed
to help.</p>

<h2>Miscellaneous Preferences</h2>

<ul>
<li><strong>The new &ldquo;natural&rdquo; scroll direction is anything but natural.</strong>  Let
me explain this one. If you haven&rsquo;t read about it, Lion reverses the
direction you&rsquo;ve been scrolling on a PC <strong><a href="http://en.wikipedia.org/wiki/Scroll_wheel">since 1993</a>.</strong>  When I use a scroll
wheel–or the two-finger swipe on a trackpad–my brain has been
conditioned to believe that I am manipulating the scroll bar,
<em>not</em> the window contents. When I&rsquo;m reading a web page and I get to
the bottom of the window, I know I need to move the scroll bar towards
the bottom to view the rest of the page. Contrast this to how a tablet
works: when I am reading a web page in Safari on my iPad, it&rsquo;s
supposed to feel like I&rsquo;m reading a book or real page, and thus I put
my finger on the screen and &ldquo;push&rdquo; the document in the direction I
want it to go, just like I would a piece of paper on my desk. <strong>This
is not how I interact with my iMac, or any other real computer.</strong> 
Fortunately this is easy to disable by unchecking the &ldquo;Scroll
direction: natural&rdquo; on the &ldquo;Scroll &amp; Zoom&rdquo; tab of the Trackpad
preference pane. (I believe it&rsquo;s the same for mice, except under the
Mouse preference pane. I don&rsquo;t have a mouse connected to my laptop to
verify this, though.) This even affects scrolling left and right, such
as going backwards or forwards through browser history. When I want to
go &ldquo;back,&rdquo; I swipe to the left because that&rsquo;s the direction &ldquo;back&rdquo; has
always been. Apparently Apple would like you to believe that &ldquo;back&rdquo; is
now somewhere off to the right side of your Mac.</li>
<li><strong>The new mouse and trackpad gestures seem mostly useful, but are
almost overdone.</strong>  You owe it to yourself to take at least a cursory
look at all the gestures under the Mouse and/or Trackpad preference
panes, so that when you accidentally trigger <em>something</em>, you&rsquo;ll have
a good idea what just happened. Also, the gestures feel weird on a
Magic Mouse, but I blame that on the hardware and not the software.
For a company that used to specialize in human interface design, their
peripherals sure do destroy my wrists and hands after eight hours of
non-stop use.</li>
<li><strong>Speaking of gestures, the new &ldquo;Smart Zoom&rdquo; gesture is
magnificent.</strong>  One of my complaints lately is that the size of text
on the screen seems to go down as pixel density goes up. You&rsquo;d think
OS developers would be able to compensate for this automatically and
make rendered text more pixel-dense but still be the same height as
before, instead of making users jack up their font sizes to
compensate. Anyway, the point here is that two-finger double-tapping
will zoom a window to where it thinks the content is, just like on an
iDevice. It makes reading web pages with tiny fonts so much easier.</li>
<li><strong>There is an &ldquo;Advanced Options&rdquo; pane by right-clicking on a user in
the &ldquo;Users &amp; Groups&rdquo; preference pane.</strong>  From here you can change the
user&rsquo;s uidNumber, gidNumber, loginShell, and various other things.  I
haven&rsquo;t verified whether this existed before or not, and it wouldn&rsquo;t
be useful 99% of the time, but for that 1% of the time where you
<em>really</em> have to change your uidNumber, you can do it from here.</li>
<li><strong>The &ldquo;About This Mac&rdquo; / &ldquo;More Info&hellip;&rdquo; button opens a pared-down
version of the System Information application.</strong>  It shows the
following tabs: Overview, Displays, Storage, and Memory. The Memory
tab will even tell you how many slots you have, which ones are filled,
and has a link at the bottom for &ldquo;Memory Upgrade Instructions&rdquo; that
takes you to an Apple KB article on upgrading memory for whichever
type of Mac you&rsquo;re using. That&rsquo;s kind of nice. And of course you can
still get to the full System Information application as well.</li>
<li><strong>LaunchPad doesn&rsquo;t need to exist.</strong>  Another one of those &ldquo;Top New
Features&rdquo; with Lion, you can read about it
<a href="http://www.apple.com/macosx/whats-new/launchpad.html">here</a>.  I have
no idea why the Dock, Spotlight, and the friggin&#8217; Applications folder
weren&rsquo;t good enough for finding and displaying applications. I will
not acknowledge its presence any further than to say that <strong><em>my MBP
and iMac are not iPads!</em></strong></li>
<li><strong>Suspending my MacBook Pro with a 
<a href="http://www.apple.com/macosx/whats-new/full-screen.html">full-screen application</a>
in the foreground will not resume to the full-screened app.</strong>  This is
something I&rsquo;ve noticed while typing up these notes.  I&rsquo;m using Safari
in full-screen mode, which I guess means that it gets its own
desktop(-ish). Anyway, when I close the lid of the MacBook Pro to read
over my notes, then open it back up, it always wants to switch away
from Safari to another application on the original desktop Safari was
on before I full-screened it. It&rsquo;s a little annoying–probably a
bug–but nothing I can&rsquo;t cope with.</li>
<li><strong>Scroll bars are hidden most of the time.</strong>  To tell the truth, I
haven&rsquo;t noticed the scroll bars being absent that much. I purposely
left the setting at the default to see how much I actually look at
them for feedback. It turns out I use the scroll bars for two very
important things. First, it gives me feedback on document length.
Second, it shows me exactly how far I&rsquo;ve gotten in that document, and
how much farther I have to go to hit the end. So far it hasn&rsquo;t been a
big deal to have them only show up when I scroll, but I confess I did
re-enable them on the iMac at work.</li>
<li><strong>What&rsquo;s the point of rubber-band scrolling?</strong>  It&rsquo;s cute on an
iDevice, but it&rsquo;s distracting on a real computer and slows down real
work.</li>
<li><strong>I would like for Apple to show me that DFS support actually exists
in Finder.</strong>  This feature excited me when I first read about it.
<a href="http://www.apple.com/macosx/whats-new/features.html">Apple says</a>,
&ldquo;Lion supports DFS URLs, drill-down, failover, and reconnects when
connecting to Windows file servers.&rdquo; Sweet! So I click on the desktop,
<em>Cmd-K</em> to connect to a server, type <em>cifs://server/dfsshare</em>, wait
for a while, get a list of top-level folders. Awesome! Wait&hellip;we use
access-based enumeration, so I really shouldn&#8217;t see all these folders.
Oh well, I guess that still doesn&rsquo;t work. Click on my department&rsquo;s
top-level share, and get&hellip;nothing. An empty folder, a.k.a. the DFS
root folder that should have triggered a DFS referral. #@$&amp;%!</li>
</ul>


<h2>Summary</h2>

<p>It may seem like I have a lot of negative things to say about Lion–and
guess I do–but by and large I haven&rsquo;t found too many things that I
cannot disable, reset, or otherwise ignore to make the Lion experience a
useful one. Coming up tomorrow I plan to finish this series with a post
about changes to a couple of miscellaneous applications and weigh in
with my thoughts on Auto Save and App/System Resume.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mac OS X Lion: My Take, Part II - Mail, iCal, and Address Book]]></title>
    <link href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-ii-mail-ical-and-address-book/"/>
    <updated>2011-07-23T15:40:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-ii-mail-ical-and-address-book</id>
    <content type="html"><![CDATA[<p>Next up in my mini-series detailing my initial impressions with Lion is
the <abbr title="Personal Information Management">PIM</abbr> suite:
Mail, iCal, and Address Book. (Be sure to read parts <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control/">I</a>, <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences/">III</a>, and
<a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iv-%e2%80%93-app-resume-auto-save-miscellaneous/">IV</a> of the series.) I won&rsquo;t say I&rsquo;m a heavy email or calendar user
(I&rsquo;m not a manager or anything&hellip; ;&ndash;)), but I am an email admin, and a
persnickety one at that. I expect my mail and calendaring applications
to behave in a certain way, and when they don&rsquo;t, my feathers get ruffled
and I get annoyed. Continue reading for a (probably too lengthy) list of
pros and cons about Lion&rsquo;s PIM suite.</p>

<!--more-->


<h2>Mail</h2>

<p>I should start by saying that we use Exchange at the university as our
central email system, so my account in Mail is an Exchange 2010 mailbox
(as are my iCal and Address Book accounts). However, I think most of the
following points would apply to any account type.</p>

<p>After opening Mail for the first time in Lion, my initial reaction was
something like, &ldquo;holy crap, what did they <em>do</em>?&rdquo; Apple&rsquo;s changes to the
Mail application are so extensive that it&rsquo;s one of the
&ldquo;<a href="http://www.apple.com/macosx/whats-new/mail.html">Top New Features</a>&rdquo; of the OS. Ever used Mail on an iDevice? Yep,
that&rsquo;s pretty much what your initial view is. The layout works on a
tablet or small device, but I think it&rsquo;s terrible on a full-fledged
computer. So, step one of my &ldquo;Mail remediation program&rdquo; was to show my
folder structure on the left-hand side again, and step two was to find
the &ldquo;use classic layout&rdquo; option in Preferences to put the message list
back on top of the preview pane–you know, where it <strong>should</strong> be.
(Apple, you do <em>not</em> have to follow Microsoft Outlook on this stupid
side-by-side view.  It&rsquo;s cluttered. It is in Outlook, and it is with
Mail, too.) I think I also turned off the conversation view on my Inbox,
but that&rsquo;s neither here nor there, really. I leave conversation view
disabled on the Inbox, but enable it for folders of listserv mail.</p>

<p>On to the pros and cons.</p>

<h3>The Negative</h3>

<ul>
<li><strong>The application still doesn&rsquo;t retrieve the user&rsquo;s server-side rules
from an Exchange 2007/2010 server.</strong> I know EWS
<a href="http://msdn.microsoft.com/en-us/library/ff709501(EXCHG.140).aspx">exposes this</a>.
It was actually surprised this functionality wasn&rsquo;t included. Guess
I&rsquo;ll have to continue to use Outlook or OWA to manage my inbox rules.</li>
<li><strong>Initially, header details in the preview pane are limited to From,
Subject, and Date.</strong> No &ldquo;To:&rdquo; line. &ldquo;CC:&rdquo; isn&rsquo;t there either. That&rsquo;s
just way too limited for me. Fortunately it&rsquo;s as simple as clicking
&ldquo;Details&rdquo; on the right-hand side of the preview pane to get a more
useful view, and thank heavens that preference is sticky between
messages.</li>
<li><strong>Viewing &ldquo;Raw Source&rdquo; of a message opens up a new window instead of
changing the view in the preview pane.</strong>  Okay, this is probably
personal preference and me being way too nit-picky, but I liked how
Mail used to just change the view in the preview pane. I think it was
cleaner than having to deal with a pop-up window.</li>
<li><strong>Replying or forwarding a message makes the preview pane &ldquo;hop out&rdquo;
into a new window.</strong>  What is this I don&rsquo;t even&hellip; It makes the app
feel childish. Apple should have resisted the urge to animate every
little thing about Lion.</li>
<li><strong>The Send button is now just an icon of a paper airplane.</strong>  Because
clearly, that&rsquo;s the sort of icon you&rsquo;d think to click to send an
email. (Yes, that stupid icon was in previous versions of Mail, and I
tolerated it then only because the word &ldquo;Send&rdquo; was right below it.)
Again, this is a personal thing. Using a paper airplane for an icon
neither enhances nor degrades the functionality of the application.
But it also makes no sense.</li>
<li><strong>The folder list font is bigger, so fewer folders fit in the view.</strong> 
Another personal preference. I expect this is actually a positive for
many people. Honestly, I debated whether to put this in the list of
positives or negatives, and only decided to put it here because I lost
a coin-toss with myself.</li>
<li><strong>Viewing PDFs with Quick Look seems to want to &ldquo;snap&rdquo; to pages
instead of the previous &ldquo;continuous page flow&rdquo; view.</strong>  By this I mean
that you can&rsquo;t make Quick Look span the bottom-half of one page and
the top-half of the next page. If you scroll down it will just snap
the view to the next page instead. This is just downright annoying. I
haven&rsquo;t tried it with other documents to see if it behaves the same
way. I know Quick Look is pervasive throughout OS X, but I have no
clue where I would look for configuration options.</li>
<li><strong>The keyboard shortcut for the Activity Viewer window was changed
from Cmd-0 to Cmd-Option-0.</strong>  Apple is taking a page out of
Microsoft&rsquo;s book here, by invalidating muscle memory and making me
wonder if I&rsquo;ve gone mad. The weird thing is that Cmd-0 (that&rsquo;s a zero,
by the way) is actually bound to <em>another</em> command (&ldquo;Message
Viewer&rdquo;) that resides under the same Window menu , which will really
mess with your head. &ldquo;Why isn&rsquo;t the Activity Viewer showing? I typed
the shortcut! I even saw the Window menu light up, so I know the key
combo registered!&rdquo; Sigh.</li>
<li><strong>Mail in Lion seems to be worse at discovering conversations than in
Snow Leopard.</strong>  I subscribe to a few listservs, and I like to enable
conversation view in those folders. In Snow Leopard, Mail was very
good about figuring out which emails went with which thread. In Lion,
however, I have one listserv that Mail just cannot figure out how to
thread at all. It shows a few of the emails in threads, but by and
large most emails in that folder are now unthreaded. This seems like a
genuine regression to me.</li>
</ul>


<h3>The Positive</h3>

<ul>
<li><strong>You can set a custom header detail view and include headers relevant
to you.</strong>  Part of spelunking through a new release like this is
finding things you never knew existed (or saw but quickly forgot
because you weren&rsquo;t actively looking for that particular feature). I
have no idea if this was an option previously, but it&rsquo;s there in Lion.
Cool.</li>
<li><strong>There is a &ldquo;Get Account Info&rdquo; option that shows folder size,
Out-Of-Office settings, and some other summary data.</strong>  Again, I don&rsquo;t
know if this was present in previous versions, but I think it&rsquo;s pretty
neat. I&rsquo;m fairly certain the OOF section didn&rsquo;t exist prior to Lion,
even if the others did. What surprised me was that it pulled my OOF
settings from the Exchange server, so Apple didn&rsquo;t just create a
one-off client-side autoresponder setting. Of course, having this
makes the absence of server-side rules in Mail completely baffling.</li>
<li><strong>When in conversation view, clicking on the rolled-up conversation
will show you a linear view of all messages in that thread in the
preview pane.</strong>  Previously it would just show you a list of all
messages in the thread: who sent them, when they were sent, and the
subject line.</li>
</ul>


<h2>iCal</h2>

<p>I use iCal to view my Exchange 2010 calendar as well as my personal
Google calendar. I also typically have a couple of Exchange delegate
calendars listed as well. I&rsquo;m not really a heavy calendar user at all.</p>

<h3>The Negative</h3>

<ul>
<li><strong>The new interface looks like a desk calendar.</strong>  I guess it looks
okay, but it seems less professional somehow.</li>
<li><strong>The list of calendars is now hidden behind a &ldquo;Calendars&rdquo; button.</strong> 
I really liked seeing at a glance which calendars were shown. This
isn&rsquo;t terrible in and of itself, but without the calendar list you
have no legend to remind you of which appointment color goes with
which calendar. Is red my Exchange calendar or my personal calendar?
Which calendar is this green appointment on? (Of course, the subject
of the appointment typically helps with that, but it&rsquo;s still slightly
confusing; especially if I have my coworkers&#8217; calendars listed as
delegate calendars, since we all go to a lot–but not all–of the same
meetings.)</li>
</ul>


<h3>The Positive</h3>

<ul>
<li><strong>Theoretically it supports Exchange 2010.</strong>  Of course, you can still
typically use Exchange 2007 EWS calls against an Exchange 2010 client
access server, which was how iCal in Snow Leopard was working with my
calendar before now. Of course, iCal seemed to crash about once every
half hour before, too, leading me to my next point&hellip;</li>
<li><strong>At least it hasn&rsquo;t crashed yet.</strong>  It was getting comical just how
often iCal crashed on Snow Leopard on my iMac at work. The day before
I upgraded to Lion was the worst it had ever been. I got into a fight
with it: I&rsquo;d start it, it&rsquo;d immediately crash, I&rsquo;d click &ldquo;Reopen&rdquo;,
it&rsquo;d crash, I&rsquo;d click &ldquo;Reopen&rdquo;, it&rsquo;d crash again, I&rsquo;d click &ldquo;OK&rdquo; and
open it from the Dock, it&rsquo;d crash&hellip;I wish I was making that up.</li>
</ul>


<p>Otherwise, I can&rsquo;t find much that has really changed. It looks like iCal
on iOS. Whoop-dee-do.</p>

<h2>Address Book</h2>

<p>Upon starting Address Book for the first time, I had the same initial
reaction to it as I did to Mail: &ldquo;oh no, what did they <strong>DO</strong>?&rdquo;</p>

<h3>The Negative</h3>

<ul>
<li><strong>It looks like a book.</strong>  What was wrong with the old interface? Is
there a particular reason that Apple decided to turn it into something
I&rsquo;d expect from Fisher Price? Come on, guys, people <em>do</em> use Macs in
the corporate world, and that&hellip;thing&hellip;is just a joke. It&rsquo;s awful.
The old user interface was functional and didn&rsquo;t look bad, dated, or
otherwise in need of improvement. Ugh.</li>
</ul>


<h3>The Positive</h3>

<ul>
<li><strong>At least it&rsquo;s still there.</strong>  Honestly, that&rsquo;s about all I can think
of.</li>
</ul>


<h2>&ldquo;Mail, Contacts, &amp; Calendars&rdquo; Preference Pane</h2>

<p>This is an interesting enhancement. Instead of managing your various
accounts in Mail, iCal, and Address Book, you can now manage them from a
central preference pane. It also seems to handle instant messaging
accounts that iChat understands. They lifted this straight from iOS, and
I will say that it seems like it might be handy.</p>

<h2>Summary</h2>

<p>I really should have kept one of my Macs on Snow Leopard so that I could
do comparisons to check whether what I thought was a new feature in Lion
didn&rsquo;t already exist in Snow Leopard.</p>

<p>Mail, iCal, and Address Book are still as functional as their
predecessors, and some of the changes Apple made are welcome. By and
large, most changes seem to be to the user interface, and mostly make
the applications look like something you&rsquo;d see on a Hasbro &ldquo;My First
Computer&rdquo; toy. I&rsquo;m a professional: please give me professional-looking
applications.</p>

<p>Stay tuned for part <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences/">III</a> of this little series. If you missed part I,
you can view it <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control/">here</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mac OS X Lion: My Take, Part I - Mission Control]]></title>
    <link href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control/"/>
    <updated>2011-07-22T23:22:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-i-mission-control</id>
    <content type="html"><![CDATA[<p>Everyone is going to have their own opinion of Apple&rsquo;s new operating
system, Lion (10.7 for those of you keeping count). I upgraded both my
personal MacBook Pro and the work iMac yesterday during lunch, and
before I went home I had three full pages of hand-written notes&mdash;both
good and bad&mdash;detailing my initial impression with the new OS. At this
point I&rsquo;ve only used Lion for a day-and-a-half; in all probability I&rsquo;ll
find other depressing quirks and unexpected niceties that could be added
to these notes.</p>

<p>In typing up my list I realized it would work better as a multi-part
series instead of one long description of everything I noted. This first
part will deal with Mission Control. (Parts <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-ii-mail-ical-and-address-book/">II</a>, <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iii-finder-spelling-miscellaneous-preferences/">III</a>, and <a href="http://www.thecrosseroads.net/2011/07/mac-os-x-lion-my-take-part-iv-%e2%80%93-app-resume-auto-save-miscellaneous/">IV</a>
follow this.)</p>

<!--more-->


<h2>Mission Control (née Spaces)</h2>

<p>Spaces is gone, and in its place is the new &ldquo;<a href="http://www.apple.com/macosx/whats-new/mission-control.html">Mission Control</a>&rdquo;. Apple
has this to say about it:</p>

<blockquote><p>Mission Control brings together Exposé, Dashboard, Spaces, and<br/>full-screen apps to give you one place to see and navigate everything<br/>running on your Mac.</p></blockquote>


<p>Sure, whatever. I like
<a href="http://jspr.tndy.me/first-impressions-on-lion/">this guy&rsquo;s</a> description
better:</p>

<blockquote><p>Mission Control suggests to me that Spaces and Exposé had a<br/>child and found out that they were cousins when it was already too late<br/>to terminate the poor, unfortunate bastard.</p></blockquote>


<p>I&rsquo;m going to assume you&rsquo;ve worked with Spaces before and have at least
read about Mission Control&rsquo;s new features, and as such and not going to
reproduce them here. With that said, let&rsquo;s jump in.</p>

<h3>The Negative</h3>

<ul>
<li><strong>There is no way to tell which desktop you&rsquo;re on.</strong> With Spaces, I
could always look on the menu bar at the Spaces icon and see the
number of the Space I was currently on. This is turning out to be less
of an issue than I originally thought, though, since I have very
specific app pinnings (more on that in a bit). It&rsquo;d still be nice to
know at a glance where I was in the desktop list–and no, opening
Mission Control is not &ldquo;at a glance&rdquo;.</li>
<li><strong>Spaces used to have an overview that showed all of the Spaces and
what was on them.</strong> Yes, you can view all your desktops in Mission
Control, but they&rsquo;re tiny compared to the Spaces preview. I didn&rsquo;t use
this feature often, but I think it was more useful when I needed it
than Mission Control is going to be. At least you can still drag
applications between desktops in Mission Control, as well as use the
&ldquo;left-click window, Cmd-NumKey&rdquo; dance to move windows between desktops
without invoking Mission Control. (Geez, could they have thought of a
longer name? I&rsquo;m already tired of typing it out.)</li>
<li><strong>Desktops move around in the desktop list by default.</strong>  I don&rsquo;t know
the full ramifications of this since I disabled it almost immediately
after realizing what it was doing, but instead of keeping all desktops
in a line by desktop number, the desktops seem to behave more like the
application MRU list (alt-tab). I assume that using number keys will
still take you directly to a specific desktop, but it seems like this
&ldquo;feature&rdquo; would play havoc if you&rsquo;re used to using arrow keys to cycle
through desktops. I really don&rsquo;t want to have to guess at where my
desktops will be in the desktop list at any given time,
thankyouverymuch. Disabled. Speaking of arrow keys&hellip;</li>
<li><strong>Using the arrow keys to navigate between desktops is sloooow.</strong> 
Apple CoreAnimate&rsquo;d the tar out of the desktop-to-desktop transition,
and while it is nice and pretty, it probably takes a full second or
more between the time that you switch from the first desktop until you
can do anything on the second desktop. (Oddly, using the number keys
to move between desktops is still very quick.) I know what you&rsquo;re
thinking: &ldquo;a full <em>second</em>? My, however will you cope?!?&rdquo; Yeah, well,
when you flip back-and-forth between desktops as often as I do, it
gets very annoying to have to wait. Of course, maybe it doesn&rsquo;t matter
anymore because&hellip;</li>
<li><strong>You can no longer organize desktops into rows and columns.</strong>  With
Mission Control, you get one long row of desktops, which I guess looks
nice up there at the top of the Mission Control window, but if that
was the only reason for getting rid of the ability to organize
desktops into a grid, those Apple devs should have thought a bit
longer. Here&rsquo;s the scenario: with Snow Leopard I had six Spaces
organized in two rows of three Spaces each. The top row–spaces one
through three–consisted of (1) Safari; (2) Mail/Outlook, iCal, Address
Book; and (3) VMware with Windows 7 desktop. The bottom row–spaces
four through six–were (4) IM/Twitter; and Spaces 5 and 6 were
&ldquo;scratch&rdquo; spaces, typically used for Terminal windows and Word
documents and other applications I didn&rsquo;t care about pinning to a
specific desktop. A nice thing about upgrading instead of reinstalling
from scratch was that the number of desktops and all my app &ldquo;pinnings&rdquo;
were preserved, so Adium is still on desktop 4, for instance. However,
now I either have to arrow left and right (and endure the delay) to
move through all six desktops or use the number keys to bounce
directly to a desktop. Unfortunately, since desktop four is no longer
logically &ldquo;under&rdquo; desktop one, to get there from desktop one it&rsquo;s
either three arrow-lefts or involves taking my eyes off the screen to
hunt down the &ldquo;4&rdquo; key. With Spaces, that would have been an
&ldquo;arrow-down&#8221;–much easier! Adium was &#8220;below&rdquo; Safari, VMware was to the
right of Mail and &ldquo;above&rdquo; a scratch space, etc. It made sense.</li>
<li>Lastly, <strong>desktop movement is not circular.</strong>  You cannot arrow-left
on the first desktop to get to the last desktop or vice-versa. I have
no idea why that got removed.</li>
</ul>


<h3>The Positive</h3>

<ul>
<li><strong>At least you can still have multiple desktops.</strong>  Snarky, yes, but
sadly it&rsquo;s almost all I could come up with.</li>
<li><strong>Performing an upgrade from Snow Leopard preserved my desktops and
application desktop assignments.</strong>  At least I didn&rsquo;t have to go
through and reset assignments for all of my frequently used
applications. For what it&rsquo;s worth, the way to assign an application to
a specific desktop is to right-click the application&rsquo;s icon in the
Dock, then choose <em>Options&mdash;>Assign To</em>.</li>
</ul>


<h2>Summary</h2>

<p>Mission Control is nice, I guess, but in creating this new hybrid
Spaces/Exposé thing they removed functionality that I&rsquo;ve come to rely on
(and indeed, has probably been in UNIX-like windows managers for 15
years or more). In short, I want Spaces back.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Who Knew Creating a Filesystem Was Difficult?]]></title>
    <link href="http://www.thecrosseroads.net/2011/04/who-knew-creating-a-filesystem-was-difficult/"/>
    <updated>2011-04-05T16:17:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/04/who-knew-creating-a-filesystem-was-difficult</id>
    <content type="html"><![CDATA[<p>It turns out that trying to create your own filesystem is a bit more
difficult than one might expect.  I have been nose-deep in various
documentation about filesystem theory and the layouts of various popular
filesystems for a little over a week.  (Okay, okay, so most of it begins
with &ldquo;<a href="http://en.wikipedia.org/wiki/...">http://en.wikipedia.org/wiki/&#8230;</a>&rdquo;, but still&mdash;lots of good
information out there.)</p>

<p>Things I have learned, after the break.</p>

<!--more-->


<h2>Building my Own</h2>

<p>I&rsquo;ve been thinking / whiteboarding out my own sort of file system based
on some of the concepts of the filesystems listed below, plus others
like the new <a href="http://en.wikipedia.org/wiki/Btrfs">Btrfs</a>.  It&rsquo;s been an interesting experience so far.</p>

<p>The reason I started down this path instead of implementing one of the
existing ones is because I&rsquo;m at that stage in the project where I have
to to read the kernel bootstrap file from the filesystem.  That part
really doesn&rsquo;t mean I couldn&rsquo;t use something already out there, though.
 The problem is that I&rsquo;m using a Mac to develop this thing (at least, so
far), and it seems that OSX only knows how to create FAT and Mac-type
file systems (HFS+, etc.).  At least, I haven&rsquo;t found out how to make it
create FFS or ext2, which if I were going to re-implement something,
it&rsquo;d be one of those.  So, if I can&rsquo;t create and mount the filesystem to
put the kernel onto it&hellip;.</p>

<p>I guess I could just implement something temporarily and get back onto
the build-a-kernel track, but for some reason it bothers me to do
something that I know I&rsquo;ll have to rip out later.  Plus, this is part of
the learning process, so why not learn it now?  One site I read said
something like &ldquo;just implement one of the easy ones for now so you can
get back to the fun stuff like kernel dev.&rdquo;  Well, who said this part
wasn&rsquo;t the fun part as well?</p>

<p>What follows is what I&rsquo;ve learned so far.  I just need a place to put
this, really, so that it stops leaking out of my brain.</p>

<h2>FAT</h2>

<p><a href="http://en.wikipedia.org/wiki/File_Allocation_Table">FAT</a> places its <a href="http://en.wikipedia.org/wiki/File_Allocation_Table#Overview">file allocation tables</a> (there are two) at the
beginning of the disk, just after the boot sector and any &ldquo;reserved&rdquo;
sectors.  Each &ldquo;cluster&rdquo; (just a block of space on disk) has an entry in
the FAT that describes whether the cluster is free, used, bad, or a
couple of other things.  Thus, the FAT is essentially a free/used
bitmap.  For a &ldquo;used&rdquo; entry, the value stored is the next cluster in the
file or directory chain, or the special &ldquo;End of Chain&rdquo; cluster to
denote, well, the end of the file or directory chain.  This means that
each file is described as essentially a singly-linked list of clusters.</p>

<p>After the FATs is the Root Directory Entry, which is just a special
&ldquo;directory table&rdquo; describing the root directory of a volume.  It is of
the same format as entries in the Data Region, which contains entries
that describe files and directories; things such as filename, creation
date, and the first cluster in the file or directory are stored here.
 The Data Region follows the Root Directory entry, and contains all
other directories and all files.</p>

<p>So, all of the free/used information is stored at the beginning of the
disk, and all other information is interspersed throughout the rest of
the disk.  This differs from other filesystems like ext{2,3,4} and
UFS/FFS, all of which break the disk into smaller groups of discrete
blocks (&ldquo;block groups&rdquo; in ext2+; &ldquo;cylinder groups&rdquo; in UFS/FFS).</p>

<p>FAT is supposedly one of the easiest filesystems to implement because it
is so simplistic.  However, that simplicity doesn&rsquo;t come without
drawbacks:</p>

<ul>
<li>FAT can&rsquo;t handle UNIX permissions;</li>
<li>FAT fragments easily;</li>
<li>For larger disks, FAT&rsquo;s method of storing file chains as singly-linked
lists becomes inefficient and contributes to less-than-stellar
performance;</li>
<li>Implementing FAT <a href="http://en.wikipedia.org/wiki/File_Allocation_Table#FAT_licensing">may or may not require a license</a> be
purchased from Microsoft (at least, for some of the FAT
implementations, especially concerning long file names).</li>
</ul>


<h2>ext2</h2>

<p>The <a href="http://en.wikipedia.org/wiki/Ext2">Second Extended Filesystem</a> was introduced in 1993 and
replaced the original &ldquo;ext&rdquo; filesystem in Linux, which itself replaced
the Minix filesystem.  It uses a bitmap for free space tracking.  The
ext2 &ldquo;superblock&rdquo; is analogous to (I think) FAT&rsquo;s BIOS Parameter Block /
Extended BPB, and there are copies of the superblock stored in each
&ldquo;block group&rdquo;.  A block group is just a contiguous number of blocks,
each block encompassing one or multiple disk sectors.  A block group
contains the superblock copy, inode information, and a data region.
 Each block group has the same amount of inodes in it.  By dispersing
the inode data into block groups, I think this allows ext2 to locate
similar data (files in the same directory, etc.) close together (see
&ldquo;UFS&rdquo; below).  If they just started allocating space at the start of the
data region, files and directories could be spread out all over the disk
(I guess they still could be) instead of closer together.  The theory is
that if you access a directory, you&rsquo;re probably also going to access one
or more files in that same directory, and by locating the data close
together you can reduce read times.</p>

<p>File block data is represented as a bunch of pointers to the various
blocks used by the file.  There is enough room in the inode structure to
store the first 12 blocks.  Then there is a pointer to what they call an
&ldquo;indirect block&rdquo;, which stores more pointers.  There is also a pointer
to a doubly-indirect block and a trebly-indirect block.  Perhaps you can
make more sense of <a href="http://en.wikipedia.org/wiki/Second_extended_filesystem#Inodes">Wikipedia&rsquo;s diagram</a> than I can, but I
don&rsquo;t fully understand the double- and triple-indirect blocks yet.  That
being said, I haven&rsquo;t started reading the
<a href="http://www.nongnu.org/ext2-doc/ext2.html">ext2 Internal Layout Guide</a> by David Poirier yet, mostly
because it&rsquo;s a 58-page guide describing the guts of ext2 in excruciating
detail.</p>

<h2>FFS/UFS</h2>

<p>The <a href="http://en.wikipedia.org/wiki/Unix_File_System">Unix File System / Fast File System</a> was the original
filesystem used on the *BSDs, and still in use today.  The Berkeley
Fast File System was written by <a href="http://en.wikipedia.org/wiki/Marshall_Kirk_McKusick">Dr. Marshall Kirk McKusick</a>
while still at Berkeley.  He also added &ldquo;soft updates&rdquo; to FFS (a
alternative to journalling) and then revised FFS into FFS2.</p>

<p>Many of the ideas built into ext2 came from FFS, so things might look a
little similar here.  FFS has the idea of &ldquo;cylinder groups&rdquo;, each of
which is a group of inodes and the associated data.</p>

<p>Straight from Wikipedia:</p>

<blockquote><p>Early versions of Unix filesystems were referred to simply as *FS*. FS<br/>only included the boot block, superblock, a clump of inodes, and the<br/>data blocks. This worked well for the small disks early Unixes were<br/>designed for, but as technology advanced and disks got larger, moving<br/>the head back and forth between the clump of inodes and the data blocks<br/>they referred to caused thrashing.  Marshall Kirk McKusick, then<br/>a Berkeley graduate student, optimized this for  4.2BSD&#8217;s FFS (Fast File<br/>System) by inventing cylinder groups. This breaks the disk up into<br/>smaller chunks, each with its own inode clump and data blocks.</p><p>The intent of BSD FFS is to try to localize associated data blocks and<br/>metadata in the same cylinder group; and, ideally, all of the contents<br/>of a directory (both data and metadata for all the files) in the same or<br/>nearby cylinder group, thus reducing fragmentation caused by scattering<br/>a directory&#8217;s contents over a whole disk.</p><footer><strong>&#8220;Unix File System, Hierarchy and Evolution&#8221;</strong> <cite><a href='http://en.wikipedia.org/wiki/Unix_File_System#History_and_evolution'>en.wikipedia.org/wiki/&hellip;</a></cite></footer></blockquote>


<p>I guess that answers my question as to why cylinder/block groups are
used.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Search for a Decent Linux Distribution]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/the-search-for-a-decent-linux-distribution/"/>
    <updated>2011-03-30T17:30:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/the-search-for-a-decent-linux-distribution</id>
    <content type="html"><![CDATA[<p>I&rsquo;ve been using some form of Linux since somewhere during the last half
of 1998.  In that time, I&rsquo;ve used quite a few of the various
distributions that are out there. <a href="http://slackware.com/">Slackware</a> was the first, since it
was the easiest (and cheapest) for us to get via my friend&rsquo;s ISDN line,
since he had to pay per-minute charges (this was in Germany).  Next up
was Red Hat 5.2.  I got the CDs from their booth at <a href="http://www.cebit.de/home">CeBIT</a> &lsquo;99,
apparently on <a href="http://slashdot.org/comments.pl?sid=16610&amp;cid=1969509%22">Thursday, March 18</a> (and no, that&rsquo;s not me).
 Incidentally, this was their first release containing <a href="http://www.gnome.org/">GNOME</a>, before
it was integrated into the distribution as their main window manager; it
was the talk of the booth, and it&rsquo;s also why I definitively know how to
<a href="http://en.wikipedia.org/wiki/GNOME">pronounce GNOME</a>.  After that came <a href="http://www.linuxjournal.com/article/3652">SuSE Linux 6.1</a> (also procured
during the first half of &#8216;99), a 5-CD monster of a distro (for the time)
that included a <a href="http://www.thecrosseroads.net/downloads/images/SuSE_61_Manual.jpg">440-page user manual</a>&mdash;I purchased that for
something like 60 DM at the time.   Once I got back to the States I
think I looked at <a href="http://en.wikipedia.org/wiki/Mandrake_Linux#Table_of_versions">Mandrake Linux</a> (I&rsquo;m guessing somewhere around
version 7.x).  I really like it because it was dead-simple to
configure&mdash;it was like the Ubuntu of today, trying to make it easy and
accessible for newbies to use Linux.</p>

<!--more-->


<p>Fast forward to today.  In the intervening years I&rsquo;ve had the &ldquo;pleasure&rdquo;
of using all of the following distros:  Fedora, Debian,
Mandrake/Mandriva, Gentoo, Ubuntu, Red Hat Enterprise Linux, CentOS,
openSUSE, KNOPPIX, and possibly others; I&rsquo;ve also worked with many of
the various *BSDs (usage level anything from &ldquo;installed it once&rdquo; to
&ldquo;daily driver&rdquo;), <a href="http://hub.opensolaris.org/bin/view/Main/">[Open] Solaris</a> (ugh), <a href="http://www.nexenta.org/">Nexenta</a> (odd variant of
OpenSolaris), and a few other even more random or esoteric
UNIX/UNIX-like systems.</p>

<p>As my pastor would say, I say all that to say this:  I feel like I know
my way around this &ldquo;Linux&rdquo; thing&mdash;not because I&rsquo;ve looked at a ton of
distributions, but because I&rsquo;ve <em>used</em> them.  I&rsquo;m certainly no
<a href="http://www.centos.org/modules/news/article.php?storyid=135">Linux Jedi</a>, and I definitely know where my weaknesses are when it
comes to certain areas of Linux administration, but as a desktop OS, I
can make it &ldquo;go&rdquo; fairly well.</p>

<p>So why is it so hard for me to find a decent distribution of Linux
anymore?</p>

<p>I threw a status update out on Facebook last night noting my frustration
in the matter:</p>

<blockquote><p>&#8220;Can someone suggest a Linux distro that doesn&#8217;t suck? Fedora, openSUSE,<br/>Ubuntu (any flavor, or anything built on it), and Gentoo need not<br/>apply.&#8221;</p></blockquote>


<p>Apparently my &ldquo;friends&rdquo; had the audacity to ask me <strong>why</strong> I didn&rsquo;t like
any of the distros I mentioned, which meant I had to actually figure
that out in order to answer them.  :&ndash;)  It has been a good exercise, and
I&rsquo;m glad they questioned me about it, because it made me sit down and
write a list of what I like and don&rsquo;t like about some of the
distributions I&rsquo;ve tried lately.  At some point I may even sit down and
write a list of things I <em>do </em>want out of a distribution, and see if I
can find one to match what I want.</p>

<p>(Please note that this list does <em>not</em> cover anything related to the
specific desktop manager that the distribution uses by default.  I have
my own gripe list about KDE vs. GNOME, etc.  Also, these are only those
things I could think of today between doing real work.  I can probably
add more to this list&mdash;and will try to&mdash;later on, when my mind is less
befuddled by work.)</p>

<h2>Fedora</h2>

<h3>Advantages:</h3>

<ul>
<li>yum is a pretty decent pkg mgr</li>
<li>distro seems to have mostly-sane defaults</li>
</ul>


<h3>Disadvantages:</h3>

<ul>
<li>yum is not apt (but then, I haven&rsquo;t had to do any of those
&ldquo;totally-crazy-things-you-can-only-do-with-apt&rdquo; things, so this not
really a negative)</li>
<li><code>/etc/sysconfig</code> for configs?  What was wrong with just <code>/etc</code>?</li>
</ul>


<h2>openSUSE</h2>

<h3>Advantages:</h3>

<ul>
<li>none yet</li>
</ul>


<h3>Disadvantages:</h3>

<ul>
<li>package management interfaces aren&rsquo;t consistent between the GUI and
the command-line tools</li>
<li>system configuration is&hellip;odd, to say the least.  On-par with Red
Hat&rsquo;s <code>/etc/sysconfig</code> weirdness</li>
<li>disables consoles when X is running (seriously&hellip;wtf?)</li>
<li>only distro to barf on my <code>~/.xsession</code>, which isn&rsquo;t that exotic</li>
</ul>


<h2>Ubuntu</h2>

<h3>Advantages:</h3>

<ul>
<li>apt pkg mgr is great</li>
</ul>


<h3>Disadvantages:</h3>

<ul>
<li>Canonical.</li>
<li>too many metapackages with too many depencies for stuff I don&rsquo;t want.
 Last time I tried to remove whatever CD-burning GUI utility they
helpfully installed for me, it wanted me to uninstall <em>the entire
GNOME desktop metapackage.</em> Not helpful.</li>
<li><p>Using <code>/etc/alternatives</code> to handle multiple utility providers.  This
is just absurd:</p>

<pre><code>  root@www:~# which mail
  /usr/bin/mail
  root@www:~# file /usr/bin/mail
  /usr/bin/mail: symbolic link to `/etc/alternatives/mail'
  root@www:~# file /etc/alternatives/mail
  /etc/alternatives/mail: symbolic link to `/usr/bin/mail.mailutils'
</code></pre>

<p>  I won&rsquo;t even go into how long it took me to figure out which package I
  needed to install to even <em>get</em> the <code>mail</code> program, but just a word of
  advice:  don&rsquo;t run <code>apt-file search mail</code> unless you have some time on
  your hands.  Other searches are equally useless, like <code>apt-file search
  mail | grep "mail$"</code>, since (as seen above) <code>/usr/bin/mail</code> is actually
  a <em>symlink</em>.</p></li>
</ul>


<h2>Gentoo</h2>

<h3>Advantages:</h3>

<ul>
<li>emerge pkg mgr is decent</li>
<li>I like having such fine-grained control over everything in the system.
 By this I do not mean that I like tweaking the ever-living tar out of
<code>MAKEOPTS</code>, but that I like that there is so much choice in what I can
install.</li>
</ul>


<h3>Disadvantages:</h3>

<ul>
<li>emerge is not apt, and at times can be just down-right scary</li>
<li>source-based&mdash;not necessarily a bad thing, until you consider that&hellip;</li>
<li>compiling updates for three days is not useful</li>
</ul>


<p>That&rsquo;s all I have for now.  If I think of anything else, I&rsquo;ll add it
here.</p>

<p>EDIT (4/1/2011):  Added <code>/etc/alternatives</code> gripe to Ubuntu
disadvantages.  This also goes for Debian.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[MBR: Finally Done(-ish); Second-Stage Choices]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/mbr-finally-done-ish-second-stage-choices/"/>
    <updated>2011-03-27T18:35:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/mbr-finally-done-ish-second-stage-choices</id>
    <content type="html"><![CDATA[<p>There were a few things in the last post that I indicated I still wanted
to get done before calling the MBR &ldquo;done&rdquo; and actually moving on to the
VBR.   Those things were:</p>

<ul>
<li>Validate that the second stage bootloader has the correct signature
(0xAA55) at the end, and bail if it doesn’t;</li>
<li>Take into account BIOSes that don’t support reading via LBA for fixed
disks and booting off of floppies by falling-back to CHS INT 13h
calls;</li>
<li>Reduce the bloat by streamlining boot and error messages, etc.</li>
</ul>


<p>I finally got around to implementing these three things, so the MBR is
done (at least, for now).</p>

<!--more-->


<p><em>(Note:  the repository revision that goes with this post
is <a href="https://www.crosse.org/projects/os/repository/revisions/afc346931ce4a982a2b43a47d9b49e4ad2804b50/show/bootloader">afc34693</a>.  I&rsquo;m going to start including the corresponding
revision hash in posts for posterity&rsquo;s sake, and so that posts are still
relevant even after the code evolves.)</em></p>

<h2>Validate the Boot Signature</h2>

<p>This one was easy:  after reading (what we hope is) the volume boot
record into memory (at 0000:7c00, if you remember), we just check the
word at 0000:7dfe and see if it equals 0xAA55.  Since I have room in the
MBR code, before reading in the VBR sector I set the word at 0000:7dfe
to 0x0000.  The reason for this is because, even though the MBR has been
relocated to 0000:0600, the &ldquo;old&rdquo; code is still in memory at 0000:7c00.
 Thus, the word at 0000:7dfe is already set to the magic value 0xAA55
because it was also present in the MBR at the same location; so if there
was some sort of problem loading the VBR (a.k.a., &ldquo;bug&rdquo;) that wasn&rsquo;t
detected, the MBR will bail instead of jumping back into the MBR again,
creating a loop.</p>

<h2>LBA-to-CHS Conversion</h2>

<p>I have no illusions that writing this bit was the hardest thing I&rsquo;ll do,
but for someone pretty much learning assembly while writing it, writing
the LBA-sector-to Cylinder/Head/Sector conversion code was a pain.
 However, I can now say that, instead of just ripping off a conversion
formula from a wiki somewhere, I actually <em>understand</em> what&rsquo;s going on
now.  I will not get into how to convert an LBA value to its CHS
equivalent here;  if you really need to know how to do it, there are
<a href="http://en.wikipedia.org/wiki/Logical_block_addressing#CHS_conversion">various places</a> to <a href="http://wiki.osdev.org/ATA_in_x86_RealMode_%28BIOS%29#Converting_LBA_to_CHS">find that information</a>, as well
as an <a href="http://homepage2.nifty.com/cars/misc/chs2lba.html">online conversion utility</a> you can use to check your
work.</p>

<h2>Reduce the Bloat!</h2>

<p>Sadly, most of the code I axed&mdash;mainly consisting of some strings used
for debugging and a &ldquo;function&rdquo; to print a value in hex&mdash;was replaced by
the CHS conversion code.  (I don&rsquo;t need them anymore, because I have
since discovered how to debug a VMware virtual machine using remote
gdb&hellip;crazy!) At this point, the actual code in the MBR takes up 394 of
436 usable bytes.   Still&hellip;at least I&rsquo;ve got another 40 bytes to play
with if I need to.</p>

<p>So that means that my master boot record does everything it&rsquo;s supposed
to do right now, and I can begin to focus on the volume boot record.
 Speaking of&hellip;</p>

<h2>Choices to be Made for the Second Stage Loader</h2>

<p>I&rsquo;ve got some choices I need to make about what all this &ldquo;volume boot
loader&rdquo; is going to do versus what the kernel (or a kernel bootstrap
binary) is going to do.  For instance:</p>

<ul>
<li>When do I jump to protected mode?</li>
<li>If I need anything from the BIOS it has to be done in real mode; for
instance, memory maps, video modes, etc.</li>
<li>Speaking of, what <em>do</em> I need from the BIOS?</li>
<li>The only way to load a kernel somewhere other than the first 1MB of
memory (I believe) is to jump to protected- or unreal mode, load the
kernel wherever you want, and then call kmain() (or whatever).
 However, this could also be done with a kernel bootstrap binary.</li>
<li>How do I load the kernel?

<ul>
<li>OpenBSD patches static values describing where the &ldquo;/boot&rdquo; file
(their kernel bootstrap) resides into the VBR whenever you run
<a href="http://www.openbsd.org/cgi-bin/man.cgi?query=installboot&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=i386&amp;format=html">installboot(8)</a></li>
<li>Another option is to use a filesystem simple enough to enable
writing code to dynamically find and load the kernel.  I don&rsquo;t
like this.</li>
</ul>
</li>
</ul>


<p>Actually, I guess that&rsquo;s about it, at least until I figure out I need to
do other stuff.  I kind of thought there was more to that.</p>

<p>Anyway, back to the code&hellip;</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Bootloader: Stage Two!]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/bootloader-stage-two/"/>
    <updated>2011-03-21T23:49:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/bootloader-stage-two</id>
    <content type="html"><![CDATA[<p>The <a href="http://www.thecrosseroads.net/2011/03/bootloader-first-days-progress/">last time we talked</a>, I mentioned the next few steps that
needed to be done in order to get to the stage two.  For those who don&rsquo;t
remember, those steps looked something like this:</p>

<ul>
<li>Find and read the disk&rsquo;s partition table;</li>
<li>Parse each partition entry looking for an &ldquo;active&rdquo; one;</li>
<li>Ensure that only one entry is marked as active;</li>
<li>Discover where that particular partition begins, and load the first
sector of it into memory at 0x7C00;</li>
<li>JMP to 0x7C00 and transfer control to (what is hopefully) the second
stage bootloader.</li>
</ul>


<p>These steps have (finally) been completed!</p>

<!--more-->


<p><img src="http://www.thecrosseroads.net/downloads/images/TestOS_realhardware_boot.jpg" title="Holy crap, it booted—on real hardware, no less" ></p>

<p>So, the Master Boot Record format has been around in the same form since
about 1982, I think (don&rsquo;t quote me on that, though).  The MBR developed
for use by the FAT filesystem (and MS-DOS) by Bill Gates way-back-when
pretty much laid down the minimum criteria for &ldquo;things that an MBR
should do&rdquo;, as well as laid down the layout of the MBR.  For instance,
the partition table for the drive is embedded inside the MBR, starting
at offset 0x01be.  (Incidentally, this means that instead of having a
&ldquo;full&rdquo; 512 bytes of space for code like I thought, it means you actually
get 440 bytes of usable space for code.)  Each partition table entry is
16 bytes long, and there are four entries.  If any of the entries are
not used (for instance, on a disk with only one partition), then the
unused entries are usually filled with all zeroes.</p>

<p>The good thing about this is that in order to find a bootable partition,
all you have to do is examine the byte at 0x01be, see if it&rsquo;s set to
0x80, increment 16 bytes, and do the same thing three more times.  The
rules are thus:</p>

<ul>
<li>Partitions can be marked as active (0x80) or not active (0x00);</li>
<li>If no partitions are marked as active, then die.</li>
<li>If more than one entry is marked as active, the partition table is
invalid&mdash;die.</li>
<li>If any entry&rsquo;s &ldquo;active&rdquo; byte is set to anything other than 0x80 or
0x00, the partition table is invalid&mdash;die.</li>
</ul>


<p>Pretty simple, once you get all the kinks worked out.</p>

<p>Once you find the active partition, the next step is to read the
partition entry&rsquo;s data to find out where the partition starts, and then
load the partition&rsquo;s first sector from disk (some resources say reading
just one sector is a waste of a good interrupt, and that multiple
sectors should be read&mdash;it doesn&rsquo;t harm anything) into memory at address
0000:07C0.  (This, incidentally, is why the first thing an MBR has to do
is relocate itself somewhere else, because it too is initially loaded at
0x7C00.)</p>

<p>This is where it gets a little tricky.  Anyone who has been around Linux
for a while can remember back to when best practice was to always,
<em>always</em>, <strong>always</strong> make sure your kernel was located somewhere below
the first 8GiB of the disk (I hate using the &ldquo;proper&rdquo; terms for binary
powers of bytes&mdash;it just seems weird, but I guess it is also correct. If
I flip-flop between the two, it&rsquo;s probably not intentional).  The reason
for this restriction was because there are two ways to read from a disk:
using <a href="http://en.wikipedia.org/wiki/Cylinder-head-sector">CHS</a> (Cylinder / Head / Sector) or using <a href="http://en.wikipedia.org/wiki/Logical_block_addressing">LBA</a> (Logical Block
Addressing), and not all BIOSes supported using LBA.   When using the
CHS method, the BIOS is limited to reading just about 8GiB of the disk
(well, using &ldquo;logical&rdquo; CHS, not &ldquo;physical&rdquo; CHS, which was limited to
~504MB).  At some point, Western Digital and Phoenix Technologies came
up with the &ldquo;BIOS Enhanced Disk Services&rdquo; (EDD) standard, which added
some extensions to allow the BIOS to read a disk using LBA instead of
CHS.  This allows for quite a bit larger drives to be read (128GiB using
28-bit addressing; 128PiB for 48-bit; and 8ZiB for 64-bit LBA, assuming
512-byte sectors).</p>

<p>The EDD standard has been around since the mid-90s (I believe), so in
theory it&rsquo;s a very rare occurrence nowadays to find a BIOS that doesn&rsquo;t
support reading using LBA.  However, good practice is to test for its
availability and fall-back to using CHS if the extensions aren&rsquo;t
supported.  So far my MBR practices half of that&mdash;the &ldquo;checking&rdquo; part.
If the extensions aren&rsquo;t present, it just bails instead of falling back
to CHS.  (Note:  these will have to work their way in at some point,
because you can&rsquo;t use LBA extensions to boot from a floppy.  Yes, it&rsquo;s
going to support floppies.)  By the way, the interrupt used to read data
from a disk is <a href="http://en.wikipedia.org/wiki/INT_13H">INT 13h</a>, in case you have the need to read a disk in
<a href="http://en.wikipedia.org/wiki/Real_mode">real mode</a> anytime soon.</p>

<p>So, at this point my bootloader does all of this.  There are still a few
things I want to build in, but it&rsquo;s essentially done:  I can read the
partition table, find the active partition, read that partition&rsquo;s first
sector into memory, and pass control to (what is hopefully) the
partition&rsquo;s volume boot record.  Things that I still want to do in the
MBR code:</p>

<ul>
<li>Validate that the second stage bootloader has the correct signature
(0xAA55) at the end, and bail if it doesn&rsquo;t;</li>
<li>Take into account BIOSes that don&rsquo;t support reading via LBA for fixed
disks and booting off of floppies by falling-back to CHS INT13h calls;</li>
<li>Reduce the bloat (never thought I&rsquo;d say that about code with a total
length of 415 <strong>BYTES</strong>) by streamlining boot and error messages, etc.</li>
</ul>


<p>I have a stub of a <a href="https://www.crosse.org/projects/os/repository/revisions/9daaa7ccddbc69e5c361d910991e93111b6b3e32/entry/bootloader/vbr.s%22">volume boot record</a> in my tree at the moment that
just prints out &ldquo;Hello World!&rdquo; just to make sure that I can make the
jump from MBR to VBR.  The VBR also contains the
<a href="http://en.wikipedia.org/wiki/BIOS_parameter_block">BIOS Parameter Block</a> (BPB) and the &ldquo;Extended BPB&rdquo; data structures.
These structures are supposed to &ldquo;[describe] the physical layout of a
data storage volume&rdquo; (from the Wikipedia article for the BPB) and are
mostly used for the FAT and NTFS file systems.  However, that structure
is also present, e.g., in OpenBSD&rsquo;s <a href="http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/i386/stand/biosboot/biosboot.S?rev=1.40;content-type=text%2Fx-cvsweb-markup">biosboot.S</a> boot record with the
following comment:</p>

<pre><code>/*
* BIOS Parameter Block.  Read by many disk utilities.
*
* We would have liked biosboot to go from the superblock to
* the root directory to the inode for /boot, thence to read
* its blocks into memory.
*
* As code and data space is quite tight in the 512-byte
* partition boot sector, we instead get installboot to pass
* us some pre-processed fields.
*
* We would have liked to put these in the BIOS parameter block,
* as that seems to be the right place to put them (it's really
* the equivalent of the superblock for FAT filesystems), but
* caution prevents us.
*
* For now, these fields are either directly in the code (when they
* are used once only) or at the end of this sector.
*
/
</code></pre>

<p>If the OpenBSD guys are hesitant to touch it, then it&rsquo;s probably a good
idea to leave it be.  Also, since rev. 1 of this blessed operating
system will probably run on some flavor of FAT (since I am led to
believe that it&rsquo;s probably the easiest filesystem still in active use to
implement), and since FAT sort of relies on the data in that structure,
it&rsquo;s probably a good idea to keep it in there.</p>

<p>So that&rsquo;s where I&rsquo;m at now, and it pretty much takes care of everything
in the &ldquo;What&rsquo;s Next&rdquo; section of the <a href="http://www.thecrosseroads.net/2011/03/bootloader-first-days-progress/">previous post</a>.  Aside from
the small list of things I want to implement and/or fix in the MBR, I&rsquo;m
well on my way to learning how to do fun things like write a filesystem
driver in assembly in order to load a kernel file from disk.  Actually,
I haven&rsquo;t quite figured out how I&rsquo;m going to work this.  I kind of like
how OpenBSD (and I think MS-DOS) handle kernel bootstrapping.   In
OpenBSD, I think the bootloader loads a file (by getting passed the
location of the file on-disk via the installboot utility) that does the
heavy-lifting.  In MS-DOS, the bootloader loads IO.SYS (the on-disk
location of which I believe is hard-coded into the boot sector code by
the SYS.COM utility) which then bootstraps things.  So, I&rsquo;ll either have
to parse a file system in assembly to find the kernel, or have the
values handed to me.  No wonder everyone seems to choose the latter.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Catching Up]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/catching-up/"/>
    <updated>2011-03-21T17:25:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/catching-up</id>
    <content type="html"><![CDATA[<p>See, this is the boat I didn&rsquo;t want to be in.  I have written anything
down in a few days, and already I&rsquo;m trying to figure out what I want to
write, how much I want to write, and even IF I want to write.  So I&rsquo;m
forcing myself to write something, which (thankfully) isn&rsquo;t too terribly
hard considering I have about three topics I want to write about.  I
just need to sit down and do it.  That&rsquo;s all&mdash;this post is also testing
a post format that WordPress calls an &ldquo;aside&rdquo;, so I figure it doesn&rsquo;t
need to be long.</p>

<!--more-->


<p>(EDIT:  Turns out an &ldquo;aside&rdquo; looks dumb, so this is now a &ldquo;standard&rdquo;
post.   Whatever.)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Bootloader: First Day's Progress]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/bootloader-first-days-progress/"/>
    <updated>2011-03-15T18:01:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/bootloader-first-days-progress</id>
    <content type="html"><![CDATA[<p>So, this post is a day or two late, but I haven&rsquo;t had time to work on it
since then so this is still current information:  I got something to
boot!</p>

<!--more-->


<p>I&rsquo;m keeping my code in a <a href="http://www.crosse.org/projects/os/repository/">Git repository</a>, so I can track changes
and such.  The changelog from <a href="http://www.crosse.org/projects/os/repository/revisions/8544dccc0269b02de59ed608fe7d6083ac568afb">my commit</a> the other night reads:</p>

<pre><code>seth@darwin ~/code/os $ git log -1 8544dcc
 commit 8544dccc0269b02de59ed608fe7d6083ac568afb
 Author: Seth Wright &lt;seth@crosse.org&gt;
 Date:   Mon Mar 14 02:51:05 2011 -0400

     working "prototype" bootloader.

     The code in mbr.s copies itself to another location in memory,
     jumps to that location, then starts executing there.  Right now
     all it does is print a little banner and the current IP, albeit
     backwards.  That was mainly to test whether the code-jump
     actually worked (it does).
</code></pre>

<p>You can <a href="http://www.crosse.org/projects/os/repository/revisions/8544dccc0269b02de59ed608fe7d6083ac568afb/entry/bootloader/mbr.s">view the file</a>, if you care to see ugly x86 assembly.
(Note that &ldquo;IP&rdquo; above means &ldquo;instruction pointer&rdquo;, not &ldquo;internet
protocol&rdquo;.  Just in case you were wondering.)</p>

<p>So what exactly does that get me?  This:</p>

<p><img src="http://www.thecrosseroads.net/downloads/images/TestOS_boots.png" title="MBR v0.01" ></p>

<h2>Background</h2>

<p>When a computer starts (at least, a &ldquo;PC-compatible&rdquo; computer), the BIOS
begins executing.  The last thing it does is look for the first drive
where the boot sector (first 512 bytes of a disk) ends with 0xAA55.
 This is a magic number that tells the BIOS that this disk has a valid
&ldquo;boot sector&rdquo;, or <a href="http://en.wikipedia.org/wiki/Master_boot_record">Master Boot Record</a>.  What it does next is copy the
disk&rsquo;s boot sector to a specific place in memory (<code>0000:7C00</code>, in
segment:offset notation), and then &ldquo;jump&rdquo; to it and start executing
whatever is there.</p>

<p>That&rsquo;s where I am now.  The BIOS hands control to the compiled code in
my <a href="http://www.crosse.org/projects/os/repository/revisions/8544dccc0269b02de59ed608fe7d6083ac568afb/entry/bootloader/mbr.s">mbr.s</a> file, and the result of it running is what you see up
above.  Not very shiny or exciting to look at, but let me tell
you: after spending multiple hours</p>

<ul>
<li>writing code;</li>
<li>testing;</li>
<li>seeing <strong>nothing</strong> on the screen;</li>
<li>rewriting code;</li>
<li>testing;</li>
<li>seeing ten thousand &ldquo;Þ&rdquo; characters echoed onto the screen;</li>
<li>re-rewriting code;</li>
<li>etc.;</li>
</ul>


<p>when you actually see what you told it to print, it&rsquo;s a pretty nice
feeling.</p>

<h2>What It Does</h2>

<p>When the BIOS jumps to the boot loader, the first thing it does is copy
itself to another location in memory.  For simplicity&rsquo;s sake (and
because I&rsquo;m not totally aware of the consequences of picking another
location yet), I chose to have it copy itself to the same location that
one of Microsoft&rsquo;s <a href="http://starman.vertcomp.com/asm/mbr/STDMBR.htm">early MBRs used</a>.  (By the way, using that
page is fairly difficult, since I want to see how they did things but
also don&rsquo;t want to rip off their code, obviously.  I have to take quick
glances to get the gist of what&rsquo;s going on, then try to do it myself.)</p>

<p>After that, it &ldquo;jumps&rdquo; down to where it copied itself and resumes
executing.  The rest of the code is to make it print the banner, then
get and print the instruction pointer to verify that it actually <strong>did</strong>
jump correctly; had it not, instead of displaying &ldquo;426&rdquo; above&mdash;which is
the string-reversed memory location 0x0624&mdash;it would have shown &ldquo;42C7&rdquo;,
denoting memory location 0x07C24.  Once it&rsquo;s done there, it jumps into a
never-ending loop.</p>

<h2>What&rsquo;s Next</h2>

<p>Next up on the agenda is to have the MBR code read the disk&rsquo;s partition
table, searching for an active partition.  If it doesn&rsquo;t find one, it
should bail.  If it does, it will load that partition&rsquo;s first sector
(the <a href="http://en.wikipedia.org/wiki/Volume_boot_record">Volume Boot Record</a>; or more likely, the first sector of the
VBR) into the memory location 0x7C00 (the one we just vacated), and jump
there.  If you&rsquo;ve ever heard of <em><a href="http://en.wikipedia.org/wiki/Chainload">chainloading</a></em>, that&rsquo;s what this is.
Load a boot sector, relocate, find another boot sector, relocate, etc.</p>

<p>After that, work on the second stage bootloader begins, which will be
what actually loads the (currently non-existent) kernel.</p>

<h2>Closing Remarks</h2>

<p>This is actually more fun than I thought it would be, and I think part
of the reason for that is because I&rsquo;m writing about it as it happens.  I
get to explain what is going on, why it&rsquo;s going on, and where it&rsquo;s
going, which I think helps me understand all three of those points
better.  Plus, I find a lot of the arcane knowledge about the early days
of computing to be quite interesting.  (Case in point:  the blog
referenced at the bottom of Wikipedia&rsquo;s article on a CPU
<a href="http://en.wikipedia.org/wiki/Triple_fault">triple-fault</a>.  Very clever idea!)</p>

<p>That&rsquo;s all for now; hopefully I&rsquo;ll have more to report in the next day
or two.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[OS Design Questions and Initial Steps]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/os-design-questions-and-initial-steps/"/>
    <updated>2011-03-13T16:58:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/os-design-questions-and-initial-steps</id>
    <content type="html"><![CDATA[<p>A much as I want to just jump in and start writing a bootloader, I know
that I need to at least make a cursory attempt at some design decisions
first.   After reading <a href="http://www.osdever.net/tutorials/view/os-design">a thread on OS design</a> archived by the site
<a href="http://www.osdever.net/">osdever.net</a>, it seems that I have more decisions to make than I
first realized.  Well, that&rsquo;s what this project is about (learning, that
is), so let&rsquo;s make a list of some design decisions that will need to be
addressed (I&rsquo;ll update the post when I make a decision on some of
these).</p>

<!--more-->


<ul>
<li>How will this thing boot (i.e, how much will the bootloader do)?

<ul>
<li>MBR &mdash;> VBR &mdash;> kernel?</li>
<li>MBR straight to kernel?</li>
<li>When to switch to protected mode&mdash;in the bootloader or let the
kernel handle it?</li>
</ul>
</li>
<li>What kind of memory model should I use?

<ul>
<li>Segmentation—Apparently not very portable</li>
<li>Paging—Flat memory model, neater, more portable</li>
</ul>
</li>
<li>Where will the kernel get loaded in memory?</li>
<li>Does each process get its own address space?  <em>(sounds like a
no-brainer)</em></li>
<li>Virtual memory?

<ul>
<li>???</li>
</ul>
</li>
<li>Multi-tasking/Threading?

<ul>
<li>At this point I don&rsquo;t think there&rsquo;s a reason to even consider not
doing multi-tasking; so, yes, please.  However, as if the rest of
this didn&rsquo;t scare me enough, for some reason this bullet point
frightens me.</li>
</ul>
</li>
<li>Build in locking and synchronization from the start</li>
<li>What sort of process model will I use?

<ul>
<li>I don&rsquo;t even know where to start on this one</li>
</ul>
</li>
<li>How will I handle system calls?

<ul>
<li>Linux uses software interrupts (or did in 2003&hellip;ah, the joys of
8-year-old articles)</li>
<li>No idea how Windows handles system calls</li>
</ul>
</li>
<li>How should IPC be done?

<ul>
<li>From the article:  <em>&ldquo;Message ports? Named pipes? Queues?
Local sockets? All of the above?&rdquo;</em></li>
</ul>
</li>
<li>Networking?

<ul>
<li>Probably not immediately important, but should be considered
fairly early-on anyway</li>
</ul>
</li>
<li>Which file system should I use?

<ul>
<li>Probably use FAT32 in the beginning, since the FATs seem to be
some of the easier file systems to support</li>
<li>FFS?  ext2/&frac34;?  Probably waaaay down the road.</li>
<li>Write my own?  Even farther down the road, if at all</li>
</ul>
</li>
<li>Security

<ul>
<li>I doubt that <code>#include &lt;securemysystem.h&gt;</code> would work</li>
<li>Everything should be built with security in mind—whatever the heck
that actually means</li>
</ul>
</li>
</ul>


<p>List number next is the short-list of things that need to happen, and a
crude outline of when they should happen:</p>

<ul>
<li>Get my development environment set up

<ul>
<li>A GCC cross-compiler is apparently the way to go

<ul>
<li><a href="http://wiki.osdev.org/Why_do_I_need_a_Cross_Compiler%3F">Why do I need a Cross Compiler?</a></li>
<li><a href="http://wiki.osdev.org/GCC_Cross-Compiler">GCC Cross-Compiler</a></li>
<li><a href="http://wiki.osdev.org/GCC_Cross-Compiler_for_x86_64">GCC Cross-Compiler for x86_64</a></li>
</ul>
</li>
</ul>
</li>
<li>Bootstrap this bad boy.  Write a bootloader.  Probably a two-parter:

<ul>
<li>MBR that the BIOS will jump to, which will look for an active boot
partition, and then jump to the&hellip;</li>
<li>VBR that does some basic setup, then finds and loads the kernel.</li>
<li>No, I don&rsquo;t want to use GRUB.  That would be cheating if I want to
learn how things work.</li>
</ul>
</li>
<li>Write some kernel library functions to do things that the C library
would normally handle for userland applications (printf(), malloc(),
str*(), assert(), panic(), etc.)</li>
<li>Paraphrasing something I read recently:  <em>&ldquo;when writing a kernel, if
you #include anything that you didn&rsquo;t write yourself (like
<code>stdlib.h</code>), you&rsquo;re already doing it wrong.&rdquo;</em></li>
<li>Write a rudimentary console driver.</li>
<li>Write what will become the idle thread.</li>
<li>Get trap handling working

<ul>
<li>Article suggests that dumping state, then panicking the kernel is
a good place to start</li>
</ul>
</li>
<li>Get interrupt handling working</li>
<li>Write a handler for the timer interrupt.</li>
</ul>


<p>Wow, those are pretty lengthy lists.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Random Thoughts, Day Two]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/random-thoughts-day-two/"/>
    <updated>2011-03-13T15:31:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/random-thoughts-day-two</id>
    <content type="html"><![CDATA[<p><a href="http://www.thecrosseroads.net/2011/03/sigh/">Last post</a> I mentioned that I have a fair amount of projects rattling
around in my head.  What I think I&rsquo;m going to do is start to write down
my thoughts on these projects here, which should serve to do two things:
first, it will give me something to write about; and second, it will
give me a place for &ldquo;brain dumps&rdquo; every now and then, so that I can
refer back to them myself.</p>

<!--more-->


<p>Not having an &ldquo;office&rdquo; at home is really not working out for me.  I&rsquo;d
love to have a whiteboard where I can sketch out things, or put little
reminders, or thoughts that I have.  It&rsquo;d also be great to have a desk
again, with a real work area, instead of just sitting on my couch.
Anyway, perhaps jotting down my progress on projects here will make up
for this deficiency (at least a little).</p>

<p>So, I have some projects.  Well, &ldquo;projects&rdquo; may be too strong of a word
to use for some of them, but the point still stands:</p>

<ul>
<li>I have an <a href="http://www.arduino.cc/">Arduino</a> and various parts to do
nifty electronical things;</li>
<li>I have a ton of books to read;</li>
<li>I have three or four video games that need to be started and/or
finished;</li>
<li>I have had the idea to build an
<a href="http://en.wikipedia.org/wiki/Simple_Network_Paging_Protocol">SNPP</a>
server application for a while (with hopes of it being able one day to
replace the absolutely terrible application we use at work);</li>
<li>I want to learn Ruby on Rails;</li>
<li>I want to learn how to program in Objective-C;</li>
<li>I want to build an ASP.NET front-end to some PowerShell scripts we use
at work for Exchange administration;</li>
<li>I want to learn more about how operating systems function by writing
my own.</li>
</ul>


<p>That last one is the one that is at the forefront of my mind at the
moment, mainly because it&rsquo;s the last project idea that got pushed onto
my brain&rsquo;s stack.  I love learning new things, especially about
computers and how they work&mdash;it&rsquo;s why I&rsquo;m in the field I&rsquo;m in.  Yes, I&rsquo;m
aware that writing an operating system is a monumental undertaking.
Yes, I know that most projects to write an OS never come to fruition.
I&rsquo;m not looking for this to be something anyone else uses; its sole
purpose would be for me to learn how things work under the hood by doing
it myself.  I can read <a href="http://www.openbsd.org/cgi-bin/cvsweb/src/sys/">existing code</a> all day until I&rsquo;m bleary-eyed,
but (as stated last in the last post) I tend to skim things nowadays and
not fully grasp whatever I&rsquo;m reading.  By doing it myself I hope to gain
a deeper understanding of what exactly is going on.</p>

<p>Of course, this desire may only last another week; who knows.  But at
least it gives me something to write about.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Sigh]]></title>
    <link href="http://www.thecrosseroads.net/2011/03/sigh/"/>
    <updated>2011-03-12T16:24:00-05:00</updated>
    <id>http://www.thecrosseroads.net/2011/03/sigh</id>
    <content type="html"><![CDATA[<p>Well, I give up on doing anything useful with this blog thing.  The
problem is, I don&rsquo;t just want to delete it, for reasons that I can&rsquo;t
really understand.  I&rsquo;ve thought about using it for things I want to
write that would turn out longer than a Facebook status update should
be, and for stuff I don&rsquo;t really care if anyone else ever reads; but
that never seems to come to fruition.</p>

<p>The problem is, I don&rsquo;t ever think I have time (or set aside time) to
just sit down and write.  I always feel like I could be doing other
things, more productive things.  I&rsquo;m the same way with reading articles
online, too.  I feel like I&rsquo;m wasting time by reading because I could be
doing such-and-such or working on this problem or whatnot.  So what has
happened is I&rsquo;ve learned to skim articles, albeit very badly, and I
never remember enough of any one thing for it to be useful to me unless
I have an internet connection to look up &ldquo;the rest of the story.&rdquo;</p>

<!--more-->


<p>I would really like to rectify this situation, but I am unsure of how to
start.  I see this sort of &ldquo;don&rsquo;t have time for reading/writing&rdquo;
mentality growing in my life, and I don&rsquo;t like it.  Way back when I was
still in school, I loved reading.  LOVED it.  And I made time for it.  I
didn&rsquo;t necessarily love writing, and I guess I never have, but I&rsquo;ve
always wanted to keep a journal or something similar.  Perhaps it&rsquo;s time
for me to change some things, shuffle some priorities.</p>

<p>On a related note, I seem to be racking up project after project without
finishing them&mdash;much less starting them, half the time.  I have a bunch
of parts for an Arduino that I got last year because I wanted to fiddle
with electronics.  I have a patch sitting on my Desktop for the OpenBSD
C library.  I have a bunch of video games that are half-played, if at
all.  I have upwards of 20 or 30 books that are staring at me, pleading
&ldquo;read me?&rdquo; And at the end of the day, I wonder just what I did to
accomplish so little.  Perhaps if I start jotting down my thoughts every
so often here I can have something to look back on later, to sort of
keep me accountable for the things I want to do but don&rsquo;t.  I don&rsquo;t want
to be a workaholic; I want to have my own hobbies, even if they closely
resemble the things I do at my job.  The difference is that these
projects and hobbies are for ME, and no one else.  I need things like
that.</p>

<p>So, let&rsquo;s see:  I need to learn to read with understanding again; I need
to start writing more; I need to learn how to have a hobby again; I need
relearn (learn?) time management.  Piece of cake.  Maybe if I approach
the blog thing as something for me, and me alone (while still being
public, so don&rsquo;t expect me to plunge the depths of my heart here) I&rsquo;ll
be more apt to write.  Plus, writing is therapeutic, right?</p>

<p>That&rsquo;s all for now.  Seth, when you read this next, don&rsquo;t roll your eyes
and say, &ldquo;well THAT was stupid.&rdquo;  You need this, you know you do.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Dealing With Email Phishing Attacks, Part I]]></title>
    <link href="http://www.thecrosseroads.net/2010/05/dealing-with-email-phishing-attacks-part-i/"/>
    <updated>2010-05-20T22:54:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2010/05/dealing-with-email-phishing-attacks-part-i</id>
    <content type="html"><![CDATA[<p>Institutions of higher education seem to attract quite a bit of
attention in the way of email <a href="http://en.wikipedia.org/wiki/Phishing">phishing attacks</a>.  I&#8217;m  fairly sure
other types of institutions get with with phishing attacks as well, but
since I work for a university, that&rsquo;s the pool I happen to play in and
the one I know best.  Everyone knows how they work:  a user gets an
email from a phisher about a supposed &ldquo;webmail upgrade&rdquo; / &ldquo;over-quota
event&rdquo; / &ldquo;we&rsquo;re cleaning old mailboxes&rdquo; / whatever, and if the user
wants to continue using the email services provided by <insert
most-likely-misspelled institution name here>, then the user must
respond back with their username and password.  If the user responds,
the phisher now has another email account which they can use to send
SPAM, more phishing attacks, etc.  More importantly, now the phisher
most likely  has a login to the institution&rsquo;s VPN, the user&rsquo;s account
information (if there is a central &ldquo;accounts portal&rdquo;), and any access to
confidential information that the user may have access to (with
Exchange, that would of course include the user&rsquo;s calendar and
contacts).  This is what&rsquo;s known in the business as a &ldquo;problem&rdquo;.</p>

<!--more-->


<p>You wouldn&rsquo;t believe how many people fall for these attacks, or are
unsure enough that they send them to abuse@ and ask if they really
should provide their account information.  Fortunately there are a few
things that can help counteract these types of emails.</p>

<p>First things first (and this is basic email administration 101):  <strong>you
should be running some sort of antivirus and antispam product(s) on your
edge SMTP devices</strong>.  If you&rsquo;re not, then you probably need to step back
from administering mail servers and let someone else handle it.  There
are many products out there for antivirus / antispam; since we&rsquo;re an
Exchange shop now and we get the product essentially for free with one
of our campus agreements, we use
<a href="http://www.microsoft.com/forefront/protection-for-exchange/en/us/default.aspx">Forefront Protection 2010 for Exchange Server</a> (FPE).  I
particularly like this product, as it is maintainable via PowerShell,
which I pretty much live in at this point to manage Exchange 2007, so
it&rsquo;s nice to be able to manage FPE this way as well.  The new Forefront
<a href="http://en.wikipedia.org/wiki/DNSBL">DNSBL</a> included with FPE is also quite good.</p>

<p>Unfortunately, phishing attacks seem to evolve faster than antispam
engines can update and counteract them.  Anyone who has managed a mail
server for any length of time knows that <strong>there is no &ldquo;antispam silver
bullet&rdquo;</strong>.  Everyone has a configuration that works well for them, yet I
can almost guarantee that no two configurations of e.g.
<a href="http://spamassassin.apache.org/">SpamAssassin</a> look alike, and <strong>not one of them will provide 100%
coverage</strong>.  That&rsquo;s just the way it is; you can only hope to maximize
legitimate rejections and minimize false positives and negatives.</p>

<p>Outside of that, there are other projects that aim to minimize the
effect of phishing emails in some capacity.  Some will try to reject
incoming attacks during the SMTP conversation; others are marketed as
only trying to identify potential responses to phishing messages.  The
<a href="http://code.google.com/p/anti-phishing-email-reply/">anti-phishing-email-reply</a> project is one that aims to
<em>&ldquo;&hellip;maintain a list of accounts that are being used (or have been
used) in the reply-to address of phishing campaigns&rdquo;</em> and is recommended
to be used to <em>&ldquo;&hellip;actively block outgoing smtp submissions destined for
these accounts&rdquo;</em>.</p>

<p>I have been using the aper list for about nine months now (as of this
post).  In the beginning I was only prepending the text &ldquo;[POSSIBLE
PHISHING ATTEMPT]&rdquo; to a message&rsquo;s Subject header if it came from an
address on the aper list, but would still deliver the message to the
user&rsquo;s mailbox.  Even then we had a few users reply to the messages, and
many other users would just forward the message to abuse@ in case we
hadn&rsquo;t seen it (thanks, but did you even read the subject line?).  At
some point I got tired of having to wade through all of the forwarded
&ldquo;[POSSIBLE PHISHING ATTEMPT]&rdquo; emails (since users didn&rsquo;t seem to read
the subject line anyway) and started redirecting the messages to a
quarantine mailbox instead of delivering it to the user.  This worked
out well enough&mdash;at least, to date no one has complained about missing
emails that can be directly attributed to this action.  (Note that this
is <em>not</em> true to the original  intended purpose of the aper list, which
is only to block <em>outgoing replies</em> to phishing messages.  Still, I
believe many institutions do exactly the same thing.)</p>

<p>However, with the scenario above my edge transports still had to expend 
resources to process the potential phishing messages (bandwidth, CPU and
memory to run antivirus/antispam, IP checks, etc.) and send it on to one
of the hub transports, which then has to process every single message
against a couple of transport rules (one to detect incoming phishing
messages, and one to detect possible phishing replies).  The phishing
attacks kept coming, and basically I felt that we were having to do all
the work and the remote phisher (or zombie computer, or hacked email
account, etc.) wasn&rsquo;t being penalized at all.  I decided that needed to
stop.</p>

<p>My current solution is a <a href="http://msdn.microsoft.com/en-us/library/bb204097%28v=EXCHG.80%29.aspx">custom transport agent</a> (written in C#) that
integrates into the transport pipeline on each of our edge transport
servers.  The agent will (re)read a local copy of the
<a href="http://aper.svn.sourceforge.net/viewvc/aper/phishing_reply_addresses">phishing_reply_addresses</a> file periodically and build an in-memory
array of addresses to block.  The agent has hooks into various parts of
the SMTP conversation.  It will first <a href="http://en.wikipedia.org/wiki/Tarpit_(networking)">tarpit</a> the connection, then
outright reject it (with a <em>&ldquo;550 5.7.1 Address is listed on the
anti-phishing-email-reply&rdquo;</em> message) if any one of the following
contains an address on the aper list:</p>

<ul>
<li>MAIL</li>
<li>RCPT</li>
<li>From header</li>
<li>Reply-To header</li>
</ul>


<p>This will catch both inbound messages and outbound replies, and the edge
transports don&rsquo;t have to spend very much time at all on processing the
message.  It also logs its actions using the amazingly flexible
<a href="http://logging.apache.org/log4net/">log4net</a> logging framework, so the email administrator (that&rsquo;s me)
can decide exactly which events they want to log, and how they want to
see them (event log, logfile, email&hellip;).</p>

<p>In conclusion, there are many methods an email administrator can use to
combat email phishing attempts.  None of them are foolproof, and in fact
most are reactive instead of proactive.  This is true of the
anti-phishing-email-reply list as well:  it relies on mail
administrators to maintain and update the list, and is not effective
against &ldquo;zero-day&rdquo; phishing exploits.  However, it can still be an
invaluable tool.</p>

<p>(I will be following this post up with another couple of posts about
both methods I have used to integrate the aper list with Exchange.  I
find that my solutions are a little more elegant than the example
scripts in the aper repository.  I will update this post with links to
the other posts once they are finished.)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[State of the Crosseroads, as It Were]]></title>
    <link href="http://www.thecrosseroads.net/2010/05/state-of-the-crosseroads-as-it-were/"/>
    <updated>2010-05-08T20:07:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2010/05/state-of-the-crosseroads-as-it-were</id>
    <content type="html"><![CDATA[<p>I was told the other day that I don&rsquo;t update this site often enough.
Either the people who told me that were playing a mean joke on me, or
they actually cared about what I was writing.  (At this point I&rsquo;m going
with somewhere in-between, leaning more towards the former.)  Either
way, it got me to thinking.  Could I update more often?  Probably.  Do I
have enough interesting things to write about?  Depends on what your
definition of &ldquo;interesting&rdquo; is, I guess.</p>

<!--more-->


<p>When I started this experiment, it was solely going to be used for techy
things and not for cataloguing the minutiae of my day.  I still want to
maintain that to a large degree&mdash;at least I don&rsquo;t want this to become my
dumping ground for any rant or rave that travels through my head.</p>

<p>The moral of the story:  look for more posts from me in the future.
Between working as an Exchange administrator by day and playing with
OpenBSD after hours, I can probably whip up a few more articles
about&hellip;well, something-or-other.</p>

<p>Seth</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Updating the ALIX to OpenBSD 4.5]]></title>
    <link href="http://www.thecrosseroads.net/2009/07/updating-the-alix-to-openbsd-4-5/"/>
    <updated>2009-07-05T15:11:00-04:00</updated>
    <id>http://www.thecrosseroads.net/2009/07/updating-the-alix-to-openbsd-4-5</id>
    <content type="html"><![CDATA[<p>With the release of OpenBSD 4.5, it was time to upgrade the home router
(the alix6b2 from <a href="http://www.thecrosseroads.net/2008/12/the-alix-firewall-project/">another post</a>).  The OpenBSD
<a href="http://www.openbsd.org/faq/upgrade45.html">Upgrade Guide</a> for 4.5 details a nice way to do the upgrade without
having to have console access which I thought I&rsquo;d try out as well, since
I couldn&rsquo;t find my serial cable and decided that if things went awry I
could always scrounge for a serial cable and redo it.  (Note from the
upgrade documentation:  <em>This is NOT the recommended process. Use the
install kernel method if at all possible!</em>)</p>

<!--more-->


<p>The following process assumes that you are following the
<a href="http://www.openbsd.org/faq/upgrade45.html">&ldquo;OpenBSD Upgrade Guide 4.5&rdquo;</a>.  If you get lost, refer
back to that document for more information.  I will be detailing the
process for &ldquo;Upgrading without install kernel&rdquo; on that page.</p>

<h2>Place install files in a &ldquo;good&rdquo; location</h2>

<p>The first order of business is to <em>Place install files in a &ldquo;good&rdquo;
location</em>.  For me, this meant downloading the install45.iso from my
mirror of choice (purchase of the CD set is forthcoming), mounting it on
my PowerBook, and copying all of the *.tgz files and the kernel (<code>bsd</code>)
to the ALIX:</p>

<pre><code>seth@gandalf /Volumes/OpenBSD:i386    4.5 Install CD/4.5/i386 $ scp *.tgz root@fw:/usr/rel
root@fw's password:
base45.tgz                                                        100%   46MB   5.7MB/s   00:08
comp45.tgz                                                        100%   86MB   6.1MB/s   00:14
etc45.tgz                                                         100%  501KB 501.0KB/s   00:00
game45.tgz                                                        100% 2556KB   2.5MB/s   00:01
man45.tgz                                                         100% 8032KB   7.8MB/s   00:01
misc45.tgz                                                        100% 2866KB   2.8MB/s   00:00
xbase45.tgz                                                       100% 9762KB   9.5MB/s   00:01
xetc45.tgz                                                        100%   73KB  73.5KB/s   00:00
xfont45.tgz                                                       100%   34MB   5.7MB/s   00:06
xserv45.tgz                                                       100%   19MB   6.3MB/s   00:03
xshare45.tgz                                                      100% 2698KB   2.6MB/s   00:00
seth@gandalf /Volumes/OpenBSD:i386    4.5 Install CD/4.5/i386 $ scp bsd root@fw:/usr/rel
root@fw's password:
bsd                                                               100% 6539KB   6.4MB/s   00:01
seth@gandalf /Volumes/OpenBSD:i386    4.5 Install CD/4.5/i386 $ scp bsd.rd root@fw:/usr/rel
root@fw's password:
bsd.rd                                                            100% 5462KB   5.3MB/s   00:01    
</code></pre>

<p>(Note that I&rsquo;m following the guide&rsquo;s convention of putting all the
release files in <code>/usr/rel</code>.)  Now, on to step two:</p>

<h2>Stop any appropriate applications</h2>

<p>For me, this included editing <code>/etc/rc.conf/local</code> to disable the few
services running on the box:</p>

<pre><code># cat /etc/rc.conf.local
#ntpd_flags=            # enabled during install
#pf=YES                 # enable pf
#rtadvd_flags="vr1"     # IPv6 Router Advertisement Daemon
#ftpproxy_flags=""      # for ftp-proxy rules in pf
</code></pre>

<p>These will be re-enabled later on.</p>

<h2>Check the kernel</h2>

<p>The third step was something that I did not have to worry about, since I
had not made any changes to the kernel.  However, if you have made any
kernel changes (either via <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=config&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=i386&amp;format=html">config(8)</a> or otherwise), make sure you
read this particular section of the guide.</p>

<h2>Install new kernel(s)</h2>

<p>This step is easy; just cut and paste the lines from the guide into your
SSH session:</p>

<pre><code># rm /obsd
rm: /obsd: No such file or directory
# ln /bsd /obsd
# cp bsd /nbsd
# mv /nbsd /bsd
</code></pre>

<h2>Remove old X modules</h2>

<p>Another easy one:</p>

<pre><code># rm -rf /usr/X11R6/lib/modules/*
</code></pre>

<h2>Save yourself a copy of the old reboot(1) command</h2>

<p>For an explanation why you&rsquo;d want to do this, see the guide:</p>

<pre><code># cp /sbin/reboot /sbin/oreboot
</code></pre>

<h2>Install new userland applications</h2>

<p>This will update all (most?) of your userland.  Obviously any packages
you installed outside of the base system will need to be upgraded as
well (see below).</p>

<pre><code># tar -C / -xzphf comp45.tgz
# tar -C / -xzphf game45.tgz
# tar -C / -xzphf man45.tgz
# tar -C / -xzphf misc45.tgz
# tar -C / -xzphf xbase45.tgz
# tar -C / -xzphf xfont45.tgz
# tar -C / -xzphf xserv45.tgz
# tar -C / -xzphf xshare45.tgz
# tar -C / -xzphf base45.tgz
# /sbin/oreboot
Connection to fw closed by remote host.
Connection to fw closed.
</code></pre>

<p>At this point, wait for the device to reboot (hopefully if you&rsquo;ve done
everything correct you <strong>won&rsquo;t</strong> be crossing your fingers&hellip;).</p>

<pre><code>seth@gandalf ~ $ ssh fw
seth@fw's password:
Last login: Sun May  3 14:43:41 2009 from [somewhere]
OpenBSD 4.5 (GENERIC) #1749: Sat Feb 28 14:51:18 MST 2009

Welcome to OpenBSD: The proactively secure Unix-like operating system.

Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
version of the code.  With bug reports, please try to ensure that
enough information to reproduce the problem is enclosed, and if a
known fix for it exists, include that as well.

$ su -
Password:
Terminal type? [xterm-color]
#
</code></pre>

<p>Sweet.  On to the next step.</p>

<h2>Upgrade /dev</h2>

<p>The installation of base45.tgz copied over the latest version of the
MAKEDEV script, so run that now:</p>

<pre><code># cd /dev
# ./MAKEDEV all
</code></pre>

<p>This concludes the section of the guide on how to upgrade without the
install kernel.  The rest of this post covers the &ldquo;Final Steps&rdquo; section
of the upgrade guide.  As such, it should be fairly straight-forward and
therefore I won&rsquo;t comment on everything like I did above.</p>

<h2>New Users and Groups</h2>

<p>Add the Bluetooth user:</p>

<pre><code># useradd -u94 -g=uid -c"Bluetooth Daemon" -d/var/empty -s/sbin/nologin _btd
</code></pre>

<h2>Upgrading /etc</h2>

<pre><code># export RELEASEPATH=/usr/rel
# tar -C /tmp -xzphf ${RELEASEPATH}/etc45.tgz
# cd /tmp/etc
# cp netstart rc rc.conf services /etc
# cp afs/CellServDB /etc/afs
# cp mtree/* /etc/mtree
# cp mail/README mail/submit.cf /etc/mail
# cp ../var/named/etc/root.hint ../var/named/etc/named-*.conf /var/named/etc
# cp ../var/named/etc/named.conf /var/named/etc/
# cd /
</code></pre>

<h2>Merging locally changed files via a patch file</h2>

<pre><code># pfctl -f /etc/pf.conf -e
pf enabled
# ftp http://www.openbsd.org/faq/upgrade45.patch
Trying 129.128.5.191...
Requesting http://www.openbsd.org/faq/upgrade45.patch
100% |**********************************************************************|  2694       00:00
Successfully retrieved file.
# patch -C -p0 &lt; upgrade45.patch
[snip lots of successful patches]

# newaliases
/etc/mail/aliases: 49 aliases, longest 15 bytes, 709 bytes total
# mtree -qdef /etc/mtree/4.4BSD.dist -p / -u
</code></pre>

<h2>Merging locally changed files via <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=sysmerge&amp;apropos=0&amp;sektion=0&amp;manpath=OpenBSD+Current&amp;arch=i386&amp;format=html">sysmerge(8)</a></h2>

<pre><code># sysmerge -as $RELEASEPATH/etc45.tgz -x $RELEASEPATH/xetc45.tgz
===&gt; Creating and populating temporary root under
    /var/tmp/sysmerge.GWPAg/temproot
===&gt; Starting comparison
[stuff happened]
===&gt; Comparison complete
===&gt; Making sure your directory hierarchy has correct perms, running mtree...
===&gt; Automatically installed file(s) listed in
    /var/tmp/sysmerge.GWPAg/auto_installed_files
===&gt; Backup of replaced file(s) can be found under
    /var/tmp/sysmerge.GWPAg/backups
===&gt; When done, /var/tmp/sysmerge.GWPAg and its subdirectories should be removed
</code></pre>

<h2>Upgrading packages</h2>

<pre><code># export PKG_PATH=http://carroll.cac.psu.edu/pub/OpenBSD/4.5/packages/i386/
# pkg_add -ui -F update -F updatedepends
Candidates for updating gettext-0.17 -&gt; gettext-0.17p0
Candidates for updating libiconv-1.12 -&gt; libiconv-1.12
Candidates for updating vim-7.1.315-no_x11 -&gt; vim-7.2.77-no_x11
Candidates for updating wget-1.11.3 -&gt; wget-1.11.4
Looking for updates: complete
Running the equivalent of pkg_add -r gettext-0.17p0 libiconv-1.12 vim-7.2.77-no_x11 wget-1.11.4
libiconv-1.12 (extracting): complete
libiconv-1.12 (deleting): complete
libiconv-1.12 (installing): complete
gettext-0.17p0 (extracting): complete
gettext-0.17 (deleting): complete
gettext-0.17p0 (installing): complete
vim-7.2.77-no_x11 (extracting): complete
vim-7.1.315-no_x11 (deleting): complete
vim-7.2.77-no_x11 (installing): complete
wget-1.11.4 (extracting): complete
wget-1.11.3 (deleting): complete
wget-1.11.4 (installing): complete
Clean shared items: complete
</code></pre>

<p>At this point, you should be able to re-enable any disabled services,
and reboot.  The upgrade is finished!</p>
]]></content>
  </entry>
  
</feed>
