Archive for April, 2011

Tips & tricks using XPC for Mac OS X 10.7 Lion developer preview 2

The latest XPC EFI boot loader version 0.83.02 allows you to install Mac OS X 10.7 Lion dev preview 2 without having to change or copy a single file on the OS X install volume. Apart from configuring XPC it all works out of the box which simplifies installing OS X Lion a whole lot. XPC now fully supports the new disk-image based installation process that was first introduced in Lion dev preview 1 and is able to boot from mounted .dmg volume images. I just gave it a try and it worked flawlessly on my Hackintosh rig! Read more »

Black screen in crashed iPad video player app

For unknown reasons, the iOS video player app found on all iPads locks itself up in rare situations. Opening the video app results in a black screen, all you can do is jump back to the home screen using the home button. Both, restarting the iPad or re-syncing it on iTunes won’t help.

Now before you restore your iPad, there are two quick things you could try first:

  1. If you know the title of a movie on your iPad, use the search function to look it up and start it by tapping it
  2. …or open the iPod app and select a video podcast or iPad video and play it

The video app should be working again from now on. If it doesn’t then I’m afraid, you probably have to do a full restore of your iPad.

IP-address binding woes in Ubuntu Server 10.04 LTS

If you’re on an Ubuntu Server with multiple IP addresses and you want to bind networking software like sshd or Squid to a dediated network interface (unlike 0.0.0.0) you
might eventually end up with error messages like:

error: Bind to port 22 on 123.234.456.789 failed: Cannot assign requested address.

Which is bad, since you may lock yourself out of the server.

The same may also happen to Squid:

commBind: Cannot bind socket FD 19 to 123.234.456.789:3128: (99) Cannot assign requested address

Both, Squid and sshd, have in common, that they’re upstart-ed from /etc/init. What happens in 10.04 is that ssh or squid are started too early, at least if you configured multiple network interfaces on the server.
And another weird thing is that for every network interface in /etc/network/interfaces the scripts in /etc/network/if-up.d/* are being re-executed when the network is brought up at boot time.
That’s pretty lame if you ask me because if the server has 10 network interfaces, sshd is being started and stopped 10 times during boot.

Anyway, the trick is to tell upstart not to start certain processes until the last network interface on a server is up.
In my case, the last network interface is venet0:8 so the start command in /etc/init/ssh.conf and/or /etc/init/squid.conf has to be modified to:

start on filesystem and net-device-up IFACE=venet0:8

This also prevents the useless restarting of sshd when the network is being started. And again, this only happens if the server has multiple IP addresses and you’re not using the standard bind-’em-all address 0.0.0.0 for processes that are started from /etc/init.

How to use a different bind IP address in TorrentFlux

TorrentFlux is a web-based PHP front-end for the BitTorrent client BitTornado. It’s a great software to download torrents on Linux servers that have no desktop manager installed.

BitTornado uses the server’s default IP address for it’s peer-to-peer connections by default. If your server has multiple IP addresses, you may want to assign a different IP address for the torrent traffic. All you have to do is to specify a bind parameter in the TorrentFlux settings. On Debian-based servers however, downloading stops instantly if the bind parameter is specified. After doing some debugging I found out that is has to do with how the parameters are passed from TorrentFlux to BitTornado. A small modification to the index.php file will fix this problem. Here’s how to do it. Read more »