Posted by
Moser on July 6, 2010
When you encounter a hard disk crash like I did recently (my fault – dropped my laptop), one of the most important files to restore is your GnuPG private key ring or at least a revocation certificate for your public key(s). I did not have any backup
. But at least I had created a revocation certificate, which was now hidden somewhere on my unmountable partition.
Scalpel, a file carving tool, helped me out.
There is a Ubuntu package (and I believe there should be packages for most distributions):
sudo apt-get install scalpel
It’s configuration is in /etc/scalpel/scalpel.conf. It offers some GPG related rules, but none for a revocation certificate. I used these rules:
revoc y 100000 -----BEGIN\040PGP\040PUBLIC\040KEY\040BLOCK-----\x0aVersion:\040GnuPG\040v1.4.10\040(GNU/Linux)\x0aComment:\040A\040revocation\040certificate\040should\040follow
revoc y 100000 -----BEGIN\040PGP\040PUBLIC\040KEY\040BLOCK-----\x0aVersion:\040GnuPG\040v1.4.9\040(GNU/Linux)\x0aComment:\040A\040revocation\040certificate\040should\040follow
revoc y 100000 -----BEGIN\040PGP\040PUBLIC\040KEY\040BLOCK-----\x0aVersion:\040GnuPG\040v1.4.8\040(GNU/Linux)\x0aComment:\040A\040revocation\040certificate\040should\040follow
I wasn’t quite sure which version of GPG I had installed at the time I created the keys, so I created rules for all possible versions. (See manpage for syntax explanation.)
It took about 2 hours to scan the image of my 250 GB hard drive and scalpel successfully restored my revocation certificate.
I also tried some of the supplied rules but I think they are not suitable for restoring files from an image of a whole hard drive. (Most of them just look for two bytes that mark the beginning of the file.)
Posted by
Moser on April 21, 2009
As I described in my previous post I built a cheap USB wireless adapter into my NSLU2. It finds my network and connects without problems. But when I transfer bigger loads of data, it sometimes stops working. The log showed that it disconnects from the USB hub. Other people experiencing similar problems indicated that this was a problem with the ehci_hcd kernel module and “solved” by removing this module. But thats definitely not a good idea when your only mass storage device is connected via USB too.
So I needed to disable the EHCI for the wireless adapter only. That should have no big impact because I don’t think my network really offers speeds above 12 Mbit/s. Fortunately there is a script by Ernestas Vaiciukevičius that does exactly this.
Update:
Seems like the link is dead. You can find the script here.
Usage: Create a udev rule that runs it:
SUBSYSTEM=="usb", ENV{PRODUCT}=="xxxx/yyyy/*" RUN+="/usr/local/bin/force_ohci.sh"
xxxx and yyyy can be found in lsusb’s output:
$ lsusb
Bus 001 Device 001: ID xxxx:yyyy Device name
[...]
For testing reasons you can also run it from the command line:
$ ./force_ohci.sh "xxxx:yyyy"
Posted by
Moser on April 20, 2009
I bought a NSLU2 some weeks ago. I will use it as printer and scanner server and as an ever running torrent client. As I don’t want to run a ethernet cable through the walls of our flat, I need wireless network on it.
There is a nice HowTo on NSLU2-Linux. I got my hands on a wireless usb stick for 15 €, warmed up the soldering iron and got started:
You really need a steady hand for soldering onto these tiny contacts.

But to my own surprise I managed to:

Inside the case of the NSLU2 there is enough space, so i just taped the new part on top of some capacitors:

5 minutes later I was really glad to see the device in lsusb.