<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>endot &#187; Computers</title>
	<atom:link href="http://endot.org/category/computers/feed/" rel="self" type="application/rss+xml" />
	<link>http://endot.org</link>
	<description>random seepage from the brain of a geek</description>
	<lastBuildDate>Fri, 03 Sep 2010 01:45:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Really Groking Git</title>
		<link>http://endot.org/2010/09/01/really-groking-git/</link>
		<comments>http://endot.org/2010/09/01/really-groking-git/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 07:04:15 +0000</pubDate>
		<dc:creator>nate</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://endot.org/?p=174</guid>
		<description><![CDATA[I&#8217;ve been using git for a while now, and I&#8217;m just getting to the point where I can think in it. It&#8217;s the same as learning a new spoken language.  I took three years of Spanish in high school, so I knew most of the rules and could translate back and forth to English, but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using git for a while now, and I&#8217;m just getting to the point where I can think in it.</p>
<p>It&#8217;s the same as learning a new spoken language.  I took three years of Spanish in high school, so I knew most of the rules and could translate back and forth to English, but I never really learned to think in Spanish (as opposed to thinking in English and then quickly translating).  And, until you start thinking in Spanish, you are not on the path to full fluency and you&#8217;ll be constantly hampered whenever you try to talk with a native speaker.</p>
<p>I came to git from the world of subversion (a world that I&#8217;m quickly wishing I could fully leave).  So my first forays into git-dom were guided by the <a href="http://git-scm.com/course/svn.html">SVN Crash Course</a>.  This allowed me to get access to git repositories quickly, but it kept me thinking in subversion.  I wanted to use git more idiomatically.  So I read and I read, I cloned and fetched and pushed and merged and after a while, I began to feel like I was really understanding git.</p>
<p>Last week, when I was chatting with a couple of my programmer geek friends about git and version control, I got to thinking about what has helped me the most in my learning experience.  Here&#8217;s what I came up with.</p>
<p><strong>Really understand how git stores its data.</strong></p>
<p>Git stores it&#8217;s data as a directed acyclic graph, which is just about as simple as you can get.  Commits point to their parent commit, which in turn point to their parent, and so on.  A new node is created for every commit and a merge just points at all of its parents.  Combine this knowledge with the fact that branches are just named pointers to nodes in this graph and you start to have more confidence when it comes time to change things around.</p>
<p><strong>Learn the &#8220;get out of jail&#8221; command: git reset &#8211;hard</strong></p>
<p>That&#8217;s all you need to undo almost anything you might have done.  This command takes the current branch and points it at the commit you referenced.</p>
<p>For instance, if you want to revert a branch back to where it was at the last fetch:</p>
<pre class="brush: plain; gutter: false;">$ git reset --hard origin/branchname</pre>
<p>Or, if you decide that the last three commits should be forgotten:</p>
<pre class="brush: plain; gutter: false;">$ git reset --hard HEAD~3</pre>
<p>Or, if you don&#8217;t like the result of that interactive rebase:</p>
<pre class="brush: plain; gutter: false;">$ git branch before
$ git rebase -i HEAD~3
# decide the rebase was bad
git reset --hard before # all better</pre>
<p><strong>Don&#8217;t be afraid to experiment.</strong></p>
<p>One of the best things about a distributed version control system is that you are free to mess around with your repository all you want and no one will know about it.  Go ahead.  Rebase your commits to be cleaner, rearrange branches to make them easier to work with, or rewrite every commit because you forgot to set your email address.  It doesn&#8217;t matter at all until you share those changes with other people.</p>
<p>Also, almost nothing in git will delete data.  In truth, it&#8217;s rather hard to permanently remove a commit.  Because of this, even if something happens that you don&#8217;t like, you can use &#8216;git reset&#8217; to make it all go away.  For instance, if you have a repository with a dozen commits and you want to change the committer email, when the commits are rewritten, the old commits are still there in the database, waiting to be resurrected if you change your mind.</p>
<p><strong>Read <a href="http://progit.org/book/">Pro Git</a>.</strong></p>
<p>This book was instrumental in helping me move from beginner to intermediate.  I recommend reading it cover to cover, even if you don&#8217;t ever plan on writing a hook or running &#8216;git filter-branch&#8217;.  Just seeing how it all fits together helps inform day to day decisions when using git.</p>
<p>That&#8217;s it for now.  Have fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://endot.org/2010/09/01/really-groking-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting USB ext3 partitions on OpenSolaris</title>
		<link>http://endot.org/2010/03/14/mounting-usb-ext3-partitions-on-opensolaris/</link>
		<comments>http://endot.org/2010/03/14/mounting-usb-ext3-partitions-on-opensolaris/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 20:19:59 +0000</pubDate>
		<dc:creator>nate</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://endot.org/?p=137</guid>
		<description><![CDATA[[Update] It looks like this only really applies to USB flash drives.  When I mounted my actual backup drive, it showed up in prtpart.  This post was written using the root drive on my old backup server, which is a SanDisk Cruzer flash drive. Now that I finally got my mini thumper up and online, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>[Update]</strong> It looks like this only really applies to USB flash drives.  When I mounted my actual backup drive, it showed up in prtpart.  This post was written using the root drive on my old backup server, which is a SanDisk Cruzer flash drive.</p>
<hr/>
<p>Now that I finally got <a href="/2010/03/14/my-mini-thumper-is-online/">my mini thumper up and online</a>, it&#8217;s time pull everything from my previous  backup drive.  The problem is that it&#8217;s a USB drive with an ext3 partition on it.  I did a little googling and found several references to using the belenix FSWpart and FSWfsmisc packages, with <a href="http://blogs.sun.com/pradhap/entry/mount_ntfs_ext2_ext3_in">this one</a> being the most helpful.</p>
<p>My only problem was that when I ran prtpart, it only showed disk information for my non-USB drives.  I could see that the drive was recognized by looking in syslog:</p>
<pre class="brush: plain; gutter: false;">root@silo:~# cat /var/adm/messages
Mar 14 12:03:36 silo usba: [ID 349649 kern.info]        SanDisk U3 Cruzer Micro 0774920CB281D664
Mar 14 12:03:36 silo genunix: [ID 936769 kern.info] scsa2usb0 is /pci@0,0/pci1462,7418@1d,3/storage@1
...
</pre>
<p>So, I dug around a bit, trying to look for various names in /dev/rdsk that were in the above output when I stumbled across the fact that everything in /dev/rdsk is a symlink.  So I did a quick grep:</p>
<pre class="brush: plain; gutter: false;">
root@silo:~# ls -al /dev/rdsk/ | grep /pci@0,0/pci1462,7418@1d,3/storage@1
lrwxrwxrwx   1 root root  64 2010-03-14 12:03 c11t0d0p0 -&gt; ../../devices/pci@0,0/pci1462,7418@1d,3/storage@1/disk@0,0:q,raw
lrwxrwxrwx   1 root root  64 2010-03-14 12:03 c11t0d0p1 -&gt; ../../devices/pci@0,0/pci1462,7418@1d,3/storage@1/disk@0,0:r,raw
....
</pre>
<p>Aha! Now I know what the device name is, so I can use prtpart to figure out what to mount:</p>
<pre class="brush: plain; gutter: false;">root@silo:~# prtpart /dev/rdsk/c11t0d0p0 -ldevs
Fdisk information for device /dev/rdsk/c11t0d0p0

** NOTE **
/dev/dsk/c11t0d0p0      - Physical device referring to entire physical disk
/dev/dsk/c11t0d0p1 - p4 - Physical devices referring to the 4 primary partitions
/dev/dsk/c11t0d0p5 ...  - Virtual devices referring to logical partitions

Virtual device names can be used to access EXT2 and NTFS on logical partitions

/dev/dsk/c11t0d0p1      Linux native
</pre>
<p>And mount it:</p>
<pre class="brush: plain; gutter: false;">root@silo:~# mkdir /mnt/linux
root@silo:~# mount -F ext2fs /dev/dsk/c11t0d0p1 /mnt/linux
root@silo:~# ls /mnt/linux/
bin  dev  etc  home  initrd  lib  lost+found  media  mnt  proc  root  sbin  sys  tmp  usr  var  www
</pre>
]]></content:encoded>
			<wfw:commentRss>http://endot.org/2010/03/14/mounting-usb-ext3-partitions-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My mini thumper is online!</title>
		<link>http://endot.org/2010/03/14/my-mini-thumper-is-online/</link>
		<comments>http://endot.org/2010/03/14/my-mini-thumper-is-online/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 20:18:09 +0000</pubDate>
		<dc:creator>nate</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Home]]></category>

		<guid isPermaLink="false">http://endot.org/?p=146</guid>
		<description><![CDATA[After basically copying my friend&#8217;s exact specifications, I now have a little server at home with 1.5T of mirrored disk space.  By and large it was a straightforward process, with the following interesting tidbits. Most of the assembly went smoothly.  You do have to pull the motherboard out to get the CF drive into its [...]]]></description>
			<content:encoded><![CDATA[<p>After basically copying <a href="http://serialized.net/2009/02/the-littlest-thumper-opensolaris-nas-on-an-msi-wind-pc/">my friend&#8217;s exact specifications</a>, I now have a little server at home with 1.5T of mirrored disk space.  By and large it was a straightforward process, with the following interesting tidbits.</p>
<p>Most of the assembly went smoothly.  You do have to pull the motherboard out to get the CF drive into its slot.  In order to maneuver it out, you have to unclip the SATA cables and unscrew the VGA connector.</p>
<p><a href="http://endot.org/wp-content/uploads/2010/03/case.jpg"><img class="alignnone size-medium wp-image-147" title="case" src="http://endot.org/wp-content/uploads/2010/03/case-300x225.jpg" alt="case" width="300" height="225" /></a></p>
<p>You can see the SATA cables snaking up the left and top and the VGA connector is in the lower right (blue).  The CF slot is just left of center at the bottom of the picture.  Here&#8217;s a picture with the drive and RAM installed.</p>
<p><a href="http://endot.org/wp-content/uploads/2010/03/case2.jpg"><img class="alignnone size-medium wp-image-148" title="case2" src="http://endot.org/wp-content/uploads/2010/03/case2-300x225.jpg" alt="case2" width="300" height="225" /></a></p>
<p>The other issue I ran into was related to the optical drive bay.  My first drive slid in and mounted fine in the HD bay, but I was stuck without brackets to properly secure the second drive in the 5.25 inch bay.  I could have just put it in and held it with one screw, but after figuring that this is my backup server, I opted to head to Best Buy to pick up the brackets.</p>
<p>When I got there, I was informed that they don&#8217;t carry them any more and that I would have to pay a visit to Fry&#8217;s.  Well, I hate going to Fry&#8217;s more than most bad things in life, so I called it a day and decided to figure it out later.  Then, earlier this week, Sara and I were walking by a little local computer shop named <a href="http://www.techquest.net/">*techquest</a>.  The proprietor was able to dig up a pair of brackets, so I bought them from him.</p>
<p>Yesterday, I finished assembling the hardware and then spent a while trying to figure out how to get it to boot OpenSolaris from the USB drive I had created.</p>
<p>The first problem was that I couldn&#8217;t get into the Wind BIOS.  I could see it flash something on the screen after POST beeping, but it was cleared far too fast for me to get any information.  After rebooting a few times and only getting a few words, I turned my iPhone video camera on it and was able to finally read the information with a well timed pause.</p>
<p>The rest of my issues revolved around the unique arrangement of boot options in the BIOS and having to remove the stupid U3 stuff from the Cruzer so that it behaved like a simple USB disk, but soon enough I was installing OpenSolaris.</p>
<p>The little box now sits in my entertainment center, ready for me to start transferring data to it.</p>
]]></content:encoded>
			<wfw:commentRss>http://endot.org/2010/03/14/my-mini-thumper-is-online/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
