30 April 2010

Ubuntu UNR: Upgrading from 9.10 to 10.04

Well that was fast. I install 9.10 one day, and the next 10.04 comes out. Going to Update Manager in the administration control panels to upgrade was easy. No hassle at all. Everything was working.

And I find out that encrypted home folder support has been added in, so going to Users and Groups to add a new user now has a check-box option to enable encryption!

Still no ultra easy way to migrate an existing home folder to an encrypted home folder, but hey, this is progress.

At least when you add a user, you can enable encrypted home there, rather than having to go to the command line.  Still, some old references may be useful in case you want to go to the command line, or to learn how to migrate an existing home over:

Ubuntu’s Encrypted Home Directory: A Canonical Approach to Data Privacy

Jaunty Encrypted Home Directories

28 April 2010

Installing Windows 7 & Ubuntu UNR side-by-side on Dell Mini

I received my Dell Mini 1012 netbook just recently, which came with Windows 7 Starter, and I've decided to partition the drive and install Ubuntu UNR 9.10 on it to have a dual-booting netbook. Here's how I did it, and it was easy.

The netbook had Windows pre-installed, and I liked it well enough that I really don't want to have to reinstall it. That meant I can't start from scratch: ie, I can't just reformat the entire drive, partition it properly, then install Windows and Ubuntu separately. I had to keep the Windows volume intact. The trick is that I also don't want to cripple the Windows installation, or else I'd have to repair Windows (which I also don't want to do).

If you're a nitpicky power user who wants configurations galore, I suggest you read this instead: How to install Windows 7 and Ubuntu side by side. It's a lot of work, but you get lots of expert options. That's not for me. I want a simple, lazy, and smooth experience so that I can get back to doing something else. Having said that, you might want to read those instructions anyway to get a deeper understanding of what's going on here.

The Plan
  1. resize the Windows volume, shrink it to say 30 GB, so that I get a 100 GB free space
  2. install UNR into that 100 GB free space
  3. reboot and enjoy

Resizing Windows 7 Volume (so that I can install Ubuntu UNR later)

My story here leads up to how I was able to squeeze out the last few bytes of my Windows volume as I was shrinking it (problematic as there are some unmovable files that, uh, needs to be moved). There are apparently expensive (ie, non-free) or more complicated ways of doing this, but what I did worked for me well enough, and it was easy.

I received my Dell Mini 1012 netbook just recently, which came with Windows 7 Starter. The more I use it, the more I like it, but I still want my Ubuntu (Netbook Remix)!! So I scrapped my original plan of completely erasing Windows to install Ubuntu. Instead, I've decided to try to partition the drive and have a dual-booting system.

Looking at the drive structure, I realized the drive already is partitioned into an OEM, Recovery, and a normal Windows partition. I really don't want to have to reinstall Windows, so instead of starting from scratch — involving reformatting the entire drive then installing Windows and Ubuntu separately — I decided to resize (ie, shrink) the Windows volume instead. That will create a fourth partition to install Ubuntu on (and I hope that actually works, not having tried this at all before...).

You can do that in an administrator account by going to the Start menu, Control Panel, then type in the search box "partition". This will produce for you the Administrative Tools option to Create and format hard disk partitions. In the resulting Disk Management window, you can right-click on your C: drive to Shrink Volume. It'll do its thing and tell you how much you can shrink.

Unfortunately, it sometimes won't be able to shrink it down very much even though you know there's plenty of unused free disk space that can be squeezed out. How can you solve that?

22 April 2010

Mounting TrueCrypt Ext3 Volume on Mac: Fail

 I had a TrueCrypt encrypted Ext3 formatted volume in a file on an external hard drive hat is also Ext3 formatted.  I wanted to mount the hard drive on a Mac, then mount the TrueCrypt volume.  The first part is easy, the second part proved impossible for me.

(2013-07-30:  Read the update, Mounting TrueCrypt Ext2/Ext3/Ext4 Volume on Mac: Read Only Success.)

