<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Pioto&apos;s Blog</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/" />
    <link rel="self" type="application/atom+xml" href="http://blog.pioto.org/atom.xml" />
    <id>tag:blog.pioto.org,2009-02-10://1</id>
    <updated>2012-05-15T16:57:45Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 5.14-en</generator>

<entry>
    <title>Random Perl Hacking</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2009/10/random-perl-hacking.html" />
    <id>tag:blog.pioto.org,2009://1.26</id>

    <published>2009-10-21T01:25:25Z</published>
    <updated>2012-05-15T16:57:45Z</updated>

    <summary>My day job mostly involves Perl, so I&apos;ve been using it more for my random tasks at home. I&apos;ve now put a few of them up on CPAN: Unix::Uptime - Determine the current uptime, in seconds, and load averages, across...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="perl" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p>My day job mostly involves Perl, so I've been using it more for my random tasks at home. I've now put a few of them up on <span class="caps">CPAN</span>:</p>

<ul>
<li><a href="http://search.cpan.org/~pioto/Unix-Uptime/">Unix::Uptime</a> - Determine the current uptime, in seconds, and load averages, across different *NIX architectures.</li>
<li><a href="http://search.cpan.org/~pioto/Remind-Client/">Remind::Client</a> - class for working with <a href="http://www.roaringpenguin.com/products/remind">remind</a>'s daemon mode  </li>
</ul>

<p>I also have a few other scripts I've been messing around with, for doing some reporting and such:</p>

<ul>
<li><a href="https://github.com/pioto/pioto-scripts/blob/master/reports/git-author-stats.pl">git-author-stats.pl</a> - Gives a <span class="caps">URL </span>to draw a pretty pie chart of the top 10 committers to the current git repository. Examples:<ul>
<li>Exherbo:<ul>
<li><a href="http://chart.apis.google.com/chart?chtt=Top+10+Authors+for+git%3A%2F%2Fgit.exherbo.org%2Fx11.git&amp;chs=650x250&amp;cht=p3&amp;chco=006600&amp;chd=t%3A37.396694214876%2C28.8739669421488%2C16.0640495867769%2C4.59710743801653%2C2.58264462809917%2C1.5495867768595%2C1.39462809917355%2C0.723140495867769%2C0.723140495867769%2C0.671487603305785%2C0.671487603305785%2C4.75206611570248&amp;chl=Ingmar+Vanhassel+%28724%29%7CAlexander+F%C3%A6r%C3%B8y+%28559%29%7CBernd+Steinhauser+%28311%29%7CSaleem+Abdulrasool+%2889%29%7CBo+%C3%98rsted+Andresen+%2850%29%7CDavid+Leverton+%2830%29%7CMarvin+Schmidt+%2827%29%7CMichael+Forney+%2814%29%7CBryan+%C3%98stergaard+%2814%29%7CMike+Kelly+%2813%29%7CArne+Janbu+%2813%29%7COther+%2892%29">::x11</a></li>
<li><a href="http://chart.apis.google.com/chart?chtt=Top+10+Authors+for+git%3A%2F%2Fgit.exherbo.org%2Fvim.git&amp;chs=650x250&amp;cht=p3&amp;chco=006600&amp;chd=t%3A33.3333333333333%2C20%2C13.3333333333333%2C13.3333333333333%2C6.66666666666667%2C6.66666666666667%2C6.66666666666667%2C0&amp;chl=Ciaran+McCreesh+%285%29%7CSaleem+Abdulrasool+%283%29%7CIngmar+Vanhassel+%282%29%7CAli+Polatel+%282%29%7CMarkus+Rothe+%281%29%7CHong+Hao+%281%29%7CMike+Kelly+%281%29">::vim</a></li>
<li><a href="http://chart.apis.google.com/chart?chtt=Top+10+Authors+for+git%3A%2F%2Fgit.exherbo.org%2Farbor.git+on+multilib&amp;chs=650x250&amp;cht=p3&amp;chco=006600&amp;chd=t%3A30.3276539973788%2C10.9043250327654%2C7.86369593709043%2C7.54914809960682%2C5.66186107470511%2C4.77064220183486%2C4.03669724770642%2C3.6173001310616%2C3.40760157273919%2C3.19790301441678%2C2.59501965923984%2C16.0681520314548&amp;chl=Ingmar+Vanhassel+%281157%29%7CBo+%C3%98rsted+Andresen+%28416%29%7CDavid+Leverton+%28300%29%7CWulf+C.+Krueger+%28288%29%7CMike+Kelly+%28216%29%7CSaleem+Abdulrasool+%28182%29%7CBryan+%C3%98stergaard+%28154%29%7CMarkus+Rothe+%28138%29%7CDaniel+Mierswa+%28130%29%7CAnders+Ossowicki+%28122%29%7CCiaran+McCreesh+%2899%29%7COther+%28613%29">::arbor's multilib branch</a></li>
</ul>
</li>
<li><a href="http://chart.apis.google.com/chart?chtt=Top+10+Authors+for+git%3A%2F%2Fgit.pioto.org%2Fpaludis.git&amp;chs=650x250&amp;cht=p3&amp;chco=006600&amp;chd=t%3A66.7058362710537%2C12.7105366235801%2C5.03329416372895%2C3.32941637289463%2C2.7222875048962%2C1.95848021934978%2C1.62553858206032%2C1.27301214257736%2C1.27301214257736%2C0.959655307481394%2C0.411280846063455%2C1.99764982373678&amp;chl=Ciaran+McCreesh+%283406%29%7CDavid+Leverton+%28649%29%7CRichard+Brown+%28257%29%7CPiotr+Jaroszy%C5%84ski+%28170%29%7CMike+Kelly+%28139%29%7CStephen+P.+Bennett+%28100%29%7CIngmar+Vanhassel+%2883%29%7CFernando+J.+Pereda+%2865%29%7CDanny+van+Dyk+%2865%29%7CBo+%C3%98rsted+Andresen+%2849%29%7CAli+Polatel+%2821%29%7COther+%28102%29">Paludis</a></li>
</ul>
</li>
<li><a href="https://github.com/pioto/pioto-scripts/blob/master/reports/git-daemon-report.pl">git-daemon-report.pl</a> - Given some log file, scrape it stats on who is pulling which of your git repos, and from where. Won't work unless you run git-daemon with --verbose.</li>
</ul>]]>
        
    </content>
