It took me quite a while to notice - I've never done the math, and just assumed that Size=Used+Avail. But (surprise!) it doesn't add up.

I checked the disk for bad blocks, after un-mounting it, like this:

e2fsck -f -v -c -C 0 /dev/sda1

This took a few hours to complete, but showed no problem with the disk. I launched gparted and carefully went over the disk properties, in search for a clue. It insisted that I have more free space than that reported by df. This was reassuring, yet puzzling - where did that precious disk space go?

A quick search later and I found both the cause of the problem and its solution. It turns out that some disk space is always reserved for the OS. The default is 5% - quite a bit if you ask me. I verified that with

It supports more than 60 source languages, and several output formats. It's highlighting is quite well done, if not as accurate as that of Vim or emacs.

The feature which makes it very useful for this blog, is the fact that, by default, it generates plain HTML fragments, with no CSS. These HTML fragments can be pasted as is into a post that's being edited, while in HTML mode.

source-highlight can also be used as a syntax highlighted pager for the console like this:

source-highlight -o STDOUT -f esc /path/to/file 2>/dev/null | less -R

(you may want to take a look at my previous posts about syntax highlighting for paging and listing of source code at the console).

It turns out that the Debian package is missing a binary file, on purpose (no source code). It's mentioned in /usr/share/doc/qemu/README.Debian - the file video.x can be found at the Mac On Linux (MOL) project site:

download the current MOL source package

extract it to some temporary directory

as root copy video.x to /usr/share/qemu:

cp mol-0.9.72.1/mollib/drivers/video.x /usr/share/qemu/video.x

This time I managed to boot the virtual machine and start the installer. It looked fine, until, several hours later (my box is dead slow) the installer simply hanged while installing quik - I just hit Debian bug #513182, which, to put it simply, prevents Debian from being installed as a guest OS on a QEMU PowerPC emulated system.

Well, that's unless you know your way around PowerPC, Debian installer, quik and QEMU, like Aurélien Jarno. He maintains pre-installed QEMU disk images of Debian for several architectures, PowerPC included.

I downloaded the PowerPC disk image for Debian/Lenny, and started the PowerPC emulated system like this:

qemu-system-ppc -hdc debian_lenny_powerpc_small.qcow

works like a charm.

Now back to testing my code.

P.S. I found out that if I use the QEMU -vnc command line option, in order to setup QEMU as a VNC server, then QEMU (version 0.10.2) crashes if I try to connect to it with a VNC client using low color levels (I used the RealVNC viewer command line option -LowColourLevel 2). It works fine, with some hiccups when changing display modes, if I don't specify any VNC viewer connection options.

[15 Dec. 2009] UPDATE: with QEMU version 0.11.0 the command line has changed (read: has been fixed) and should be:

qemu-system-ppc debian_lenny_powerpc_small.qcow

(no need for the -hdc command line option - the disk image comes up as disk hda).