Author Archives: admin

Upgrading your BIOS on linux

      3 Comments on Upgrading your BIOS on linux

It was already quite some time ago that flashrom 0.9.0 was released by the coreboot-project developers, but anyway… Flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. Since Fedora already contains flashrom, there is no need to compile it yourself. Simply pull it from the repo: Usage is rather simple. For a list of all flags… Read more »

Using a ResourceBundle for localization

      No Comments on Using a ResourceBundle for localization

There is a nice java tutorial from Sun how to use ReseouceBundle for localization: http://java.sun.com/docs/books/tutorial/i18n/resbundle/propfile.html. It’s actually rather simple: Just create a new ResourceBundle object by invoking the getBundle method, specifying the base name and Locale: The getBundle method first looks for a class file that matches the base name and the Locale. If it can’t find a class file,… Read more »

Automating GnuPG

      No Comments on Automating GnuPG

If you want to use GnuPG in a script and don’t want to be prompted for the passphrase, put the passphrase in a file called passphrase.txt and use this to encrypt: Of course, you can also use echo to specify your passphrase or you can pipe a tarball into gpg or even send a gpg encrypted tarball via e-mail Note… Read more »

Working with lzma tarballs

      No Comments on Working with lzma tarballs

The Lempel-Ziv-Markov chain algorithm is a (at least in the Linux-world) relatively new compression method. It features a very high compression ratio that is generally much higher than bzip21. Unfortunately there a quite a few different implementations. So creating and extracting lzma archives on different Linux distrubutions will vary. While the latest Fedora comes with GNU tar 1.22, which has… Read more »

Convert filenames from iso-8859-1 to utf-8

Just as you can convert entire files from one charset to another, you can convert the filenames. For example: would recursively convert all files in the current directory from iso-8859-1 charset into utf-8. Well, not exactly. To finally rename the files you need the –notest flag. Otherwise convmv will perform a dry run without any changes.

Running a script on shutdown

      No Comments on Running a script on shutdown

It’s rather easy to run a command or a script on boot without going through the full Sys V style init stuff. /etc/rc.local is executed after the init scripts on boot, but unlike BSD, Linux doesn’t have a rc.shutdown. So how can we execute a command on shutdown? Usually, /etc/init.d/halt is used for shutting down, which calls /sbin/halt.local (if it… Read more »

Unlocking a luks volume with a USB key

      9 Comments on Unlocking a luks volume with a USB key

A luks encrypted disk partition is great. The only thing that can bug you from time to time is that you have to specify the key before you can use it. Or maybe, if you try to mount the volume with /etc/fstab, you’ll be prompted for the password during boot. Wouldn’t it be great, if you could use a real… Read more »

Using udevadm to gather information about specific device

Usually, udevadm requires the sysfs device path of the device in question. But you can also ask udevadm which device path belongs to a certain device node. This gets really helpful if you combine these two queries. Example: You want to get a list of attributes for a specific device. You do not know the complete device path; all you… Read more »