</entry>

<entry>
    <title>Migrating from Typo to Movable Type</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2009/05/migrating-from-typo-to-movable.html" />
    <id>tag:blog.pioto.org,2009://1.25</id>

    <published>2009-05-30T15:57:45Z</published>
    <updated>2012-05-15T17:00:27Z</updated>

    <summary>I migrated my blog from Typo to Movable Type a while ago. I wrote a little script to do it, but I&apos;ve only just now gotten around to cleaning it up enough so that it&apos;s suitable for general use. It&apos;s...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="typo" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cpanperltypomt" label="cpan perl typo mt" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p>I migrated my blog from <a href="http://typosphere.org/">Typo</a> to <a href="http://www.movabletype.org/">Movable Type</a> a while ago. I wrote a little script to do it, but I've only just now gotten around to cleaning it up enough so that it's suitable for general use.</p>

<p>It's available now from my <a href="https://github.com/pioto/typo2mt">git repo</a>, and on <a href="http://search.cpan.org/~pioto/typo2mt/"><span class="caps">CPAN</span></a></p>

<p>As always, "patches welcome".</p>]]>
        
    </content>
</entry>

<entry>
    <title>My random old scripts moved to git</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2009/02/my-random-old-scripts-moved-to.html" />
    <id>tag:blog.pioto.org,2009://1.24</id>

    <published>2009-02-22T15:01:53Z</published>
    <updated>2012-06-08T19:57:39Z</updated>

    <summary>So, I had a few random old scripts lying around in SVN. I&apos;ve migrated them to git now. Along with my other repos, they&apos;re browseable at http://git.pioto.org/ Things of interest might be: rbtpb - A replacement for tpb which is...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="git" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="pioto.org" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="subversion" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p>So, I had a few random old scripts lying around in <span class="caps">SVN.</span> I've migrated them to git now. Along with my other repos, they're browseable at <a href="http://git.pioto.org/">http://git.pioto.org/</a></p>

<p>Things of interest might be:</p>

<ul>
<li><a href="https://github.com/pioto/rbtpb">rbtpb</a> - A replacement for tpb which is hopefully more robust.</li>
<li><a href="https://github.com/pioto/rubeak">rubeak</a> - A tool for handling multimedia keyboard keys, and some IR remotes.</li>
</ul>