Mounting Ext3 Volume on Mac OS X
You need just two things:
  1. MacFuse
  2. fuse-ext2
Install those in that order. I plugged in my FireWire external hard drive and the Ext3 formatted volume mounted auto-magically.

You should check which version of Mac OS X you need, etc, and use latest versions of everything, and so on, of course.

Other pages of info that were helpful, for my reference here:

Mounting Ext3 TrueCrypt Volume on Mac OS X: Didn't work...
I opened up TrueCrypt and did the straightforward select file and mount (type in password, etc), it then said to me something about hdutil couldn't find a volume to mount. Whatever. The volume is Ext3 formatted so the standard utilities packaged with my Mac here wouldn't help.

But TrueCrypt has an option to indicate that the filesystem should not be mounted.  Click on Mount, then click on Options in the Enter password for "file-to-be-opened" window.  Look for the Do not mount option.  With that enabled, enter password and click Ok. The disk can then be found in /dev/.

I figure, in theory, I should be able to use fuse-ext2 manually from the terminal.  So if the disk is at /dev/disk3, make a directory (say  target) in /Volume/target, then fuse-ext2 /dev/disk3 /Volumes/target/ should mount the file system.  Well, it didn't work.

If you're reading this, and you figure out how to make this work, please let me know.

In the mean time, another option is to use a virtual machine on the Mac to boot up to a Linux distro and run TrueCrypt in the Linux based OS.  Some useful information for my reference:

12 April 2010

Internet security is dying painfully

Just now I saw a link on Hacker News with the following text (I'm linking it to the comments page for that link instead though):

This link says it's from YouTube but it's not (youtube.com)

Sure enough, Hacker News is reporting the host for the link is YouTube.com, and a quick glance at the URL shows it actually is (see bold):


But look a little further and notice it says "redirect", and a little further along you see where it's redirecting (see the red above). In more malicious case, of course those could be further obfuscated so a cursory look by an intelligent human wouldn't see the redirection.

The sad part is, as noted by commenter Charles Randall, "I've taught people how to scan for valid links, and now they can't even trust that."

That's exactly right. The cost of maintaining security by the end-user, as paid by every individual end-user, is growing with little to no value created for any single one of them. The time spent checking the URL's host to ensure clicking it is safe becomes less effective with this kind of redirection: it's all cost and no gain, most of the time.

This comes right after I read Internet Security is a failure, which argues that these four facets of internet security has been a failure: "1. Identity and Authentication / 2. Transport Security / 3. Secure Software and Operating Systems / 4. Law Enforcement".

This reminds me of the article: Are users right in rejecting security advice?, and the paper from Microsoft the article links to as well: So Long, and No Thanks for the Externalities: The Rational Rejection of Security Advice by Users (pdf). Both are great readings, and it certainly makes sense to look at security as an economic question.

Anyway, internet security is in a sad state of affairs.

09 April 2010

My Programming Workflow (and specifically for Clojure)

My programming work flow is basic. Suppose I'm writing up some program in Matlab or Octave. I'll have the .m file open in a text editor, and a Matlab (or Octave) terminal (aka REPL?) open. Then I edit, save, load in terminal to run, see result, and repeat. Maybe I'll use the built-in editor in Matlab or QtOctave, or maybe I'll use Emacs. It doesn't matter much.

Then I come to this Clojure thing. Spent all my time setting up SLIME in Emacs so I have a REPL right there inside Emacs, along with my file of code (the .clj file). But actually all I really care for is setting up my edit, save, load in terminal/REPL to run, see result, and repeat loop!

Turns out it's simple, the key being using (load-file "...").

04 April 2010

Songbird Music Player No Longer on Ubuntu

What a sad way to start the day. I find out Songbird will no longer be developed for Linux. Well, good bye Songbird, it was nice knowing you.

The irony is that Songbird, as an alternative to Apple's iTunes, will now only be developed for platforms that iTunes run on. If I was using Windows or Mac, as I used to, I'd be using iTunes instead of Songbird.