Whole disk encryption, HP laptops, and other shenanigans

I use an HP tm2-1070ca convertible tablet laptop as my primary machine, and have one hell of a love-hate relationship with it.

I adore the convertible tablet format; being able to annotate PDFs in Xournal /Acrobat / Windows Journal, “think on paper” by sketching out a design or a circuit, or flip the screen around to show something on it to the person across the table from you are all at this point part of how I use computers and I find I hate having to go back to using machines I can’t poke.

But as I’ll detail below, it’s got some downright weird stuff going on when it comes to hardware compatibilities.

Given all the ridiculosity around HP’s hardware business at the moment, my next machine is virtually certain to be another brand.  I’m currently eyeing some Fujitsus, but would love to hear about other convertibles folks have had good experiences with, particularly with running multiple OSs on them.

Ubuntu lessons

For 11.04, I needed acpi=off to get the installer to work. It turned out that disabling VT in the BIOS made it work alright with acpi on, but things were otherwise just sort of flaky – the touchscreen in particular would just sometimes work, and sometimes not.  I made a bunch of changes at the same time which lead to confusion about what was actually going on here; it turns out my shiny new SSD was not the problem, but it was a 11.04 regression against this particular BIOS, which I worked around by disabling VT.  Many thanks to Matthew Garrett for spending a bunch of time helping me troubleshoot this.

I used the Ubuntu alternate installer and the built-in whole disk encryption, and it performed very nicely on the SSD, benchmarking at nearly the same speed as the drive running in plaintest.  Sorry I don’t have the numbers handy :/

This isn’t specific to this laptop, but took me some time to figure out so I’m recording it for the convenience of those searching for this error:  if you try to mount your old luks/lvm encrypted system drive on another luks/lvm encrypted machine which happens to have the same hostname, you’ll get an error saying that it’s “not a valid file system,” which is obviously not at all what’s going on.  lvm simply can’t deal with volumes with the same name, and your volumes are named after the hostname you set on install.  lvs and lvrename are the relevant commands here.

Also, if you try to mount a luks/lvm encrypted drive on a machine which has not had luks/lvm applied on install, you’ll need to install the libraries which it uses – cryptsetup and lvm2.  This seems obvious in retrospect but non-specific error messages lead to me stressing out that I’d hosed my drive, which hadn’t been backed up in a few days.

HP laptops + MBR-based whole disk encryption = 😦

The above VT issue ended up being the dealbreaker for me running Ubuntu as the host OS on this machine – I need VMs to do a bunch of things, so now I’m running Win7, with Ubuntu in a VM (along with various other things).

Search for “hp laptop truecrypt” and you will see that I am not the first to venture into this particular valley of fail.  I’ve seen threads where people report that PGP’s WDE also doesn’t work.  Given that Ubuntu’s WDE worked just fine, I suspect that it’s something with MBR-based WDE rather than the way it’s done with luks/lvm; the other thing that makes me suspect this is that the way you know it’s failing is that the laptop will blink the capslock key, in my case 5 times indicating a “general system board failure”.  There’s no blink code for “hard drive problem” and it’s different from the error you get when you boot without a hard drive installed, so my guess is that the 5-blink code covers hard drive errors too.

I don’t have any workaround for this one.  I’ve tried truecrypt WDE on a couple of different drives, to no avail.  I’ve even bugged HP on the twitters but they haven’t gotten back to me.  Oh well.  I’ll eventually put Win7 Ultimate on it and try Bitlocker… after making a whole disk backup because I am really, really tired of reinstalling, heh.

Hopefully someone will find the above useful.  It’s been an adventure.

Security at the Ubuntu Developer Summit

I’m attending the Ubuntu Developer Summit this week in Budapest, and I wanted to share how to participate in the security track remotely.

You’ll want to look at the schedule of security track sessions, and the icecast streams for the various rooms we’re in.  Each session in the schedule has one or both of:

  • an etherpad for recording discussions
  • a blueprint which is the “working document” for that particular portion of the project

Both have little icons in the schedule.

You may also want to join the IRC channel for the session; there is one per room, with naming scheme #ubuntu-uds-$room_name_without_accents .  There’s also #ubuntu-hardened, for general discussions and continuing to participate in the Ubuntu security community after UDS.  If you’re not a big IRC user or your network blocks it, you may prefer web-IRC, which is available here for freenode.

This stuff of course generalizes for any other topic at UDS; check out the schedule for tracks on other topics.

Customizing GnuCash reporting

Before I start: a huge Thank You to the amazing Cheri703 for holding my hand over VOIP while I got the hang of GnuCash.  I wouldn’t have finished my taxes without her patient support 🙂

I spent a while looking around for how to customize GnuCash reporting for Canadian taxes, and it ended up taking me some time to figure out quite simple things so I figured I’d document it here for the benefit of those searching for this info.

I started off with “A Simple Checkbook” and added a number of accounts for my consulting business, various expenses, etc.  I haven’t gotten into tracking my personal expenses in great detail yet, but I’ll try that for 2011.  Feel free to skip the next part: <grumble type=”Canadian Banking System”> The Canadian banking system is behind the times, so I manually downloaded Quicken-compatible files from my 2 banks.  Kudos to CIBC for allowing me to download a whole year’s transactions in one go.  Boo Hiss to TD for not only making me download things a month at a time, but only keeping credit card records for six months.  My books are a bit complicated as I have a USD account and credit card in addition to my CAD one, and I incorporated last year… all told, I had to type in about 18 months worth of various accounts. Lesson learned for next year!</grumble>

