<?xml version="1.0" encoding="UTF-8"?>
<essay xml:lang="en" version="lillet" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gal="http://norman.walsh.name/rdf/gallery#">
<info>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
<title>Ubuntu Me!</title><biblioid class="uri">http://norman.walsh.name/2005/09/12/ubuntu</biblioid>
<volumenum>8</volumenum>
<issuenum>117</issuenum>
<pubdate>2005-09-12T06:32:42-04:00</pubdate>
<date>$Date: 2005-09-13 09:40:42 -0400 (Tue, 13 Sep 2005) $</date>
<author>
      <personname>
<firstname>Norman</firstname>
	<surname>Walsh</surname>
</personname>
    </author>
<copyright>
      <year>2005</year>
      <holder>Norman Walsh</holder>
    </copyright>
<abstract>
<para>Notes on switching to Ubuntu: the good,
the annoying, and the seriously bad.</para>
</abstract>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Linux"/>
<dc:subject rdf:resource="http://norman.walsh.name/knows/taxonomy#Ubuntu"/>
</info>

<para xml:id="p0">[Update:
<link xlink:href="../13/ubuntu-update">no more badness</link>.]</para>

<para xml:id="p1">After a decade of
<link xlink:href="http://en.wikipedia.org/wiki/Debian">Debian</link>
(give or take a few
awful years when I was forced to run a proprietary OS), I decided I'd give
<link xlink:href="http://en.wikipedia.org/wiki/Ubuntu_Linux">Ubuntu</link>
a try. Ubuntu is
<link xlink:href="http://www.ubuntu.com/ubuntu/relationship/">built on top
of Debian</link> and I'm sure I never would have switched if it
hadn't been, so this migration isn't intended as a criticism of Debian.</para>

<para xml:id="p2">Some folks subscribe to the “if it ain't broke,
don't fix it” motto, but I've never been very content that way. If it
can be made better, isn't it just a little bit broken? Anyway, it's
certainly reasonable to ask why I'd go off and do something as radical
as start my desktop OS from scratch.</para>

<para xml:id="p3">I had several motivations:</para>

<orderedlist>
<listitem>
<para xml:id="p4">I wanted to use encrypted partitions for my email
and other documents. Granted, I don't really have anything on my
laptop that's worthy of corporate espionage, nor do I have any deep,
dark secrets in my email that would make good blackmail fodder, but
the villains don't know that. And it irks me that they could boot with a
<link xlink:href="http://en.wikipedia.org/wiki/Knoppix">Knoppix</link>
CD and read my disk. Not anymore.</para>
</listitem>

<listitem>
<para xml:id="p5">I wanted a distribution that stayed a little closer
to the bleeding edge. I've heard good things from friends and
colleagues about Ubuntu and it seems to be aimed at achieving a good
balance between stability and the absolute latest releases.</para>
</listitem>

<listitem>
<para xml:id="p6">My system is a collection of hacks on top of hacks.
This isn't a bad thing, it just reflects years of working through bugs
and issues with alpha versions of everything. I wanted to “start
over”. I'm really trying to minimize the amount of customization I do,
I'm trying to use the advertised interfaces as much as possible and
hacking <filename>/etc/init.d/</filename> as little as
possible.</para>
</listitem>

<listitem>
<para xml:id="p7">I'm feeling hugely over-stressed. I have deadlines on top of
deadlines and I needed <emphasis>something</emphasis> to do in the evenings
that would be distracting but not too hard. I'm sure this is bad time
management, but it keeps me sane.</para>
</listitem>
</orderedlist>

<section xml:id="gettingstarted">
<title>Getting Started</title>

<para xml:id="p8">There was no way to do this “in place” without risking my
ability to get my day job done, so I stared with a new 80Gb disk. The
first step was booting the Ubuntu “Hoary Hedgehog” install CD and
partitioning the disk.</para>

<para xml:id="p9">As near as I can tell, partitioning is as much art
as science. I had a couple of constraints to consider: first, I wanted
to encrypt part of the disk and second, I store email in individual
files. Encryption meant that I needed an unencrypted boot partition
and an encrypted partition. Efficiently storing a quarter of a million
small email messages in individual files means that I need a partition
for that too (so that I can set a small block size).</para>

<para xml:id="p10">I think it's possible to make a very tiny unencrypted boot
partition and store the majority of the system on the encrypted partition,
but I decided not to bother. I don't need to encrypt the OS. In the
end, I created five partitions:</para>

<informaltable>
<tgroup cols="3">
<?dbhtml table-summary="Disk partition summary"?>
<colspec colwidth="1*"/>
<colspec colwidth="1*"/>
<colspec colwidth="3*"/>
<thead>
<row>
  <entry align="left">Partition</entry>
  <entry align="left">Size</entry>
  <entry align="left">Notes</entry>
