Recovering files from a ZFS/FUSE snapshot under Linux

A week ago I had a hairy crash when stopping ZFS/FUSE on my box, which I mentioned on the ZFS/FUSE mailing list. I upgraded from 2.6.25.4 to 2.6.26-rc7 and in the process blew away the kernel build tree for the 2.6.25.4 kernel to recover the disk space. Shortly after that I received a query off-list from Miklos Szeredi, the FUSE maintainer, asking if I could supply him a disassembly of the offending function from the kernel build – which was now consigned to the bit bucket. 🙁

Fortunately I’ve been regularly rsync’ing various important parts of my computer onto ZFS/FUSE partitions and snapshoting them with timestamps so I (theoretically) was only a few commands away from getting to the defunct kernel tree once more. The problem is that unfortunately you can’t look at a ZFS/FUSE snapshot directly at the moment, it’s one of the parts that is still to be gotten working under Linux.

Luckily there is a trick to be able to get access, which is is to create a clone of the snapshot. The ZFS Administration Guide describes a clone thus:

A clone is a writable volume or file system whose initial contents are the same as the dataset from which it was created. As with snapshots, creating a clone is nearly instantaneous, and initially consumes no additional disk space. In addition, you can snapshot a clone.

The magic command to do this was just:

zfs clone ZFS/home@20080606-2201 ZFS/temp

and suddenly I had /srv/ZFS/temp, a fully working version of this machines /home directory as it was around 10pm on the 6th June and in it was the kernel tree.

Very nice!

Searching Photos by Drawing a Picture

OK, so maybe you’ve got a few hundred, or thousand, photos that you’ve taken, but how do you search them ? You could try and tag them for everything (if you’ve got the time) but wouldn’t it be nice if you could just draw a picture and search for that ?

Well the Digikam folks are working on that by incorporating some of the existing ImgSeek projects code into the KDE4 version of Digikam (0.10.0).

They’ve got a short video demo of it up on YouTube (embedded below).

Re: Glen Turner: Key generation

In his blog Glen writes on the Debian OpenSSL stuffup:

Hopefully this fiasco will re-energise hardware manufacturers into providing hardware-based randomn number generation. The current scavenging across the operating system for any source of entropy isn’t acceptable and is one of the root causes of this current flaw.

But this wouldn’t have helped in this situation as OpenSSL already supported those sources but the patch ((which was posted to the openssl-dev list for comments prior to being applied, well worth a read as it’s a short thread )) effectively removed the call to add those (and all other) sources of entropy into the pool, leaving just the PID – hence 32,768 possible keys.. 🙁

If you’re an LWN subscriber (and if you’re not, you should be!) this article is well worth a read (it’ll become accessible to non-subscribers on Thursday, Australian time)..

Vacation 1.2.7.0 rc1 released

This is the first release candidate for vacation 1.2.7.0 and fixes a segmentation fault for a broken Reply-To: header where there is no address specified.

I’ve also added a KNOWN_BUGS file which lists the fact that vacation currently doesn’t cope with multi-line (wrapped) headers, this is scheduled to be fixed in 1.3 and work is in progress in the SVN trunk for this.

Please test this and report back – if you find any problems please do report them!

Download the release from SourceForge.

Debian OpenSSL stuffup – SSH keys and SSL certs not random enough (updated)

Update: Debian has a good summary page on their wiki.

This is pretty serious – a packaging stuff-up for OpenSSL by Debian (and hence Ubuntu) has resulted in not-very-random randomness being used in various packages such as OpenSSH for key generation. The Ubuntu report says:

A weakness has been discovered in the random number generator used by OpenSSL on Debian and Ubuntu systems. As a result of this weakness, certain encryption keys are much more common than they should be, such that an attacker could guess the key through a brute-force attack given minimal knowledge of the system. This particularly affects the use of encryption keys in OpenSSH, OpenVPN and SSL certificates.

This is a Bad Thing(tm), Debian have told their own developers:

Since the nature of the crypto used in ssh cannot ensure confidentiality if either side uses weak random numbers we have also randomized all user passwords in LDAP.

It’s also been around for almost 2 years now according to the Debian security notice:

The first vulnerable version, 0.9.8c-1, was uploaded to the unstable distribution on 2006-09-17, and has since propagated to the testing and current stable (etch) distributions. The old stable distribution (sarge) is not affected.

So now would be a good time to change your passwords, unless you can be certain you’ve never logged into a Debian or Debian derived system..

Old protocols have their advantages

If you were fretting about the Ubuntu mirrors being so slow, remember that the installer defaults to using HTTP, rather than FTP.

Warning: download speeds can go down as well as up..

Hardy broke my server (updated)

So, I thought, I’ll test out the latest shinyness in btrfs on my old test box (an Olivetti Netstrada 7000) with 5 SCSI drives. But first, I’ll quickly upgrade to the latest development release of Ubuntu, Hardy Heron, to get the latest goodness of compilers, etc.

Except now my box won’t boot..

initrd extends beyond end of memory (0x0ffef173 > x01000000)

It looks like the kernel is getting the memory size wrong, but sadly even forcing it with the boot option mem=256M doesn’t do anything to fix it. Fortunately the kernel that comes with Gutsy still works on it..

Logged as bug #219868, but no response yet.

Update: This appears to be a bug from the mainline kernel, I’ve reproduced it with 2.6.25 and am in contact with the i386 boot code maintainer about it.

OpenMOKO GTA02 FreeRunner pricing announced

The OpenMoko Project has announced the pricing for their GTA02 FreeRunner phone that is designed to run Linux:

The FreeRunner will ship from Openmoko.com at $399. For early customers
I’m looking at throwing in a few free things. More details later. […] The debug board will be available as a separate product for $99 USD.

There will be a 10 pack for bulk orders (some people locally are already soliciting for people to muck in on one):

For these people we created a 10Pack. instead of 399 per phone, we will
charge 369 per phone.

It’s not 3G (but then again, neither is the iPhone, unless the rumours about the Aussie version are right)..