<p><strong>Update</strong>: fixed links.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Disk encryption w/ dm-crypt (LUKS) and lvm2, part 4</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2009/02/disk-encryption-w-dm-crypt-luk.html" />
    <id>tag:blog.pioto.org,2009://1.23</id>

    <published>2009-02-07T14:05:19Z</published>
    <updated>2009-02-07T14:21:09Z</updated>

    <summary>Previously I described how to partition your drive using LVM2 and dm-crypt. This time, I&apos;m going to go over how to boot this system. First off, you&apos;re going to want to have your livecd handy, because it&apos;s likely something won&apos;t...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="encryption" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paranoia" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p><a href="http://blog.pioto.org/2009/02/disk-encryption-w-dm-crypt-luks-and-lvm2-part-3.html">Previously</a> I described how to partition your drive using <span class="caps">LVM2 </span>and dm-crypt. This time, I'm going to go over how to boot this system.</p>

<p>First off, you're going to want to have your livecd handy, because it's likely something won't quite be right the first time around. Also, you'll want to make sure your kernel is built with support for initramfs. This requires the <code>BLK_DEV_INITRD</code> configure option, named "Initial <span class="caps">RAM </span>filesystem and <span class="caps">RAM </span>disk (initramfs/initrd) support" in the "General setup" menu. You'll then need to specify the location of a source file for the initramfs. </p>

<p>Probably the easiest thing to do is to grab my current <a href="http://git.pioto.org/gitweb/pioto-initramfs.git">initramfs package</a> and tweak it to suit your needs. You'll at the least need to change some paths in the config.txt and init files. But, it should serve as a good starting point. When you're done, put the path to the config.txt file in the "Initramfs source file(s)" (<code>CONFIG_INITRAMFS_SOURCE</code>) setting in the kernel.</p>

<p>Now, rebuild and reinstall your kernel, reboot, and pray.</p>

<p>I hope this will help people improve their laptop's security. Feel free to post any questions you have in the comments. Good luck!</p>]]>
        
    </content>
</entry>

<entry>
    <title>Disk encryption w/ dm-crypt (LUKS) and lvm2, part 3</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2009/02/disk-encryption-w-dm-crypt-luks-and-lvm2-part-3.html" />
    <id>tag:blog.pioto.org,2009://1.22</id>

    <published>2009-02-07T13:28:22Z</published>
    <updated>2009-02-07T14:03:32Z</updated>

    <summary>Last time I kinda cheated and gave pretty much a redux of an earlier post. This one will hopefully have some more substance to it. The partitioning scheme I&apos;m currently using is like this: /dev/sda1 - /boot (ext2) /dev/sda2 -...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="encryption" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paranoia" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p><a href="http://blog.pioto.org/2008/12/encrypting-almost-your-entire-1.html">Last time</a> I kinda cheated and gave pretty much a redux of an earlier post. This one will hopefully have some more substance to it.</p>

<p>The partitioning scheme I'm currently using is like this:</p>

<pre><code>/dev/sda1 - /boot (ext2)
/dev/sda2 - LUKS encrypted lvm2 physical volume</code></pre>

<p>The /boot partition is created like any normal ext2 partition.</p>

<p>The sda2 partition is created like so:</p>

<pre><code>cryptsetup luksFormat /dev/sda2</code></pre>

<p>This usually is sufficient to provide decent encryption, but it is worth checking the documentation for cryptsetup to look for further options -- in particular, the option to use a keyfile.</p>

<p>Once we formatted this partition, we'll need to open it, so that we can then add our lvm pv to it:</p>

<pre><code>cryptsetup luksOpen /dev/sda2 sda2_crypt</code></pre>

<p>We'll now have a new device available as /dev/mapper/sda2_crypt. This can be treated just like any other block device -- we could just format it as a regular ext3 partition, but then we can't really ever resize it. So, we're going to make a <span class="caps">LVM2 </span>partition:</p>

<pre><code>pvcreate /dev/mapper/sda2_crypt</code></pre>

<p>Now, we create a volume group. I choose 'Exherbo' as the name, but you can really just use whatever (often people just use 'vg').</p>

<pre><code>vgcreate Exherbo /dev/mapper/sda2_crypt</code></pre>

<p>Now, we just need to make our partitions:</p>

<pre><code>lvcreate -L 1G -n swap Exherbo
lvcreate -n root Exherbo
vgscan
vgchange -a y</code></pre>

<p>This creates a 1G swap partition, and uses the rest of the space for our root (/) partition. Again, see the documentation for lvm2 for more options.</p>

