<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Pioto&apos;s Blog</title>
        <link>http://blog.pioto.org/</link>
        <description></description>
        <language>en</language>
        <copyright>Copyright 2008</copyright>
        <lastBuildDate>Wed, 04 Jun 2008 02:24:00 -0500</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>Pioto.org is Moving</title>
            <description><![CDATA[<p>All of pioto.org is moving to a new server. To start things off, I’m locking my blog read-only. If you want to keep track of all this, <a href="http://paludis.pioto.org/trac/ticket/582">Paludis ticket #582</a> has the details.</p>]]></description>
            <link>http://blog.pioto.org/2008/06/piotoorg-is-moving.html</link>
            <guid>http://blog.pioto.org/2008/06/piotoorg-is-moving.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">pioto.org</category>
            
            
            <pubDate>Wed, 04 Jun 2008 02:24:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Encrypting (almost) your entire hard drive with dm-crypt (LUKS) and lvm2, Part 1</title>
            <description><![CDATA[<h2 id="intro">Introduction</h2>

<p>About <a href="http://blog.pioto.org/articles/2007/12/15/encrypting-your-home">five months ago</a>, I wrote about how to convert an existing Linux install from using regular partitioning to encrypted volumes (in particular, an encrypted /home with an unencrypted /). That sort of setup is relatively simple, once you have all the partitioning done. There is no need for any special early userland stuff (an initramfs image). However, that approach only provides a relatively minimal level of security for your data -- someone could still root your system.</p>

<p>For those who are a little more paranoid (especially in light of some <a href="http://arstechnica.com/news.ars/post/20080423-laptop-searches-at-the-border-no-reason-no-problem.html">recent news</a>), the next level of security for your data is to encrypt everything except your /boot partition.</p>

<p>Going to this level, you're going to be repartitioning pretty much your entire hard disk, so you might be best off just backing up everything (you should do this in any case), and reinstalling your system.</p>

<p>Some recent Linux installers make this sort of setup relatively pain-free. For example, <a href="http://www.ubuntu.com/">Ubuntu</a> 8.04's Alternative install disk gives the option of setting up an encrypted <span class="caps">LVM </span>volume to install the system on during its guided partitioning wizard. This is a rather easy way have your laptop's data securely encrypted quickly. However, with this setup, I wasn't able to get suspend-to-disk support to function properly (though I'm sure it could be done with a little extra effort, I don't know if most Ubuntu users would be willing to do so).</p>

<p>However, this guide is focused on the crowd of people who use distros that do not make this easy. For myself, I'm installing <a href="http://www.exherbo.org/">Exherbo</a> during this guide, but the instructions should be almost exactly the same for <a href="http://www.gentoo.org/">Gentoo</a>, or most any other distro.</p>

<h2 id="partitioning">Partitioning Overview</h2>

<p>For this first step, you will need to create two standard disk partitions. The first should be only 32M or so in size -- this will be our /boot partition, and should probably be ext2. The second will be the rest of the space you wish to devote to this Linux install (in my case, 10G).</p>

<p>The final layout of everything is going to be like this:</p>


<pre><code>
/dev/hda1 - /boot
/dev/hda2 - dm-crypt encrypted volume, containing one lvm2
  physical volume

/dev/mapper/hda2_crypt - what we get when we run cryptsetup luksOpen
  on hda2, contains one lvm physical volume, containing the volume
  group &quot;vg&quot;

/dev/mapper/vg-swap - our swap partition
/dev/mapper/vg-root - our root partition
</code></pre>



<p>With this layout, all our data that can be encrypted / lvm-ized is. And we only need to enter our disk decryption key once to get to all of it.</p>

<h2 id="next-time">Next Time...</h2>

<p>In my next few posts, I'll go into more details about how to set this partition scheme up, how to configure your kernel, and how to create the necessary initramfs image to boot from an encrypted @/@ partition.</p>]]></description>
            <link>http://blog.pioto.org/2008/05/encrypting-almost-your-entire.html</link>
            <guid>http://blog.pioto.org/2008/05/encrypting-almost-your-entire.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">encryption</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">hacks</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">paranoia</category>
            
            
            <pubDate>Wed, 28 May 2008 01:51:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Any good perl or FreeBSD books?</title>
            <description><![CDATA[<p>I'm starting to learn perl, and I've found the perldoc intro/tutorial stuff to be pretty useful, but I'd like to get a good printed book or two to read through and use as a reference.</p>

<p>Similarly, while I'd say I'm pretty *NIX savvy, I'm not too familiar with some <span class="caps">BSD</span>-isms, particularly where they differ from Linux. Are there any good books out there to help with the transition from Linux to FreeBSD? (No, I'm not abandoning Linux... it's just that my current employer used FreeBSD for many things.)</p>

<p>Any suggestions?</p>]]></description>
            <link>http://blog.pioto.org/2008/05/any-good-perl-or-freebsd-books.html</link>
            <guid>http://blog.pioto.org/2008/05/any-good-perl-or-freebsd-books.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">books</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">freebsd</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">perl</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">question</category>
            
            
            <pubDate>Sun, 25 May 2008 21:50:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Exherbo: Myths and Facts</title>
            <description><![CDATA[<p>So, some people seem to have gotten all in a tizzy about <a href="http://www.exherbo.org/">Exherbo</a>. While I don't personally think the wording on the front page is necessarily the best, here's the deal:</p>


<ul>
<li>We don't hate you. We just know we don't quite have something ready for general use. Rather than deal with many users wanting to try out something that most likely will not work for them, we have attempted to dissuade people from trying Exherbo until we think it's ready for them to.
<ul>
<li><em>"Then why announce it?"</em> Because Bryan is going to discuss it at an upcoming conference, so we decided we should have some sort of web page up. We didn't put it up on <a href="http://linux.slashdot.org/article.pl?sid=08%2F05%2F19%2F1711224">Slashdot</a>, though.</li>
</ul>
</li>
<li>This isn't <a href="http://ciaranm.wordpress.com/">Ciaran's</a> brainchild. It's <a href="http://kloeri.livejournal.com/5016.html">Bryan Østergaard's</a> (aka kloeri). Yes, Ciaran is involved in the project, along with a number of other former Gentoo developers, but he isn't the "lead" (though I don't think we really formal roles at this point).</li>
<li><em>"Why don't you use...?"</em> We've already looked at many existing projects to fill some of the spots we've decided to fill ourselves instead. For example, we took a look at upstart, Gentoo's baselayout 1.x, openrc, etc. However, none of them seemed to do quite what we wanted. That's why we're working on <a href="http://exherbo.org/projects.html">projects</a> like <em>genesis</em>, why we're writing our package tree from scratch, and using our own package format.</li>
</ul>



<p>So, I hope this helps to clarify things for some people who still seem to be confused as to what Exherbo is all about.</p>]]></description>
            <link>http://blog.pioto.org/2008/05/exherbo-myths-and-facts.html</link>
            <guid>http://blog.pioto.org/2008/05/exherbo-myths-and-facts.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">exherbo</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
            <pubDate>Sun, 25 May 2008 04:27:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Typo Upgrade</title>
            <description><![CDATA[<p>After an hour of fussing, I've upgraded typo to the latest version. Would have been much easier if their installation documentation were up to date... Enjoy the shiny new look.</p>]]></description>
            <link>http://blog.pioto.org/2008/02/typo-upgrade.html</link>
            <guid>http://blog.pioto.org/2008/02/typo-upgrade.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">typo</category>
            
            
            <pubDate>Wed, 27 Feb 2008 00:04:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Encrypting your /home</title>
            <description><![CDATA[<p>I was inspired by a post on the <a href="http://commandline.org.uk/linux/encrypt-your-home-directory-part-one-2007-12-08-14-00.html?showcomments=yes">Command Line Warriors blog</a> to encrypt my /home directory. Unfortunately, the directions given in that post don't quite work. Here is the process I followed to set everything up.</p>

<p>We're setting up a basic <span class="caps">LUKS </span>volume encrypted with <span class="caps">AES </span>with a 256-bit key. This means we make a special "filesystem" on the disk partition which encrypts our real filesystem on disk, and makes it available unencrypted via the device-mapper interface (/dev/mapper/).</p>

<p>First, you need to have a partition available for your /home directory. In my case, I decided to nuke my Windows install, but most people will probably need to use <a href="http://www.gnu.org/software/parted">parted</a> to resize some existing partitions. If you're resizing your root ("/") partition, you'll need to run it from a LiveCD. For the partition, I chose the "Linux" type, but I'm not sure that really matters.</p>

<p>Once you've allocated the partition, you'll need to create the <span class="caps">LUKS </span>partition. You do this with the <code>cryptsetup</code> command. But, before you can use this, you'll need to make sure you've compiled these settings into your kernel: <span class="caps">CONFIG</span>_DM_CRYPT, <span class="caps">CONFIG</span>_CRYPTO_CBC, <span class="caps">CONFIG</span>_CRYPTO_SHA256, and <span class="caps">CONFIG</span>_CRYPTO_AES.</p>

<p>After configuring your kernel and you've rebooting, if need be, you'll need to install sys-fs/cryptsetup. Don't install sys-fs/cryptsetup-luks... it's old. The newest (&gt;1.0) versions of cryptsetup are based on the -luks version, and are what you should be using.</p>

<p>Now, use cryptsetup to format the luks partition:</p>



<pre>
<code>
  cryptsetup luksFormat -c aes-cbc-essiv:sha256 /dev/hda4
</code>
</pre>



<p>Substitute <code>/dev/hda4</code> with whatever partition you created earlier. It will ask you to enter a password. Use a strong one, and don't just write it on a piece of paper by your computer, or you've defeated the whole point of this.</p>

<p>Now, we need to open the partition so we can create our encrypted data partition. We do this with the following:</p>



<pre>
<code>
  cryptsetup luksOpen /dev/hda4 crypt-home
</code>
</pre>



<p>This will make /dev/mapper/crypt-home, which is the device you use to mount your /home. Currently that partition is unformatted, so use your mkfs of choice to format it.</p>



<pre>
<code>
  mke2fs -j /dev/mapper/crypt-home
</code>
</pre>



<p>Next, make a temporary place to mount this so you can copy over your data, and mount it.</p>



<pre>
<code>
  mkdir /mnt/crypt-home
  mount /dev/mapper/crypt-home /mnt/crypt-home
</code>
</pre>



<p>And then, copy all your data from your current /home to the new one:</p>



<pre>
<code>
  rsync -tarv /home/* /mnt/crypt-home
</code>
</pre>



<p>Now would also be a good time to back up your important data to some other location.</p>

<p>Before we continue, we should configure the system to mount our new /home at boot. This requires editing /etc/fstab:</p>



<pre>
<code>
  # /etc/fstab
  # ... your other stuff ...
  /dev/mapper/crypt-home /home ext3 noatime 0 2
</code>
</pre>



<p>and /etc/conf.d/dmcrypt:</p>



<pre>
<code>
  # /etc/conf.d/dmcrypt
  # This file has all sorts of comments in it already
  # just uncomment the following:

  ## /home with passphrase
  target=crypt-home
  source='/dev/hda4'
</code>
</pre>



<p>Now all that is left is to remove the unencrypted copy of /home. First, you should go through and rm -rf anything that doesn't contain sensitive information, like open source project code, your mp3s, etc.</p>

<p>The last step is to use the <code>shred</code> command to securely delete all the remaining files. Shred works by overwriting a file many times with different patterns to make recovering them extremely difficult. Use the following commands to securely delete all the files in home, and then remove all the empty directories:</p>



<pre>
<code>
  find -H /home/*/ -type f -exec shred -u -v {} \;
  rm -rf /home/*/
</code>
</pre>



<p>Now, reboot and if everything went well, you should be prompted for your password, and then everything should just work as it did before.</p>]]></description>
            <link>http://blog.pioto.org/2007/12/encrypting-your-home.html</link>
            <guid>http://blog.pioto.org/2007/12/encrypting-your-home.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">encryption</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">gentoo</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">hacks</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">paranoia</category>
            
            
            <pubDate>Sat, 15 Dec 2007 08:44:00 -0500</pubDate>
        </item>
        
        <item>
            <title>paludis-commits list</title>
            <description><![CDATA[<p>I just set up a commits list for Paludis' subversion repository. You can subscribe to it at <a href="http://lists.pioto.org/mailman/listinfo/paludis-commits">http://lists.pioto.org/mailman/listinfo/paludis-commits</a></p>]]></description>
            <link>http://blog.pioto.org/2007/12/paludiscommits-list.html</link>
            <guid>http://blog.pioto.org/2007/12/paludiscommits-list.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
            
            <pubDate>Sat, 15 Dec 2007 04:38:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Switch to Apache2, WebDAV for Subversion, and evil google robots</title>
            <description><![CDATA[<p>So, I finally dropped lighttpd/fcgi and switched back to Apache 2.2. Trac is running with mod_python now. I think I've tracked down the main cause of our load/memory issues - googlebot. It was indexing all 4000 some revisions of our svn repository via the trac browser... bad stuff, but it should be blocked from that by our robots.txt now.</p>

<p>Also, I've added WebDav for Subversion now. Paludis is at <a href="http://svn.pioto.org/paludis">http://svn.pioto.org/paludis</a>, and the same is true for most of the other repos I host as well. Now those who have evil company/school firewalls and proxies can get through.</p>]]></description>
            <link>http://blog.pioto.org/2007/11/switch-to-apache2-webdav-for-s.html</link>
            <guid>http://blog.pioto.org/2007/11/switch-to-apache2-webdav-for-s.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">apache</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">google</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">lighttpd</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">pioto.org</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">subversion</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">trac</category>
            
            
            <pubDate>Thu, 15 Nov 2007 20:38:00 -0500</pubDate>
        </item>
        
        <item>
            <title>RbTPB - A ruby script for handling brightness/volume display on thinkpads</title>
            <description><![CDATA[<p>So, been a while, but here's something I just threw together. It's still a little rough around the edges, but it seems to be more robust than tpb for my system, at least, and it doesn't require me to make <code>/dev/nvram</code> available.</p>

<p>It uses <code>/sys/class/backlight/thinkpad_screen/actual_brightness</code> (from the <code>thinkpad_acpi</code> module in the 2.6.22 kernel) to figure out the screen brightness, and <code>/proc/acpi/ibm/volume</code> to figure out the volume and mute states, also provided by the <code>thinkpad_acpi</code> module (I'll switch to using sysfs for this when it becomes available).</p>

<p>It also requires the <a href="http://rubyforge.org/projects/ruby-xosd/">ruby-xosd</a> package, which you can get from my overlay: <code>svn://svn.pioto.org/pioto-overlay</code></p>

<p>For lazy paludis users, just add this to /etc/paludis/repositories/pioto-overlay.conf:</p>

<code>

<pre>
format = ebuild
location = /var/paludis/repositories/pioto-overlay
sync = svn://svn.pioto.org/pioto-overlay
master_repository = gentoo
names_cache = /var/cache/paludis/names
write_cache = /var/cache/paludis/metadata
</pre>

</code>

<p>You can get the current version of this script from subversion at: <a href="http://svn.pioto.org/rbtpb/trunk/">http://svn.pioto.org/rbtpb/trunk/</a></p>]]></description>
            <link>http://blog.pioto.org/2007/11/rbtpb-a-ruby-script-for-handli.html</link>
            <guid>http://blog.pioto.org/2007/11/rbtpb-a-ruby-script-for-handli.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">hacks</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">ruby</category>
            
            
            <pubDate>Mon, 12 Nov 2007 21:15:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Why can&apos;t Windows just use UTC?</title>
            <description><![CDATA[<p>So, I've been digging into why Windows XP can't deal with a system clock set in <span class="caps">UTC.</span> Apparently, it even keeps its internal time as <span class="caps">UTC, </span>but it still won't deal with a system clock set to non-local time.</p>

<p>I found <a href="http://blogs.msdn.com/oldnewthing/archive/2004/09/02/224672.aspx">this article</a> from an <span class="caps">MSDN </span>blog, which gives a decent summary of the reasons why. Basically, it would break support for some pre Windows NT/XP things. Well, XP and Vista already break enough other things compatability-wise that this shouldn't be such an issue now.</p>

<p>I also found <a href="http://www.cl.cam.ac.uk/~mgk25/mswish/ut-rtc.html">this nice article</a> on all the reasons it should be changed.</p>

<p>Apparently, a registry key does exist that once allowed people to use a system clock set to <span class="caps">UTC, </span>but it isn't documented, and most of the newer Windows code hasn't been updated to support it. No word on if Vista does a better job at this. Has anyone else had luck getting windows to cope with a <span class="caps">UTC </span>system clock?</p>]]></description>
            <link>http://blog.pioto.org/2007/08/why-cant-windows-just-use-utc.html</link>
            <guid>http://blog.pioto.org/2007/08/why-cant-windows-just-use-utc.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">windows</category>
            
            
            <pubDate>Fri, 03 Aug 2007 13:29:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Manifest 2, continued</title>
            <description><![CDATA[<p>Well, my work on adding <a href="http://paludis.pioto.org/trac/ticket/253">Manifest-2 generation support</a> to <a href="http://paludis.pioto.org/">Paludis</a> is nearly done. Look for the final commit tomorrow afternoon.</p>

<p>So, now I need another project to pick up. Suggestions?</p>]]></description>
            <link>http://blog.pioto.org/2007/07/manifest-2-continued.html</link>
            <guid>http://blog.pioto.org/2007/07/manifest-2-continued.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
            
            <pubDate>Mon, 23 Jul 2007 05:32:00 -0500</pubDate>
        </item>
        
        <item>
            <title>So long Gentoo...</title>
            <description><![CDATA[<p>See <a href="http://thread.gmane.org/gmane.linux.gentoo.devel/50441">this post</a> to the gentoo-dev mailing list for the nitty-gritty.</p>

<p><strong>Update (2008-02-26)</strong>: Fix the link (archives.gentoo.org broke all links a few weeks ago).</p>]]></description>
            <link>http://blog.pioto.org/2007/07/so-long-gentoo.html</link>
            <guid>http://blog.pioto.org/2007/07/so-long-gentoo.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">gentoo</category>
            
            
            <pubDate>Sat, 14 Jul 2007 04:07:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Typo and Planet: there is no love between them</title>
            <description><![CDATA[<p>Hmm, looks like either Typo is being stupid, or Planet is...</p>

<p>I'd like to blame planet, but I'll look into my config a bit later on.</p>]]></description>
            <link>http://blog.pioto.org/2007/07/typo-and-planet-there-is-no-lo.html</link>
            <guid>http://blog.pioto.org/2007/07/typo-and-planet-there-is-no-lo.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">pioto.org</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">typo</category>
            
            
            <pubDate>Tue, 10 Jul 2007 00:55:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Manifest2 for Paludis</title>
            <description><![CDATA[<p>I'm currently working on Manifest2 support for paludis (both validating and generating). It should be done Real Soon Now. If you're interested, pay attention to <a href="http://paludis.pioto.org/trac/ticket/253">Ticket 253</a>.</p>]]></description>
            <link>http://blog.pioto.org/2007/07/manifest2-for-paludis.html</link>
            <guid>http://blog.pioto.org/2007/07/manifest2-for-paludis.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
            
            <pubDate>Fri, 06 Jul 2007 15:28:00 -0500</pubDate>
        </item>
        
        <item>
            <title>Migrating Trac from SQLite to MySQL</title>
            <description><![CDATA[<p>Yesterday I finally got around to migrating the <a href="http://trac.edgewall.org/">Trac</a> page for <a href="http://paludis.pioto.org/">Paludis</a> from using <span class="caps">SQL</span>ite to MySQL. Hopefully this will help with all the system load and locking issues we've seen recently.</p>]]></description>
            <link>http://blog.pioto.org/2007/07/migrating-trac-from-sqlite-to.html</link>
            <guid>http://blog.pioto.org/2007/07/migrating-trac-from-sqlite-to.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">mysql</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">paludis</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">pioto.org</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">trac</category>
            
            
            <pubDate>Fri, 06 Jul 2007 14:20:00 -0500</pubDate>
        </item>
        
    </channel>
</rss>
