<?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>Howettblog®</title>
	<atom:link href="http://blog.howett.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.howett.net</link>
	<description>Not to be taken internally.</description>
	<lastBuildDate>Mon, 23 Aug 2010 00:31:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Fixing Steam for Mac on a case-sensitive filesystem.</title>
		<link>http://blog.howett.net/?p=103</link>
		<comments>http://blog.howett.net/?p=103#comments</comments>
		<pubDate>Thu, 13 May 2010 03:45:05 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[caseism]]></category>
		<category><![CDATA[Steam]]></category>
		<category><![CDATA[Valve]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=103</guid>
		<description><![CDATA[While it should not be necessary, it is possible (with a bit of symlinking) to get Steam on OS X working with a case-sensitive boot volume. This can be done as follows: Launch Disk Utility, and create a new disk image (File > New > Blank Disk Image&#8230;). I used the following options: Name: Case [...]]]></description>
			<content:encoded><![CDATA[<p>While it should not be necessary, it is possible (with a bit of symlinking) to get Steam on OS X working with a case-sensitive boot volume.</p>
<p>This can be done as follows: <span id="more-103"></span></p>
<ol>
<li>Launch Disk Utility, and create a new disk image (File > New > Blank Disk Image&#8230;).<br />
I used the following options:
<ul>
<li>Name: Case Insensitive</li>
<li>Size: 100 GB</li>
<li>Format: Mac OS Extended (Journaled)</li>
<li>Partitions: Hard Disk</li>
<li>Image Format: sparse bundle disk image</li>
</ul>
</li>
<li>In your new case-insensitive volume (mine is named &#8220;Case Insensitive&#8221;, so all paths used in this document will refer to it as such), create the following directories:
<ul>
<li>/Applications</li>
<li>/Home</li>
<li>/Home/Library/Application Support/Steam</li>
<li>/Home/Documents/Steam Content</li>
</ul>
<p>NOTE: These paths are suitable for a single user. I chose to use <em>/Users/dustin/&#8230;</em></li>
<li>Download Steam and put Steam.app in /Volumes/Case Insensitive/Applications</li>
<li>Symlink your Steam directories to the case-insensitive volume. In Terminal:<br />
<blockquote>ln -s /Volumes/Case\ Insensitive/Home/Library/Application\ Support/Steam ~/Library/Application\ Support/Steam<br />
ln -s /Volumes/Case\ Insensitive/Home/Documents/Steam\ Content ~/Documents/Steam\ Content</p></blockquote>
</li>
<li>Create /volumes (lowercase) and symlink /Volumes/Case Insensitive into it as &#8220;case insensitive&#8221;. This is to get around the intentional lowercasing Steam does of all paths it comes into contact with.<br />
<blockquote>mkdir /volumes<br />
ln -s /Volumes/Case\ Insensitive /volumes/case\ insensitive</p></blockquote>
</li>
<li>Launch Steam!</li>
</ol>
<p>If that&#8217;s too much work, use <a href="http://howett.net/steamcase.sh">this shell script</a>. Save it to your home directory (or wherever, really), launch Terminal, and issue the following commands:<br />
<blockquote>chmod +x ~/steamcase.sh<br />
~/steamcase.sh 100g</p></blockquote>
<p>Substitute 100g with your desired size. This script creates a sparse bundle disk image, so you don&#8217;t need to worry about having all 100 GiB (or whatever size you choose) available up-front.<br />
Then proceed to install Steam.app to /Volumes/Case Insensitive/Applications. Run and enjoy!</p>
<p>Honestly, Valve, this shouldn&#8217;t even be necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=103</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>On Case Sensitivity</title>
		<link>http://blog.howett.net/?p=85</link>
		<comments>http://blog.howett.net/?p=85#comments</comments>
		<pubDate>Mon, 10 May 2010 03:24:37 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Blizzard]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[caseism]]></category>
		<category><![CDATA[insanity]]></category>
		<category><![CDATA[insensitivity]]></category>
		<category><![CDATA[sensitivity]]></category>
		<category><![CDATA[StarCraft]]></category>
		<category><![CDATA[Steam]]></category>
		<category><![CDATA[stupidity]]></category>
		<category><![CDATA[Valve]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=85</guid>
		<description><![CDATA[DUE TO A SHORTAGE OF LOWERCASE LETTERS, AND FAULTY CASE CHECKING, THE ENTIRETY OF THIS POST WILL BE WRITTEN IN CAPITAL LETTERS, JUST LIKE DOS 6.22. DEAL WITH IT OR GO HOME. Or, at least, that&#8217;s what you&#8217;re supposed to do when you try to use Steam (OS X), StarCraft II, or practically any Adobe [...]]]></description>
			<content:encoded><![CDATA[<p>DUE TO A SHORTAGE OF LOWERCASE LETTERS, AND FAULTY CASE CHECKING, THE ENTIRETY OF THIS POST WILL BE WRITTEN IN CAPITAL LETTERS, JUST LIKE DOS 6.22.<br />
DEAL WITH IT OR GO HOME.<br />
Or, at least, that&#8217;s what you&#8217;re supposed to do when you try to use Steam (OS X), StarCraft II, or practically any Adobe product on a Mac with a case-sensitive boot volume.</p>
<a href="http://blog.howett.net/wp-content/uploads/2010/05/Screen-shot-2010-05-09-at-10.36.57-PM.png"><img src="http://blog.howett.net/wp-content/uploads/2010/05/Screen-shot-2010-05-09-at-10.36.57-PM.png" alt="Steam claiming that it requires a case-insensitive volume." title="Steam Case Insensitivity" width="554" height="226" class="size-full wp-image-86" /></a>
<p>From the factory, a Mac ships with a case-insensitive filesystem. This seems to be an Apple simplification, <span id="more-85"></span>as all UNIX-styled operating systems in recent history (for at least two decades, I imagine) have had case-sensitive filesystems. Apple must not want their users to be confused when files with the same name but different cases can coexist. However, I digress. To turn on case sensitivity system-wide on your Mac, you need to format your boot volume and reinstall the operating system.</p>
<p>This seems like a lot of work for some piddly little capital letters, no? However, the point of this article is not &#8220;why people choose case sensitivity,&#8221; it is &#8220;why won&#8217;t vendors support it?&#8221;</p>
<p>My argument boils down to a handful of simple points:</p>
<ol>
<li>Many operating systems in existence today use case-sensitive filesystems, by default. In fact, some even mandate the use of such filesystems.</li>
<li>Supporting case-sensitive filesystems <strong>automatically</strong> grants support for case-insensitive filesystems. (Force your filenames to lowercase, refer to them as if they were lowercase; if a case-insensitive filesystem comes along and they are in uppercase, what does it matter? You&#8217;re not sensitive to case and the OS will fulfill your request.)</li>
<li>Companies lose nothing except for bug reports (seems like something you&#8217;d want to lose?) for supporting case-sensitive filesystems. Supporting your <strong>paying customers</strong> should be a top priority.</li>
</ol>
<p>Valve (the creators of the Steam content delivery system) and Blizzard (of StarCraft fame) are by no means the first companies to ignore this small but important segment of their market. Adobe is notorious for outright rejecting case-sensitivity (to the point where the installers for some of their products will not only fail to install on a case-sensitive volume, but will not let you install on another volume that is case-insensitive); some might even call them the poster child of caseism.</p>
<p>There are various workarounds to applications failing to work on case-sensitive volumes; herein are listed a few, in increasing order of complexity-</p>
<ul>
<li><strong>Whine and complain on your blog.</strong></li>
<li>Simply don&#8217;t use the application, boycott the publisher until they stop being idiots. This solution, while being the easiest, is not always the most practical. Then again, none of these are particularly practical.</li>
<li>In the case of a simple &#8220;drag and drop into Applications&#8221; install, create a disk image containing a case-insensitive filesystem, and move all your caseist applications into it. This works for StarCraft II and, <em>to some extent</em>, Steam.</li>
<li>Create a horrible web of symbolic links into a case-sensitive volume.</li>
<li>In more extreme cases, you might have to resort to installing a separate copy of OS X on a case-insensitive volume. This is practically required for any Adobe application <del datetime="2010-05-11T04:16:44+00:00">(or at least, was, before CS5. I do not know if they have fixed this. Their previous comments left me with little hope that they would.)</del> They have not fixed this, and do not intend to.</li>
<li>The last option, which I choose to ignore because it&#8217;s patently absurd, is reinstalling your whole system on a case-insensitive volume.</li>
</ul>
<p>As you can see, none of these solutions are particularly desirable; they are all one of: ridiculously cumbersome (install another copy of OS X?!), mildly cumbersome (mounting another volume is no big deal, really, but it&#8217;s still annoying), or downright impossible (say you need Adobe products in your line of work, you can&#8217;t go boycotting their software.) These tactics are met with mixed results.</p>
<ul>
<li>StarCraft II fails to patch itself on a case-sensitive volume. Moving it to a case-insensitive volume fixes this problem, and the game works fine. <em>NOTE: This shouldn&#8217;t really matter. StarCraft (like most other Blizzard games) stores its data in container files that abstract filesystem access.</em></li>
<li>Steam presents a warning: <strong>Steam requires /Applications/Steam.app/Contents/MacOS to be in a case-insensitive filesystem.</strong> Fixing this by moving it into a case-insensitive disk image simply yields another warning: <strong>Steam requires /Users/dustin/Library/Application Support/Steam to be in a case-insensitive filesystem.</strong> This is simply not possible for me. I refuse to reinstall everything I have here, and I refuse to dual-boot OS X just to play games. It is worth noting that Steam&#8217;s OS X beta used to work on case-sensitive filesystems, albeit in a broken manner. My game data was stored in <em>/users/dustin/documents/steam content</em>. It takes calculation to do this. This is <strong>intentional.</strong> The operating system provides the path of my home directory as /Users/dustin, and Steam <strong>EXPLICITLY</strong> lowercased it. What is the logic behind that? It seems like you could simply support case-sensitivity by requesting default paths from the operating system, in this case, and <strong>not modifying them.</strong> This is an even more concerning problem when you take into account the hints regarding a Steam client for Linux (which would absolutely <em>require</em> case sensitivity).</li>
<li>Adobe <em>refuses</em> to invest the time in fixing case issues. <a href="http://thinkingdigitally.com/archive/adobe-photoshop-cs3-osx-case-sensitive-filesystem-fixed/">Thinking Digitally</a> has a bit of information on this (w.r.t. Adobe CS3.) There is a huge discussion (which, after a while, starts to fall on deaf ears) at the Adobe Blog, <a href="http://blogs.adobe.com/jnack/2007/10/adobe_apps_on_l.html">here</a>; just search for &#8220;sensitive&#8221;.</li>
</ul>
<p>For the record, making a horrible web of symlinks works to fix Steam, but why should I have to do that?! That&#8217;s absurd!<br />
More absurd is that it insists in writing data to /volumes/case insensitive&#8230; My case-insensitive volume is at a case-sensitive location. Ugh.</p>
<p>I would love for somebody else to shed some light on this issue. I would petition, but it wouldn&#8217;t get me anywhere. I would contact support, but hey, why would multi-million-dollar companies listen to one dude with a blog?<br />
Why is it so difficult to be case-sensitive?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=85</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Cache or Check?</title>
		<link>http://blog.howett.net/?p=75</link>
		<comments>http://blog.howett.net/?p=75#comments</comments>
		<pubDate>Thu, 17 Sep 2009 08:10:34 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=75</guid>
		<description><![CDATA[On September 9th, 2009, Apple unveiled the (disappointing) updates to their iPod line, and released to the world iPhoneOS 3.1. The first, while notable, is nothing interesting in comparison to what they&#8217;ve done in the latest release of iPhoneOS. With the latest release of their desktop operating system, OS X, Apple made great improvements to [...]]]></description>
			<content:encoded><![CDATA[<p>On September 9th, 2009, Apple unveiled the (disappointing) updates to their iPod line, and released to the world iPhoneOS 3.1. The first, while notable, is nothing interesting in comparison to what they&#8217;ve done in the latest release of iPhoneOS.</p>
<p>With the latest release of their desktop operating system, OS X, Apple made great improvements to the system&#8217;s speed and application load times (supposedly, I&#8217;ve heard mixed reviews of Snow Leopard.) iPhoneOS 3.1 brings in these new enhancements, further streamlining the software on their mobile devices.</p>
<p>The single most impressive, noticeable change I&#8217;d like to discuss today is library caching.</p>
<p><span id="more-75"></span></p>
<h1>Boots of Speed</h1>
<p>Does it make sense to load 200+ individual files from various locations on disk? Arguably. This is a pretty standard situation. But wouldn&#8217;t it be better if you could, say, intelligently combine those 200+ files (as they do not change often) into one larger file, stored in a single contiguous region on-disk?</p>
<p>This is, in effect, what Apple has done with the dynamic libraries on the iPhone. libSystem, UIKit, Foundation, and hundreds more libraries and frameworks are combined into one large (~92MB for 3.1 on the armv6) flat archive. This archive is loaded into memory (or, more likely, mapped as-needed) at 0&#215;30000000 (all libraries in iPhoneOS seemed to start beyond 0&#215;30000000 anyway; regardless, this location itself matters very little.)</p>
<p>/System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv6 contains every shared dynamic library in iPhoneOS, and dyld no longer needs to hunt down individual libraries and map them into memory when they&#8217;re required. The device starts faster and applications launch faster. Huge success&#8230; or is it?</p>
<h1>Precipice of Doom</h1>
<p>This does, of course, cost a lot of disk space. 92MB is a lot in a root partition of ~500MB &#8211; so, how did Apple save the rest of the space? Why, they simply deleted the originals! That&#8217;s right, there are no (well, there might be five) shared libraries in the filesystem. They&#8217;re all horded into a single cache file!</p>
<p>At first glance, this doesn&#8217;t seem like a very bad thing. iPhone users rarely peek into the internals of the device, and iPhone Developers have their SDK to fall back on. The SDK contains every library in original format, compiled for ARM.</p>
<p>But, what if you compile on the device? iphone-gcc in Cydia allows you to do so! Or, at least, it used to. There are no longer any shared objects to link against; you can create all the intermediate object files you want, you&#8217;ll just never be able to link them into a proper executable.</p>
<p>What if you compile using the open toolchain? Similar situation. The open toolchain is typically built using a copy of the iPhone filesystem to supply needed libraries and datafiles. Of course, you could just copy the libraries from the SDK. What if there&#8217;s something you can&#8217;t find there? What if there&#8217;s something that&#8217;s only found in this huge cache file?</p>
<p><em><strong>Note:</strong> I was previously unaware that the SDK actually included the private frameworks as well as the public ones, which does greatly diminish the use of this tool. Still, there ARE binaries that would be in the filesystem that might be of interest to hackers that are not available via the SDK. Lacking the private frameworks would have been bad, as developers using them would have NO way to link their binaries, and would have to do everything regarding them at runtime. Fortunately, that&#8217;s not the case.</em></p>
<h1>Cache Withdrawal</h1>
<p>I&#8217;ve spent the better part of two days writing a utility that will recreate a filesystem&#8217;s worth of libraries given a cache file. There are a few drawbacks, but the created binaries have been proven linkable and, for the most part, class-dump-able.</p>
<p>The cache file is of a pretty simple format, with a few &#8220;gotcha&#8221;&#8216;s. It begins with a header describing what it&#8217;s for (cache version, processor) and how many libraries it contains, dyld&#8217;s offset in memory, an offset to a code signature, etc., and then moves on to a list of library addresses. Each library&#8217;s information is stored in 4 64-bit integers &#8211; the load address (which is also the offset in the cache file plus 0&#215;30000000), two unknowns, and the offset of this entry&#8217;s filename.</p>
<p>Each library can, for the most part, be extracted as-is: Seek to its offset, figure out its size, and dump that into a separate file. The &#8220;gotcha&#8221; of this part is, of course, that the cache file is a little more complex than &#8220;a bunch of libraries stuck end-to-end&#8221;. The application that creates the cache seems to separate the code, data, and linker information (already in separate segments, __TEXT, __DATA and __LINKEDIT) intelligently. It also COMBINES __LINKEDIT for every library in the cache.</p>
<p>The cache, thus, looks something like this:</p>
<p>Header, Library Info, Lib1, Lib2, Lib3, &#8230;, Data1, Data2, Data3, &#8230;, __LINKEDIT, Code Signature</p>
<p>This is very intelligent and very efficient &#8211; until you want to extract the libraries. __LINKEDIT, as stated before, has been combined for every library. So, to extract library 1, you&#8217;d need Lib1 + Data1 + __LINKEDIT. The same goes for all other libraries in the file. The only problem with this is that __LINKEDIT alone is ~20MiB in size. Each library requires it.</p>
<p>When all is said and done, the set of 200+ extracted libraries comes out to 4.6 GB. Every library contains a whole bunch of duplicated data which is absolutely necessary for its proper function. (This could be rectified if I intelligently recombined the symbol tables, but that&#8217;s a whole lot of Mach-O sorcery I don&#8217;t feel like getting into right now.)</p>
<h1>The Tools of the Trade</h1>
<p>Update: the code is <a href="http://svn.howett.net/svn/tools/dyldcache/dyldcache.cc">here</a>. The explanation is, however, missing. <img src='http://blog.howett.net/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> <br />
There is an updated fork (by <a href="http://networkpx.blogspot.com">KennyTM~</a>) <a href="http://code.google.com/p/networkpx/source/browse/etc/dyldcache.cc">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=75</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CyDelete 1.0.0</title>
		<link>http://blog.howett.net/?p=66</link>
		<comments>http://blog.howett.net/?p=66#comments</comments>
		<pubDate>Wed, 25 Mar 2009 09:01:39 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[iPod Touch]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=66</guid>
		<description><![CDATA[CyDelete is an iPhoneOS addon (using MobileSubstrate) that allows you to delete programs installed with Cydia just like they were App Store applications. I recently released it to BigBoss&#8216;s Cydia Repository, and it&#8217;s received 2123 downloads at the time of this post. It&#8217;s been up for about an hour. Just a brief post to let [...]]]></description>
			<content:encoded><![CDATA[<p>CyDelete is an iPhoneOS addon (using MobileSubstrate) that allows you to delete programs installed with Cydia just like they were App Store applications. I recently released it to <a href="http://www.thebigboss.org">BigBoss</a>&#8216;s Cydia Repository, and it&#8217;s received 2123 downloads at the time of this post. It&#8217;s been up for about an hour.</p>
<p>Just a brief post to let you all know what I&#8217;ve been up to.</p>
<p>Full post <a href="http://thebigboss.org/2009/03/25/cydelete-uninstall-cydia-packages-from-springboard">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=66</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pico-ITX and gPXE (in BIOS) do not mix, outside of blenders.</title>
		<link>http://blog.howett.net/?p=63</link>
		<comments>http://blog.howett.net/?p=63#comments</comments>
		<pubDate>Wed, 25 Mar 2009 08:48:18 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Oops]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=63</guid>
		<description><![CDATA[I&#8217;ve been sitting on this post for quite some time. I recently bought (and later sold, long before this post was typed) a Pico-ITX motherboard, an x86 motherboard smaller than my hand. I named it Marcus and crafted a custom installation of Gentoo (as I do for every new computer) for it. I also decided [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been sitting on this post for quite some time. I recently bought (and later sold, long before this post was typed) a Pico-ITX motherboard, an x86 motherboard smaller than my hand.</p>
<p>I named it Marcus and crafted a custom installation of Gentoo (as I do for every new computer) for it. I also decided to slipstream a gPXE (Enhanced PXE Network Boot) image into the BIOS. All seemed well, and I flashed it.</p>
<p>Reboot time came. I tried to enter the setup screen to configure my new toy!<br />
<span id="more-63"></span><br />
For some reason, it didn&#8217;t work.<br />
It also decided that it wouldn&#8217;t boot from the hard drive&#8230; at all.<br />
All it would do was drop into gPXE, repeatedly. After gPXE gave up, it would simply fault and stop responding, shutting the monitor off with it. The keyboard barely worked (it took some prodding, and the control key consistently got stuck starting gPXE&#8217;s shell).</p>
<p>&#8220;Well, crap. I just ruined my nice new motherboard.&#8221;</p>
<p>Fortunately, gPXE is powerful, and there were a few options. I first decided to use it to boot Linux, which worked. I also created another gPXE-laden BIOS image, &#8220;properly&#8221; (I thought) this time. I booted Linux and flashed the new image.</p>
<p>Same thing. Except this time, It wouldn&#8217;t boot Linux.</p>
<p>There&#8217;s a great DOS tool called UNIFLASH. It will flash practically ANY BIOS chip, within reason. If I could get it to load an operating system, I could try to flash a good BIOS. That was the theory, at least.</p>
<p>No protected-mode operating systems more complex than Cipher worked. DOS with Mini-Windows 98 didn&#8217;t even boot (over the network). Everything just led to a black screen. I was using Memdisk and a disk image (memdisk overrides int13h, tricking the system into treating a block of memory like a hard disk). Everything looked bleak.</p>
<p>With the help of AndyTim in #etherboot (Freenode), I experimented with everything I had. Tried to Chainload the hard drive, and that failed too. Tried to Chainload the hard drive with PXELINUX and THEN chain.c32. That failed too.</p>
<p>Back to Memdisk. Booting into DOS with Memdisk and then loading a BIOS flasher seemed to work. Unfortunately, doing anything with the flasher (even VIA&#8217;s official flash utility) caused the computer to hang. I was starting to think that I couldn&#8217;t fix this thing.</p>
<p>On top of that, UNIFLASH, the most advanced BIOS flashing tool known to man, did not support my chipset. It did, however, support a very similar one. I dove into the land of PASCAL (to which I hope to never return) and added my system to the list; I recompiled UNIFLASH in DOSBox, which proved difficult as well.</p>
<p>I also learned about SAN booting from AndyTim; treating another network computer hosting an image as a hard disk. This proved to be the ONLY thing that worked. I SAN-booted a DOS image, and my new UNIFLASH worked like a charm.</p>
<p>Believe it or not, this is the abridged version of this tale. The moral? gPXE is <strong>amazing</strong>, but maybe not in the BIOS of a Pico-ITX system.</p>
<p>I would have been out a computer were it not for the patient help of AndyTim. Thanks!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hard Drive Suicide</title>
		<link>http://blog.howett.net/?p=53</link>
		<comments>http://blog.howett.net/?p=53#comments</comments>
		<pubDate>Sun, 25 Jan 2009 00:01:56 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Annoyances]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oops]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=53</guid>
		<description><![CDATA[dl.dialogue { border-style: dashed; border-color: #9f9f48; border-width: 1px; background-color: #ffffa8; color: #606060; } dl.dialogue>dt { float: left; clear: left; font-weight: bold; width: 7em; text-align: right; color: #bfbf68; } dl.dialogue>dt:after { content: ":"; } dl.dialogue>dd { margin-left: 7em; padding-left: 0.5em; } dl.dialogue>dd.action { margin-left: 3.5em; padding-left: 0; font-style: italic; font-size: smaller; font-weight: bold; color: #dfdf88; } [...]]]></description>
			<content:encoded><![CDATA[<style type="text/css">dl.dialogue { border-style: dashed; border-color: #9f9f48; border-width: 1px; background-color: #ffffa8; color: #606060; } dl.dialogue>dt { float: left; clear: left; font-weight: bold; width: 7em; text-align: right; color: #bfbf68; } dl.dialogue>dt:after { content: ":"; } dl.dialogue>dd { margin-left: 7em; padding-left: 0.5em; } dl.dialogue>dd.action { margin-left: 3.5em; padding-left: 0; font-style: italic; font-size: smaller; font-weight: bold; color: #dfdf88; }</style>
<dl class="dialogue">
<dt>DUSTIN</dt>
<dd>How now! An external hard drive?</dd>
<dt>SEAGATE</dt>
<dd class="action">Clatters to the floor</dd>
<dd>[Within enclosure] O, I am slain!</dd>
</dl>
<p>Well, it happened <em>something</em> like that&#8230;</p>
<p>I was about to attach my external enclosure (containing a Seagate 120GB 2.5&#8243; SATA hard drive) to my other laptop, when the cord came up short and the drive slid off my desk.</p>
<p>To the floor three feet below&#8230;</p>
<p>While it was running.</p>
<p>Hard Drives are rated to withstand falls from a few feet, but only when they&#8217;re not running. When they are running, however, the heads smash into the platters, spinning at 5,400 RPM.</p>
<p>So I&#8217;m running a <strong>fsck</strong> on the drive, and it finds a bad block (about 2.3 million 4096-byte blocks into the disk). As I went to pull my laptop and hard drive into my lap, and the hard drive slides off the desk again. In the same place, and landing the same way.</p>
<p>By this point, I&#8217;ve started to give up. Fsck tells me that there is a bad block in the same place, and I check the SMART statistics: 0 Reallocated Sectors.</p>
<p>I write data to the bad sectors to force them to reallocate. This goes on for quite a while (with the <strong>badblocks</strong> tool, among other things such as creating as many 10GB files filled with zeroes as I could (I got to 6 files of various sizes before the drive began <strong>buzzing</strong>) and I get up to about 150 reallocated sectors (Or around 90 as a calibrated hard drive value; for the record, the failure threshold is 36. The drive started at 100.).</p>
<p>I decide to back up the data (only one of the actual files on the drive is corrupt; all the damage is in unallocated space) and delete some things I have elsewhere. 156 reallocated sectors.</p>
<p>After backing up the data I decided that it would be best to do a destructive write test. Writing to bad blocks causes the drive&#8217;s firmware to reallocate them on a different section of the physical disk.</p>
<p>By the middle of the test (700,000 4096-byte blocks, starting at the first corrupted region), the drive began buzzing again, and when I finally gave up, it had reallocated about <strong>2,100 sectors</strong>, and the calibrated value was down to <strong>44</strong>.</p>
<p>At this point, I gave up.</p>
<p>Rest in peace, Seagate. You have been with me since I got my laptop. Thanks for all the fish.</p>
<p>On another note, I&#8217;m now in the market for a new 2.5&#8243; SATA drive.</p>
<p>UPDATE: The drive is a lost cause. I&#8217;m not writing anything to it, and it&#8217;s reallocating sectors on its own.</p>
<div style="white-space: pre; font-family: monospace; font-size: 8pt; border: 1px dotted black; background-color: #afafaf; color: black;">ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      WHEN_FAILED RAW_VALUE<br />
Reallocated_Sector_Ct   0&#215;0033   018   018   <strong>036</strong>    Pre-fail  <strong>FAILING_NOW 3282</strong></div>
<p>Powered-on time: 305 days, 6 hours. Rest in Peace.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=53</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Windows 7 Beta</title>
		<link>http://blog.howett.net/?p=38</link>
		<comments>http://blog.howett.net/?p=38#comments</comments>
		<pubDate>Tue, 13 Jan 2009 22:40:30 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=38</guid>
		<description><![CDATA[I have to say, Microsoft really did a great job here. The beta version of Windows 7 (Build 7000) is far more usable at this stage than Vista ever was. All my issues (see here and here) with Vista are not present here. Hilights Wireless worked immediately; during setup, no less! (screenshot) All my hardware [...]]]></description>
			<content:encoded><![CDATA[<p>I have to say, Microsoft really did a great job here. The beta version of Windows 7 (Build 7000) is far more usable at this stage than Vista ever was. All my issues (see <a href="http://blog.howett.net/2008/09/16/i-decided-to-install-vista/">here</a> and <a href="http://blog.howett.net/2008/09/26/vista-woes-pt-ii-what-gives/">here</a>) with Vista are not present here.</p>
<p><strong>Hilights</strong></p>
<ul>
<li>Wireless worked <strong>immediately</strong>; during setup, no less! (<a title="Wifi during Setup" href="http://dustin.howett.net/windows7/blog/wifi_setup.png" target="_blank">screenshot</a>)</li>
<li>All my hardware was detected and drivers automatically downloaded from Windows Update, without my intervention. (<a title="Windows Update showing all the drivers it installed." href="http://dustin.howett.net/windows7/blog/all_drivers.png" target="_blank">screenshot 1</a>: All drivers installed; <a title="Windows Update found my SATA card driver!" href="http://dustin.howett.net/windows7/blog/sata_driver.png" target="_blank">screenshot 2</a>: Installing my SATA card)</li>
<li>User Account Control is 100% less intrusive, and doesn&#8217;t hang while blanking the screen.</li>
<li>Aero is Beautiful in this release.</li>
<li>Paint got a complete overhaul (<a title="New interface for Paint" href="http://dustin.howett.net/windows7/blog/paint_menu.png" target="_blank">screenshot</a>: menu) and can do something similar to Word&#8217;s AutoShapes.</li>
<li>Progress bars in the taskbar. (<a title="A progress bar, in the taskbar!" href="http://dustin.howett.net/windows7/blog/taskbar_progress.png" target="_blank">screenshot</a>)</li>
<li>Calculator now has a &#8220;Programmer Mode.&#8221;</li>
<li>It&#8217;s <strong>fast</strong>, in both setup and use.</li>
</ul>
<p><strong>Minor Issues</strong><strong><br />
</strong></p>
<ul>
<li>Address bar icon in IE8 doesn&#8217;t support PNG transparency properly. (<a title="IE8 PNG Alpha issue" href="http://dustin.howett.net/windows7/blog/alpha_favicon.png" target="_blank">screenshot</a>)</li>
<li>Folders no longer display the size of their contents unless the contents are selected. (<a title="Windows 7 Explorer not displaying the Total Size" href="http://dustin.howett.net/windows7/blog/no_total_size.png" target="_blank">screenshot 1</a>: Windows 7; <a title="Windows XP Explorer displaying Total Size" href="http://dustin.howett.net/windows7/blog/total_size.png" target="_blank">screenshot 2</a>: Windows XP)</li>
<li>Paint uses the Ribbon Interface (not an issue, just hard to get used to). (<a title="The new Ribbon UI in Paint" href="http://dustin.howett.net/windows7/blog/paint_ribbon.png" target="_blank">screenshot</a>)</li>
</ul>
<p>While the beta expires in August of 2009, I foresee great things for Windows 7.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=38</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress for a New Year</title>
		<link>http://blog.howett.net/?p=30</link>
		<comments>http://blog.howett.net/?p=30#comments</comments>
		<pubDate>Fri, 02 Jan 2009 09:22:31 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=30</guid>
		<description><![CDATA[The title says it all; This combines my love of (read: veiled interest in) talking about random things online with my love of having a new toy to play with. Plus, Howettblog® is now completely located on the HowettNET server!]]></description>
			<content:encoded><![CDATA[<p>The title says it all; This combines my love of (read: veiled interest in) talking about random things online with my love of having a new toy to play with.</p>
<p>Plus, Howettblog® is now completely located on the HowettNET server!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>iTunes App Store Hacking</title>
		<link>http://blog.howett.net/?p=17</link>
		<comments>http://blog.howett.net/?p=17#comments</comments>
		<pubDate>Fri, 19 Dec 2008 21:52:00 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Hacking]]></category>
		<category><![CDATA[iPod Touch]]></category>
		<category><![CDATA[iTunes]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=17</guid>
		<description><![CDATA[Last night, I tried to figure out how the iTunes App Store (as accessed from the iPod Touch) worked. I was able to simulate the app store experience, and here are the few notes I took on the matter. All replies from the App Store are gzip-compressed. If any of these steps fails, the connection [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_22" class="wp-caption alignleft" style="width: 210px"><img class="size-medium wp-image-22" title="App Store Category List" src="http://blog.howett.net/wp-content/uploads/2009/01/appstore_categorylist-200x300.jpg" alt="App Store Category List" width="200" height="300" /><p class="wp-caption-text">App Store Category List</p></div>
<p>Last night, I tried to figure out how the iTunes App Store (as accessed from the iPod Touch) worked.<br />
I was able to simulate the app store experience, and here are the few notes I took on the matter.</p>
<p>All replies from the App Store are gzip-compressed.<br />
If any of these steps fails, the connection is terminated.</p>
<ol>
<li>The device queries phobos.apple.com for a &#8220;bag&#8221; (ix=2), which contains a signature and a signing key.</li>
<li>The device sends a non-binary plist (XML property list) of its current applications to a WebObject called &#8220;availableSoftwareUpgrades&#8221;</li>
<li>The app store replies with a list of all the information for those applications. It is up to the iPod itself to determine whether/not there are upgrades.</li>
<li>Periodically, the device makes a request to metrics.apple.com (which replies <span style="font-weight:bold;">100 Continue</span> instead of <span style="font-weight:bold;">200 OK</span>), which I believe is for stats tracking.</li>
<li>The device reads software categories and loads icons (WebObject viewFeaturedSoftwareCategories)</li>
<li>The device loads the contents of a category (WebObject viewGenre)</li>
<li>The device loads an application&#8217;s information descriptor (WebObject viewSoftware). This for some reason contains the text to be used in the price display, as well as the &#8220;INSTALL&#8221; or &#8220;BUY NOW&#8221; text.</li>
<li>The device initiated a secure connection to download an application. This is where I had to stop my research, as I couldn&#8217;t track this.</li>
</ol>
<p>Tools used:</p>
<ul>
<li>curl (Commandline URL Fetcher)</li>
<li>Wireshark (packet capturer/analyzer)</li>
<li>Apache (Web Server, used here to serve fake App Ptore pages)</li>
<li>A single firewall rule on my router to redirect all traffic coming from the iPod back to my computer (<span style="font-weight:bold;">iptables -t nat -A PREROUTING -s ipod -p tcp -j DNAT &#8211;to 192.168.254.1</span>. <span style="font-style:italic;">Note: I couldn&#8217;t redirect to a computer inside the router&#8217;s network, so I had to hook up via WiFi to the router AND via Ethernet to the modem</span>)</li>
</ul>
<div id="attachment_23" class="wp-caption alignright" style="width: 210px"><img class="size-medium wp-image-23" title="Modified App Store Application" src="http://blog.howett.net/wp-content/uploads/2009/01/appstore_application-200x300.jpg" alt="Modified App Store Application" width="200" height="300" /><p class="wp-caption-text">Modified App Store Application</p></div>
<p>Not much useful information into the app loading process was gleaned from this, unfortunately, though I did manage to snap some &#8220;neat&#8221; screenshots of my meddling.</p>
<p>Applications are signed, though, so even if this was an exploitable vector, the device would need to be jailbroken first, thus making this useless.<br />
Neat nonetheless.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=17</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>If Gentoo Linux were a Car&#8230;</title>
		<link>http://blog.howett.net/?p=16</link>
		<comments>http://blog.howett.net/?p=16#comments</comments>
		<pubDate>Tue, 16 Dec 2008 20:33:00 +0000</pubDate>
		<dc:creator>Dustin</dc:creator>
				<category><![CDATA[Humor]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.howett.net/?p=16</guid>
		<description><![CDATA[You go pick up an engine (in pieces) and body parts from the central warehouse. You find that your version of sys-car/transmission is too new and you need to get a newer version of sys-car/engine out of storage. You put together the engine, transmission, and body. You&#8217;re pretty psyched, only to find that you have [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>You go pick up an engine (in pieces) and body parts from the central warehouse.</li>
<li>You find that your version of sys-car/transmission is too new and you need to get a newer version of sys-car/engine out of storage.</li>
<li>You put together the engine, transmission, and body. You&#8217;re pretty psyched, only to find that you have yet to install car-misc/seats.</li>
<li>You install the seats, but find that the latest version of car-misc/seats does not correctly recognize the human body, due to an incompatibility.</li>
<li>You downgrade car-misc/seats and in the process must downgrade sys-apps/steering-wheel for height concerns.</li>
<li>You install the radio separately, which is the easiest part.</li>
<li>You turn the car on and it explodes.</li>
</ol>
<p>EDIT: Whoa, it looks like I&#8217;ve been Reddited! Or whatever the appropriate form of that word is. I want to clarify that I love Gentoo and use it on a daily basis. For all the ~arch dependency hell, it&#8217;s still a pretty damn great distribution.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.howett.net/?feed=rss2&amp;p=16</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