When it came time to output all the info for my accountant, I initially used the “Transaction Report” which I copied and pasted into OpenOffice Calc and tidied up… but there was a lot to tidy up, particularly because it did monthly subtotals, which was really overkill and distracting.

Turns out you can customize the Transaction Report!  While you’re on the Transaction Report tab, there will be a new menu option in your Edit menu – Report Options. I customized the Accounts tab to just show the accounts relevant to my taxes and added a running balance in the Display tab.  In the Sorting tab I checked “Show Full Account Code,” and most importantly (to me) I set the “Secondary Subtotal for Date Key” to “None” to make the cluttery monthly subtotals go away.

Hit apply, copy and paste the whole report into OpenOffice Calc, save as XLS if your accountant hasn’t seen the Free Software light, and presto! Taxes are a go, with GnuCash 🙂

One last tip once things are pasted into OpenOffice – do a find and replace for ^. with & to get rid of all the fussy formatting that makes it impossible to do calculations in OpenOffice, and remove all the useless hyperlinks.

There is lots of additional info on the GnuCash FAQ about other ways of exporting data, but this is the quick and simple way that worked for me.  There’s also an official-ish way to export to OO Calc here but I didn’t find that worked any better than just copying and pasting.

It's the little things…

sticker insurance

My beloved tablet died, so I sent it back to the manufacturer, just under the wire before the warranty expired.

A friend had just returned my old netbook, so I moved my data over to that before sending out the sad tablet.  After blowing a few large dust bunnies out of that machine it was only freezing up about once a day.

Ten days, one trip to California, two hackerspaces, and one keynote later, I had the tablet back.  I was in a bit of a crunch at school so I didn’t have time to re-do the factory Win7 image exactly to my liking.  So I popped the hard drive out of the netbook, replaced the tablet hard drive with the netbook drive, and got back to work.  Everything* worked, everything was copacetic, and I was a happy camper with a full keyboard and pressure-sensitive pen tablet once again.

It turns out being able to swap hard drives and have the machine just work is a pretty important feature for me.  <3, Ubuntu**.

*except for the BIOS only allowing certain PCI-IDs for WiFi cards… but that’s a story for another time.  Manufacturers, please don’t do this.  I’m looking at you, HP, Lenovo, Asus….

**yes, I do know this works just fine in other Linux distros.  And probably the BSDs, too 🙂

New Ubuntu = awesome!

I just rebooted my work desktop into Karmic Koala, the new release of Ubuntu, my preferred distribution of GNU/Linux.  I don’t have much substantive to say, but the qualitative experience has so far been pretty amazing.

Not only did I get to work all day while the upgrade was downloading, only having to reboot at the very end, but everything worked as I expected when I rebooted – which is to say that the only thing which didn’t work was VMWare, which I expected to not work as with every kernel upgrade.  I might even take this as an opportunity to give Virtualbox a proper try (it was less than amazing last time I did).

Let me make that really clear – I only had about twenty minutes of downtime for the entire upgrade, and it would have been less if the installer had left upgrading Firefox until the end, as that was the only thing which broke (and even then, only partly – no new urls, but clicking through links was fine) while the upgrade was going on.  Try that with Windows 🙂

Things feel just a little snappier, just a little shinier.  I’m really impressed so far.  The new theme and icon set is lovely.

If you’ve been putting off trying out Ubuntu or Linux in general, now’s a great time to start!

Papercuts

No-context-needed IRC log time!

-!- zfe [n=Gianluca@88.252.29.47] has joined #ubuntu-women
<zfe> is this the kitchen?
<zfe> who would make me a sammich?
<redacted> zfe: No this is not the kitchen
<zfe> aren’t you women?
<redacted> zfe: you are welcome to go into your own kitchen and make yourself a sandwich.
<redacted> zfe: please read the channel guidelines in the topic
-!- mode/#ubuntu-women [+o hypa7ia] by ChanServ
<zfe> ok i will while you make me a sammich
-!- mode/#ubuntu-women [+b *!*=Gianluca@88.252.29.*] by hypa7ia
-!- zfe was kicked from #ubuntu-women by hypa7ia [http://xkcd.com/322]

Nicknames redacted to protect the innocent.

Exporting cookies from Firefox 3.x into cookies.txt format

I’ve been searching for a while for a way to extract cookies from Firefox 3.x in order to use them with stuff like wget and Perl’s libwwwperl, which I have been using for a bunch of scripting.  Firefox 3.x uses sqlite to store cookies, whereas apps which let you load cookies files are looking for IE or Netscape formatted ones.  The latter were used up to Firefox 2, but I’ve had trouble keeping FF2 and 3 happy on the same machine… And going back to FF2 feels really painful without the magical search bar of awesomeness.

There’s now a beta extension up to save your FF3 cookies to the right format, which makes me a very happy camper!  It’s on the official addons.mozilla.org site but you need to sign in to the site to download it here as it’s still experimental.  Super useful though!

Also very useful and something I’d forgotten about until yesterday is this list of bookmarklets (snippets of javascript which you save as bookmarks) to manipulate form properties before submitting them, which lets you save passwords in your browser in forms where that function has been disabled, among other things.

-Leigh