</row>
</thead>
<tbody>
<row>
  <entry><filename class="partition">hda1</filename>, unused</entry>
  <entry>10Gb</entry>
  <entry>In case I need some proprietary OS someday</entry>
</row>
<row>
  <entry><filename class="partition">hda2</filename>, root</entry>
  <entry>25Gb</entry>
  <entry>The OS</entry>
</row>
<row>
  <entry><filename class="partition">hda3</filename>, swap</entry>
  <entry>2Gb</entry>
  <entry>Big enough for hibernation</entry>
</row>
<row>
  <entry><filename class="partition">hda5</filename>, data</entry>
  <entry>39Gb</entry>
  <entry>Encrypted data</entry>
</row>
<row>
  <entry><filename class="partition">hda6</filename>, mail</entry>
  <entry>4 Gb</entry>
  <entry>Encrypted mail</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</section>

<section xml:id="upandrunning">
<title>Getting Up and Running</title>

<para xml:id="p11">After partitioning, I finished the “Hoary” install
and poked about. No
<application xlink:href="http://en.wikipedia.org/wiki/Fvwm">fvwm</application>.
Hmm. Not good. Not even livable. I could have grabbed
the source, but I'm trying not to do that. A little exploration
revealed that it's in the next Ubuntu release, the soon-to-be-ready
“Breezy Badger”. What the heck: fiddle
<filename>/etc/apt/sources.list</filename>,
run <command>apt-get update; apt-get dist-upgrade</command>, and
I'm running “Breezy”.</para>

<para xml:id="p12">Get <application>fvwm</application> and switch to it.</para>

<para xml:id="p13">I'm sure lots of folks <emphasis>want</emphasis> to have
<application xlink:href="http://en.wikipedia.org/wiki/Nautilus_file_manager">Nautilus</application>
running on their root window, but not
me. I work with a six-desktop layout:
desk 0 is my main work desktop, it has an
<application xlink:href="http://en.wikipedia.org/wiki/Emacs">emacs</application>
and two shell windows;
desk 1 is for browsing, it has
<application xlink:href="http://en.wikipedia.org/wiki/Firefox">firefox</application>;
desk 2 is for email, it has an emacs, two shell windows,
<application xlink:href="http://en.wikipedia.org/wiki/Xchat">X-Chat</application>,
and
<application xlink:href="http://en.wikipedia.org/wiki/Gaim">Gaim</application>;
desk 3 is for VPN; and desks 4 and 5 are scratch space.
There is no useful amount of root window visible on any of the desktops
I routinely use and the only purpose for the little slivers that are visible
is so that I can popup root menus. Getting
nautilus off the root window requires 
unchecking
<guimenuitem>/apps/nautilus/preferences/show_desktop</guimenuitem> in
<command>gconf-editor</command>.</para>

<para xml:id="p14">Speaking of desktops, why doesn't the
<application>Workspace Switcher</application> remember my preferences?
Why does it always show four desktops when it starts instead of the
six that I keep telling it I want?</para>

<sidebar xml:id="gconfeditor">
<title>Sidebar: Configuration Editor</title>
<para xml:id="p15">By the way, if there are any
<link xlink:href="http://en.wikipedia.org/wiki/GNOME">Gnome</link>
developers reading this, <command>gconf-editor</command> is not a feature,
it's a bug. Please don't reinvent the
<link xlink:href="http://en.wikipedia.org/wiki/Windows_registry">Windows
Registry</link>. All these configuration settings ought to be in text files,
probably XML, somewhere under <filename>~/.gnome</filename> where I can
<emphasis>grep for things</emphasis>! If you need a binary version for speed,
fine, rebuild it every time I touch one of the real configuration files.</para>
</sidebar>

<para xml:id="p16">Next annoyance, why don't any of the
<application>gcc</application> packages create the
<filename>/usr/bin/gcc</filename> symlink? Doesn't matter: symlink
created.</para>

<para xml:id="p17">At this point, I had a working system, so I setup
the encrypted partitions with <link xlink:href="http://www.saout.de/misc/dm-crypt/">dm-crypt</link> and
copied my data onto the new disk. Everything went smoothly. Both
partitions are encrypted and when I boot, the system asks for the
pass phrases. Here's a patch I decided I had to make: the distributed
<filename>/etc/init.d/cryptdisks</filename> only asks once for each password.
My typing is good, but the pass phrases are fairly long and my typing
isn't <emphasis>that</emphasis> good. I decided to <link xlink:href="examples/cryptdisks">patch cryptdisks</link> so that it
will ask up to five times. I also figured it should run <command>e2fsck</command>
before mounting the partitions.</para>

<para xml:id="p18">A consequence of having to type passwords
at boot time is that the pretty, graphical “splash boot” option doesn't
really work, so I turned it off.</para>

