How to prefer IPv4 over IPv6 for some hosts
If an IPv6 address is unreachable, but you can reach the IPv4 one, you can set the preference to IPv4 for that particular address by adding a line such as this in /etc/gai.conf:
precedence ::ffff:198.145.11.105/128 100
That will set the preference for host …
Converting multiple images into one PDF on Linux
Automount Anything over SSH
First, make sure you can use public key authentication or similar means to connect to ssh servers without typing in your password all the time.
Install sshfs for mounting remote filesystems over ssh, and afuse for automounting FUSE filesystems (sshfs uses fuse).
sudo apt-get install sshfs afuse
For dead connection …
ACPI Shutdown on Virtual Ubuntu
If your virtual machine does not shut down when asked by the hypervisor, install the package acpi-support.
sudo apt-get install acpi-support
Works at least with KVM, but I see no reason why it would not work as well in other virtualization platforms, if they just send the ACPI shutdown signal …
Cloning Ubuntu 10.04 Server KVM guests efficiently
If you need to create lots of similar virtual machine guests running on QEMU/KVM, it is a very good idea to prepare a template guest image from which to clone the other guests. You should do whatever customizations you like before cloning. For instance I like to configure LVM …
Serial console for Ubuntu server 10.04 KVM guests
The virt-manager VNC screen is fine for LAN connections, and good for running graphical sessions. X is not installed on Ubuntu server by default, and VNC is really bad over slow links even for text console. I like to configure serial console for all my virtualized guests, because with it …
N900 Scandinavic Letters from US keyboard
My Nokia N900 has the US keyboard with four arrow keys but no diacritics, two of which are used in my native Finnish language. I actually like having the four arrow keys instead of two arrow keys plus dedicated diacritics. You can anyway get those from the on-screen keyboard, but …
NIC bonding with Red Hat/CentOS
Redundant iSCSI storage for Linux
Here's how to set up relatively cheap redundant iSCSI storage on Linux. The redundancy is achieved using LVM mirroring, and the storage servers consist of commodity hardware, running the OpenFiler Linux distribution, which expose their disks to the clients using iSCSI over Ethernet. The servers are completely separate entities, and …