<p>Finally, we need to format those partitions:</p>

<pre><code>mkswap /dev/mapper/Exherbo-swap
mke2fs -T ext3 /dev/mapper/Exherbo-root</code></pre>

<p>Next time, I'll go over how to boot this system.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Encrypting (almost) your entire hard drive with dm-crypt (LUKS) and lvm2, Part 2</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/12/encrypting-almost-your-entire-1.html" />
    <id>tag:blog.pioto.org,2008://1.21</id>

    <published>2008-12-28T15:16:21Z</published>
    <updated>2009-01-02T17:22:25Z</updated>

    <summary>Six months ago I posted an outline for encrypting your system with LUKS. Well, I figure it&apos;s about time for me to write up how to actually go about it. In this post, I&apos;ll outline the necessary kernel configuration. The...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="encryption" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paranoia" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p><a href="http://blog.pioto.org/2008/05/encrypting-almost-your-entire.html">Six months ago</a> I posted an outline for encrypting your system with <span class="caps">LUKS.</span> Well, I figure it's about time for me to write up how to actually go about it. In this post, I'll outline the necessary kernel configuration.</p>

<p>The basic kernel configuration that I mentioned <a href="http://blog.pioto.org/2007/12/encrypting-your-home.html">a long time ago</a> still holds. Basically, you need to have the following options built 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. Most of those will be turned on when you enable:</p>



<pre>
Device Drivers -&gt;
  Multiple devices driver support (RAID and LVM) -&gt;
    Device mapper support -&gt;
      Crypt target support
</pre>



<p>However, the <span class="caps">SHA256 </span>support will not be. It can be found at:</p>



<pre>
Cryptographic API -&gt;
  SHA224 and SHA256 digest algorithm
</pre>



<p>On the note of kernel configuation: for this process, you will need to do a fair amount of work from within another linux environment (most likely a LiveCD). For Gentoo, the most recent CD image I've found that has all the necessary configuration is the 2006.1 version... As I recall, some of the intermediate minimal CDs, at least, didn't possess cryptsetup at all. And the most recent weekly build I tried, while it did have lvm and cryptsetup installed, didn't have <span class="caps">CONFIG</span>_CRYPTO_SHA256 either built in, or as a module.</p>

<p>Probably the best bet is an <a href="http://www.ubuntu.com/">Ubuntu</a> 8.10 Alternative <span class="caps">CD.</span> You'll have to either boot in recovery mode, or go through a bit of the installation procedure, as it doesn't initially have cryptsetup available. But, once it's detected the CD and loaded the modules from it, you can just switch to another virtual console and do things from there.</p>

<p>Next time, I'll outline creating the disk partitions.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Pioto.org is Moving</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/06/piotoorg-is-moving.html" />
    <id>tag:blog.pioto.org,2008://1.20</id>

    <published>2008-06-04T06:24:00Z</published>
    <updated>2008-06-05T01:03:09Z</updated>

    <summary>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, Paludis ticket #582 has the details....</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="paludis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="pioto.org" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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>]]>
        
    </content>
</entry>

<entry>
    <title>Encrypting (almost) your entire hard drive with dm-crypt (LUKS) and lvm2, Part 1</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/05/encrypting-almost-your-entire.html" />
    <id>tag:blog.pioto.org,2008://1.19</id>

    <published>2008-05-28T05:51:00Z</published>
    <updated>2008-06-05T01:03:09Z</updated>

    <summary>Introduction About five months ago, 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...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="encryption" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paranoia" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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 <code>/</code> partition.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Any good perl or FreeBSD books?</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/05/any-good-perl-or-freebsd-books.html" />
    <id>tag:blog.pioto.org,2008://1.18</id>

    <published>2008-05-26T01:50:00Z</published>
    <updated>2008-06-05T01:03:09Z</updated>

    <summary>I&apos;m starting to learn perl, and I&apos;ve found the perldoc intro/tutorial stuff to be pretty useful, but I&apos;d like to get a good printed book or two to read through and use as a reference. Similarly, while I&apos;d say I&apos;m...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="books" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="freebsd" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="perl" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="question" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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>]]>
        
    </content>
</entry>

