2012-11-28

Full-disk encryption on Linux Mint 14

UPDATE 2014-06-29: Unfortunately, when I updated the comment system to use Google+, it cleared out the old comments, which happened to be somewhat helpful.

I have just tried, and failed, to get full-disk encryption on Linux Mint 14 (see also this Ars Technica review). I'm writing this post in the hopes that someone can figure out how to get it to work.

As part of my university's ongoing efforts to improve data security, we have just been required to encrypt the drives on our work-issued laptops.

Ubuntu 12.10 Quantal Quetzal introduced the full-disk encryption option into their default installer. Previously, it was only available via the text-mode installer available on a separate "alternate" image. However, despite using Quantal for several months, I find the Unity GUI really annoying, and decided to try Linux Mint 14 with the Cinnamon desktop GUI. The Cinnamon GUI is a GNOME 3 fork, so it uses 3D compositing, but presents a GNOME 2-like interface (or Windows-like), which I prefer.

Unfortunately, Linux Mint 14 did not adopt Quantal's Ubiquity installer, so the full-disk encryption option was not available. Andreas Haerter has written a good guide to full-disk encryption on Ubuntu prior to 12.10, and included a shell script which automates a lot of the process. I made some small modifications to the script for Mint: renaming LVM volume names, using optimal alignment in parted. However, Ubiquity now crashes after I specify the mount points and it starts doing the install proper.

Maybe someone out there has an idea of what might be broken?

My modified script is here:


2012-11-05

Private Ruby gems

I have been remiss in updating this blog. Here's a quick tip about Ruby:

To install Ruby gems to your home directory rather than to the system-wide gems directory, a couple of environment variables need to by set/modified:

    export GEM_HOME=$HOME/gems
    export PATH=$GEM_HOME/bin:$PATH
 
Since our site's conversion from cfengine to Puppet, I have been wanting a sort of testing framework other than just putting things out on a test server and running a test Puppet agent against it. I found a good blog post by Patrick Debois describing a few testing methods for Puppet.

2012-07-01

Part of the Internet taken down by a leap second

As a graduate student working for LIGO (the Laser Interferometer Gravitational wave Observatory), one of my responsibilities was maintaining date-time code, including accounting for leap seconds, and calculating dates and time thousands of years in the past.

What is a leap second? Well, the Earth's rotation rate is slowing down. So, as time goes on the length of the day is longer. This rate is very slow. Every few years, the added length must be taken into account, much like the leap day takes into account that the orbital period of the Earth around the Sun is not exactly 365 days. When a leap second must be inserted is not predictable. The International Earth Rotation and Reference Systems Service is tasked with making observations of the Earth, and producing a twice-yearly report on whether a leap second is due to be added. This comes out by email, and on their website. The report gives a 6-month or so lead time before the leap second is inserted, at midnight on Jan 1 and on Jul 1.

So, apparently, a leap second was inserted last night: all standard atomic clocks around the world paused for a second. This caused all sorts of havoc with computers and networking devices, causing lots of sites to go down. Notably, Google was prepared.

(via Gizmodo and Wired)

2012-06-12

Disabling diagnostic remarks in Intel Compilers

So, I was just trying to compile R, a statistical analysis package, on RedHat EL 4 using Intel Compilers 11.1 + MKL 10.1. Unfortunately, the configure step kept barfing on a diagnostic message produced by the "-ipo" (interprocedural optimization) flag. The configure script was interpreting it as an error message when testing for certain features.

The online help for icc (the "-help" flag) does not show how to turn off IPO diagnostics. This Intel forum post gives the answer:

-diag-disable ipo
I will have more to say about compiling R with Intel and linking to the MKL later on.

2012-06-06

Fink setup for Xcode

And now, for something a little different.

I haven’t used fink and fink packages much, lately, since I now have a work-issue laptop with Linux. I just tried to install octave with fink, and it complained:
Can't resolve dependency "xcode (>= 3.1.2)" for package "gcc47-4.7.0-1001" (no matching packages/versions found)
Even after re-running fink configure, the error persisted. And I did have the latest Xcode installed from the Mac App Store. Turns out, one needs to do:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

That tells fink where Xcode resides.

I have used a Mac since grad school, when Apple introduced Mac OS X, and gave free development tools. So, I used fink to install all the open source software I needed for analysis, after being rendered unable to work several times when my Internet connection went down and my copy of Matlab could not talk to the license server. I even used it for analysis and writing papers in my postdoc.

2012-05-22

Laptop hibernate in Ubuntu 12.04 LTS Precise Pangolin

Having switched back to Ubuntu Unity/GNOME from KDE on my laptop, I discovered that the option to hibernate (i.e. suspend to disk) was disabled.
This is due to a bug in policykit-desktop-privileges. To reënable, here are instructions. You have to create (use sudo) a local policykit authority file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla and add the following stanza:
[Re-enable hibernate by default]
Identity=unix.user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes
 You will probably have to log off and then back on again for it to take effect.

UPDATE: In addition, for "suspend" (i.e. suspend to RAM), you will need the apmd package. The upower and pm-utils packages are also required, but those should have been installed by default.

2012-05-21

NVIDIA Nsight Eclipse Edition

One of the new products announced along with CUDA 5 at the recent GPU Technology Conference was NVIDIA Nsight Eclipse Edition, which runs on Linux and Mac OS X. Previously, the only IDE available was Nsight Visual Studio which ran only on Windows.

I attended the demo talk for Nsight Eclipse, and it seemed a well thought out product. It gives access to all running threads on all cores, optimization suggestions, debugging interface, etc. Plus the usual Eclipse features like refactoring, build, version control. Watch the video:


Nsight Eclipse Edition is distributed as a pre-built binary, i.e. you can't just point Eclipse to a new software source. And, you have to be in the registered developer program to get access to the download.

Once you install the CUDA Toolkit, say in CUDAHOME=/usr/local/cuda, the nsight executable is in ${CUDAHOME}/libnsight.