<para xml:id="p19">Next I installed the Thinkpad modules (for my
<link xlink:href="/2004/09/20/newLaptop">T42p</link>), switched to the
“686” version of the Ubuntu 2.6.12-8 kernel, and installed my network
printer under CUPS. All straightforward.</para>

<para xml:id="p20">There doesn't seem to be an Ubuntu or Debian package for
<application xlink:href="http://www.mplayerhq.hu/homepage/design7/news.html">mplayer</application>,
my video player of choice. In fairness, the mplayer build is
pretty aggressive about optimizing for your hardware, so maybe it makes
sense to build that one from source.
Another annoyance: building <application>mplayer</application>
revealed that Ubuntu puts the X11 include files in
<filename>/usr/include/X11</filename> instead of the expected
<filename>/usr/X11R6/include/X11</filename>, but a symlink fixed that.
</para>

<para xml:id="p21">Another unpackaged application: <link xlink:href="http://www.nuclearelephant.com/projects/dspam/">dspam</link>.
Getting that setup required retraining my spam filter, but that turned
out not to be too hard. Switching to
<application xlink:href="http://en.wikipedia.org/wiki/Exim">exim4</application>
and getting my various spam-filtering,
<link xlink:href="http://www.dyndns.org/services/mailhop/forward.html">mailhop
forwarding</link>, work, and home configurations setup was a bit
more tedious, but I got there.</para>

<para xml:id="p22">Getting Gnome to use the “emacs” theme (an absolute requirement, from
my point of view) required another trip through
<command>gconf-editor</command> to 
<guimenuitem>/desktop/gnome/interface/gtk_key_theme</guimenuitem> to set it
to “Emacs”.</para>

<para xml:id="p23">I was naively expecting to just copy my
<application xlink:href="http://en.wikipedia.org/wiki/Subversion_%28software%29">subversion</application>
repositories, but instead I had to dump and
restore them. I also moved the location of the working directory for
this site, so I decided to rebuild the whole thing, just to make sure
I got all the configuration correct. After a couple of false starts, I
got there. I think.</para>

<para xml:id="p24">Ubuntu installs a whole bunch of X11 drivers
for various video cards. Why can't I uninstall all the ones that I don't
actually need? The way the dependencies are setup, it's all or none.
Well, I guess disk space is cheap.</para>

<para xml:id="p25">The last thing I had to figure out was where to install my
firewall configuration (an
<link xlink:href="http://en.wikipedia.org/wiki/Iptables">iptables</link>
script). Installing the Ubuntu <package>iptables</package> package didn't
seem to put any sort of init script in place, so I just popped it back
in <filename>/etc/init.d/</filename> and linked it from 
<filename>/etc/rc2.d</filename> as an “S13” process.</para>

<para xml:id="p26">Hmm, and I still need to figure out DVD burning. I don't see
a <filename>cdrecord-dvdpro</filename> package, but I do see some other
DVD-related things.</para>

<para xml:id="p27">All-in-all, Ubuntu is working out perfectly. Almost
all of my hacks are gone: mounting the encrypted disks, starting wifi,
loading X11, etc., all “just work”. I think that's the way it's
supposed to be.</para>

</section>

<section xml:id="horror">
<title>The Seriously Bad</title>

<para xml:id="p28">I do have one really serious issue: the Cisco VPN
client that I have to run to connect to the corporate firewall raises
a kernel panic occasionally. And by occasionally, I mean, within a few
hours if I keep it running.</para>

<para xml:id="p29">I thought I'd back down to the 2.6.11.3 custom
kernel that I had been using, but it can't seem to mount the encrypted
partitions. While booting, it reports:</para>

<screen>device-mapper: error adding target to table
device-mapper: dm-linear: Device lookup failed</screen>

<para xml:id="p30">That's odd because I had successfully tested
encryption on an external disk under the old system, and the new
system can still mount that encrypted disk, so there must be some
incompatibility in libraries or some aspect of the LVM system.</para>

<para xml:id="p31">It's a rock and hard place, for sure. Most of my
animosity about this is directed at the closed-source Cisco VPN
software, but I can't use the open source alternative until it
supports profile certificates.</para>

<para xml:id="p32">So far the crashes have been harmless. I backup
often. And I'm running VPN as infrequently as possible.</para>

<para xml:id="p33">I think I might try building my own custom kernel,
I'd like to enable preemptive scheduling anyway, and see if that
helps. I've tried both
<filename>vpnclient-linux-4.6.02.0030-k9.tar.gz</filename> and
<filename>vpnclient-linux-x86_64-4.6.03.0190-k9.tar.gz</filename>.</para>

<para xml:id="p34">Suggestions most welcome.</para>
</section>

</essay>