<entry>
    <title>Exherbo: Myths and Facts</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/05/exherbo-myths-and-facts.html" />
    <id>tag:blog.pioto.org,2008://1.17</id>

    <published>2008-05-25T08:27:00Z</published>
    <updated>2012-06-08T20:16:52Z</updated>

    <summary>So, some people seem to have gotten all in a tizzy about Exherbo. While I don&apos;t personally think the wording on the front page is necessarily the best, here&apos;s the deal: We don&apos;t hate you. We just know we don&apos;t...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="exherbo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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://web.archive.org/web/20080528232423/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>

<p><strong>Update</strong>: fix links.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Typo Upgrade</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2008/02/typo-upgrade.html" />
    <id>tag:blog.pioto.org,2008://1.16</id>

    <published>2008-02-27T05:04:00Z</published>
    <updated>2008-06-05T01:03:09Z</updated>

    <summary>After an hour of fussing, I&apos;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....</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="typo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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>]]>
        
    </content>
</entry>

<entry>
    <title>Encrypting your /home</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2007/12/encrypting-your-home.html" />
    <id>tag:blog.pioto.org,2007://1.15</id>

    <published>2007-12-15T13:44:00Z</published>
    <updated>2012-06-08T20:12:49Z</updated>

    <summary>I was inspired by a post on the Command Line Warriors blog to encrypt my /home directory. Unfortunately, the directions given in that post don&apos;t quite work. Here is the process I followed to set everything up. We&apos;re setting up...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="encryption" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="gentoo" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paranoia" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![CDATA[<p>I was inspired by a post on the <a href="http://commandline.org.uk/linux/encrypt-your-home-directory-part-one/">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>

<p><strong>Update</strong>: fixed links.</p>]]>
        
    </content>
</entry>

<entry>
    <title>paludis-commits list</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2007/12/paludiscommits-list.html" />
    <id>tag:blog.pioto.org,2007://1.14</id>

    <published>2007-12-15T09:38:00Z</published>
    <updated>2008-06-05T01:03:09Z</updated>

    <summary>I just set up a commits list for Paludis&apos; subversion repository. You can subscribe to it at http://lists.pioto.org/mailman/listinfo/paludis-commits...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="paludis" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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>]]>
        
    </content>
</entry>

<entry>
    <title>Switch to Apache2, WebDAV for Subversion, and evil google robots</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2007/11/switch-to-apache2-webdav-for-s.html" />
    <id>tag:blog.pioto.org,2007://1.13</id>

    <published>2007-11-16T01:38:00Z</published>
    <updated>2012-06-08T20:07:29Z</updated>

    <summary>So, I finally dropped lighttpd/fcgi and switched back to Apache 2.2. Trac is running with mod_python now. I think I&apos;ve tracked down the main cause of our load/memory issues - googlebot. It was indexing all 4000 some revisions of our...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="apache" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="google" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="lighttpd" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="paludis" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="pioto.org" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="subversion" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="trac" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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 <del>http://svn.pioto.org/paludis</del>, 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>

<p><strong>Update</strong>: <span class="caps">SVN </span>is sooooo 2007. Paludis is using git now: <a href="http://git.exherbo.org/paludis/paludis.git/">http://git.exherbo.org/paludis/paludis.git/</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>RbTPB - A ruby script for handling brightness/volume display on thinkpads</title>
    <link rel="alternate" type="text/html" href="http://blog.pioto.org/2007/11/rbtpb-a-ruby-script-for-handli.html" />
    <id>tag:blog.pioto.org,2007://1.12</id>

    <published>2007-11-13T02:15:00Z</published>
    <updated>2012-06-08T19:55:14Z</updated>

    <summary>So, been a while, but here&apos;s something I just threw together. It&apos;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&apos;t require me to make...</summary>
    <author>
        <name>Mike Kelly</name>
        <uri>http://www.pioto.org/</uri>
    </author>
    
        <category term="hacks" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="ruby" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://blog.pioto.org/">
        <![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>git://git.pioto.org/pioto-overlay.git</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 = git://git.pioto.org/pioto-overlay.git
master_repository = gentoo
names_cache = /var/cache/paludis/names
write_cache = /var/cache/paludis/metadata
</pre>

</code>

<p>Or, you can just do: <code>playman -a pioto-overlay</code></p>

<p>You can get the current version of this script from git at: <a href="https://github.com/pioto/rbtpb">https://github.com/pioto/rbtpb</a></p>

<p><strong>Update</strong>: Fix links.<br />
<strong>Update 2</strong>: Fix links, again.</p>]]>
        
    </content>
</entry>

</feed>
