Author Archives: zo0ok

(Tried) Installing Windows 7 for the last time

A friend of mine came to me with his broken gaming computer. He does not know much about computers, but had surely invested in good hardware (some store configured and built it).

Why did it break? Well, a 90GB SSD + 1TB HD, Windows 7, is a guaranteed disaster for someone not an expert. Paging is on the SSD and it can be hard to get out of there. Everything installs on C: and it can be hard even for en export to not put stuff there. Eventually, the C drive will be full, fragmented, thrashing, and the SSD drive will break down.

We put a brand new 250GB SSD drive in place of his old broken down, and started installing Windows 7. I decided to try a Windows 7 with SP1 DVD – that worked fine with his original product key. That was the end of the good news.

First thing to do is Windows update… millions up critical updates I expected… except the only thing it updated was Windows update itself. After that, it got “stuck”. I tried numerous things like:

  • Waiting…
  • Someone suggested a proxy reset, or other network related problems.
  • Windows Update Troubleshooter (found 4 problems, fixed 3 of them). This is possibly the most retarded Windows tool I have seen. How would “working in the first place” be?
  • Some command line command to search for corrupted system files (there were none on this 1h young system and brand new hard drive.

After about two hours I thought enough is enough. Microsoft offers a free upgrade from 7 to 10, but not for my friend who had a legitimate Windows 7 key, with no way of getting to the point where upgrade to 10 is possible.

I believe Windows 7 (even with SP1) is just “too old and outdated” to successfully communicate with the Microsoft upgrade servers, and without some special knowledge it is impossible to get through.

Why is this Microsoft?

  • Are MS incapable of keeping old (but still supported) versions working?
  • Are MS intentionally breaking fresh Windows 7 installations to enforce Windows 10 migration?

In any way, it

  • Wastes peoples time.
  • Drives people to hacks and cracks to install software they already paid for.
  • Drives people to pay for something (Windows 10) that they should be able to upgrade to for free.

Anyway, while I spent several hours trying to install Windows 7 on his desktop, without much assistance he installed Xubuntu on his (Virus-sick Windows 8) laptop. And he was very happy with it.

In the end we installed Windows 10 on the desktop, and I think it is the only version of Windows currently worth installing (unless you have a server). That was, admittedly, a quite positive experience and it worked quite fine.

Moved to

I moved my site from to Please let me know if you discover any problems.

Lighttpd, Debian and CGI

I installed lighttpd in Debian (Jessie), and I wanted CGI to work.

The Welcome/Placeholder page has some information, and part of it is:
CGI scripts are looked for in /usr/lib/cgi-bin, which is where Debian packages will place their scripts. You can enable cgi module by using command “lighty-enable-mod cgi”.

This appears to just not be true. CGI-programs worked perfectly when placed /var/www/html/cgi-bin, but not in /usr/lib/cgi-bin (or /var/www/cgi-bin). This is with default configuration.

OpenWRT on Eee701

I ran OpenWRT on my Eee701 (mostly to test Node.js). A few notes…
Use the combined image: openwrt-15.05-x86-generic-combined-ext4.img.gz
Unpack it. Write it to a USB drive with dd. For me, it boots my Eee without any modification.

You probably want networking.
Download: kmod-atl2_3.18.20-1_x86.ipk.
I suggest you put it in /root on the filesystem of the above mentioned image, before starting up.

As with the RPi, you might want to edit your /etc/config/network to act like a pure client on the network:

config interface 'lan'
	option ifname 'eth0'
	option proto 'dhcp'
	option macaddr 'XX:XX:XX:XX:XX:XX'
	option hostname 'rpiopenwrt'

USB Storage
It seems you need to install usb-block-support the usual way… and then it is good to have network.

Best Raspberry Pi Server Linux Distribution

Since I got my first Raspberry Pi have have wondered: how to turn it into a proper server. Options that I have not been entirely satisfied with:

  • Arch Linux: probably a great option if you know Arch… I have been too lazy to learn.
  • Gentoo Linux: is Gentoo still relevant? Building everything on the RPi sounds very painful (slow)
  • OpenWrt: nice, but slightly too minimal for a server
  • Raspbian: nice, but a little bit too big standard installation (perhaps it does not really matter, but every apt-get upgrade takes longer time, and so on)
  • NetBSD: such a disappointment :(

I now found, and tested, Raspbian Unattended Netinstaller. For me, this is the shit.

If is really this simple:

  1. Format your SD-card with FAT32 (just as usual)
  2. Unpack (unzip) the raspbian-ua-netinst on your SD-card
  3. Connect the SD-card, ethernet and power to your Raspberry Pi
  4. Wait (about 25 minutes, they say, that was ok with me)
  5. SSH into your new lean Raspbian system (root/raspbian).
  6. Read under “first boot” what to do next

Clearly, you need a properly configured network (DHCP, allow fetching of packages, and you need to know what IP address it got).

The entire experience is much enhanced if you connect to your Raspberry Pi with a serial cable during the entire procedure. Jokes aside, I used a serial with my first installation. Second time when I felt confident with the process I did not bother with the serial cable.

First boot quick guide

#dpkg-reconfigure locales
#dpkg-reconfigure tzdata

/boot/config.txt: add the line

Upgrade to jessie
For some reason, Raspbian installation is still based on wheezy, not jessie (you don’t get the latest version of Debian). I suggest, upgrade immediately:

/etc/apt/sources.list (replace wheezy with jessie, two places)

# apt-get update
# apt-get dist-upgrade

It is almost as fast as the installation itself 😉

I think, for the Raspberry Pi V1, Raspbian installed this way is the best server system you can have (perhaps Arch is better if you know it). For a Raspberry Pi V2, perhaps standard Debian is better (I have never used an RPi v2).

Syncthing rocks!

For quite a while I have been using ownCloud to syncronize and backup files. But enough about ownCloud, I think I have found something much better for my needs: Syncthing.

It is still early, but a few things I like:

  • Simple command line server with webGUI, makes it easy to run on headless machines, and the same GUI for all platforms
  • Light on resources (it actually works well on my QNAP-TS109: ARMv5@500MHz and 128MB RAM)
  • It had Debian packages, even for armel
  • It is easy to use – just start using it and you will get it immediately
  • No need for a webserver or database
  • There is no single centralized server that can crash, requires special updates, or that requires a recovery plan.

I have now synced ~13000 files, ~75GB, to my QNAP. It uploads/downloads at about 250-500kb/s (kilobytes), and it uses about 60-70MB of RAM in doing so. With other hardware is it much faster – I think a Raspberry Pi with a USB drive will be excellent.

Synching seems based on Go, and Go seems not to be available for PowerPC, so my old G4 that has been struggling with ownCloud for a while will need something else to do.

Node.js 4 on OpenWrt

Node.js is merged with io.js, and after Node.js 0.12.7 came version 4.0.0.

Well, the good news is that V8 seems to be competely and officially supported on Raspberry Pi (ARMv6+VFPv2) again (it has been a little in and out).

I intend to build and benchmark Node.js for different possible (and impossible) OpenWRT targets, and share a few binaries.


brcm2708: 4.0.0, 4.1.0 (also works for brcm2709 Raspberry Pi 2)
x86: 4.1.0

You need to install dependencies:

# opkg update
# opkg install librt
# opkg install libstdcpp

Octane Benchmark:

Target        System             CPU        Score      Time
brcm2708      Raspberry Pi v1    700Mhz       97.1     2496s
brcm2708      Raspberry Pi v2    900Mhz     1325        198s
x86           Eee701             900Mhz     2559        118s

Building x86
With the 15.05 toolchain, this script configured Node.js 4.1.0

#!/bin/sh -e

export CSTOOLS_INC=${CSTOOLS}/include

export CC="i486-openwrt-linux-uclibc-gcc"
export CXX="i486-openwrt-linux-uclibc-g++"
export LD="i486-openwrt-linux-uclibc-ld"

export CFLAGS="-isystem${CSTOOLS_INC}"
export CPPFLAGS="-isystem${CSTOOLS_INC}"

export PATH="${CSTOOLS}/bin:$PATH"

./configure --without-snapshot --dest-cpu=x86 --dest-os=linux --without-npm

bash --norc

Then just run make, and wait.

Building brcm2708 (Raspberry Pi v1)
I configured
– Node.js 4.0.0 with 14.07 toolchain,
– Node.js 4.1.0 with 15.05 toolchain
with the following script:

#!/bin/sh -e

export CSTOOLS_INC=${CSTOOLS}/include

export CC="arm-openwrt-linux-uclibcgnueabi-gcc"
export CXX="arm-openwrt-linux-uclibcgnueabi-g++"
export LD="arm-openwrt-linux-uclibcgnueabi-ld"

export CFLAGS="-isystem${CSTOOLS_INC} -march=armv6j -mfloat-abi=softfp"
export CPPFLAGS="-isystem${CSTOOLS_INC} -march=armv6j -mfloat-abi=softfp"

export PATH="${CSTOOLS}/bin:$PATH"

./configure --without-snapshot --dest-cpu=arm --dest-os=linux --without-npm

bash --norc

Then just run make, and wait.

Building ramips/mt7620 (Archer C20i)
Even though I have built 0.10.38 for ramips/mt7620, I fail with 4.0.0. Well, the build works, but the binary generates Illegal Instruction.

#!/bin/sh -e

export CSTOOLS_INC=${CSTOOLS}/include

export CC="mipsel-openwrt-linux-musl-gcc"
export CXX="mipsel-openwrt-linux-musl-g++"
export LD="mipsel-openwrt-linux-musl-ld"

export CFLAGS="-isystem${CSTOOLS_INC}"
export CPPFLAGS="-isystem${CSTOOLS_INC}"

export PATH="${CSTOOLS}/bin:$PATH"

./configure --without-snapshot --dest-cpu=mipsel --dest-os=linux --without-npm --with-mips-float-abi=soft
bash --norc

I tried adding to configure: –with-mips-fpu-mode=fpxx.
That broke compilation because g++ does not support -mfpxx.
I replaced all instances of ‘-mfpxx’ with ” in deps/v8/build/toolchain.gypi.
Then compilation passes, but still Illegal Instruction.

Notes on Raspberry Pi and Serial

I experimented with my Raspberry Pi (v1 B) and a serial cable, a USB-serial identified as:

[85907.504415] usb 4-5: new full-speed USB device number 19 using ohci-pci
[85907.730850] usb 4-5: New USB device found, idVendor=0403, idProduct=6001
[85907.730863] usb 4-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[85907.730871] usb 4-5: Product: TTL232R-3V3
[85907.730877] usb 4-5: Manufacturer: FTDI
[85907.730882] usb 4-5: SerialNumber: ********
[85907.737978] ftdi_sio 4-5:1.0: FTDI USB Serial Device converter detected
[85907.738070] usb 4-5: Detected FT232RL
[85907.744057] usb 4-5: FTDI USB Serial Device converter now attached to ttyUSB1

My USB-serial-device has six cables: black-brown-red-orange-yellow-green.
Connected to the RPi from the corner pin: none-none-black-yellow-orange-none8x.

At this point I have no success with minicom. Screen works though:

sudo minicom -b 115200 -o -D /dev/ttyUSB1
sudo screen /dev/ttyUSB1 115200

When serial works, my procedure is:

  1. Connect everything except power
  2. Start screen
  3. Connect power
  4. Within a few seconds i get output

If I start a fresh default NOOBS (v1.4):

Uncompressing Linux... done, booting the kernel.

Welcome to the rescue system
recovery login: 

You can log in with root/raspberry, but I don’t know if you are meant to (can) install Raspbian this way.

NOTE: The Raspberry Pi itself prints nothing to the serial console. Only with a properly installed SD-card inserted, you get output.

Already installed System
For an already installed Raspbian, I got a normal login prompt over serial.
For an already installed OpenWRT (14.07), I got a root prompt, no password required, over serial.

Formatting SD-card using Linux
Sometimes it is hard to produce an SD-card that the Raspberry Pi wants to boot from.
This partitioning and formatting works:

$ sudo /sbin/fdisk -l /dev/sde

Disk /dev/sde: 7,4 GiB, 7948206080 bytes, 15523840 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00055f28

Device     Boot Start      End  Sectors  Size Id Type
/dev/sde1        2048 15523839 15521792  7,4G  e W95 FAT16 (LBA)

gt@oden:~/Downloads$ sudo mkfs.vfat /dev/sde1
mkfs.fat 3.0.27 (2014-11-12)

To be on the safe side, before using fdisk:

$ sudo dd if=/dev/zero of=/dev/sde bs=1024 count=10240

Testing Mackmyra

Since 1999 there is a Swedish malt whisky distillery: Mackmyra. They have released a large number of small series of single malt whiskies and people can “buy” their own casks as well. But I am not interested in those now, I will focus on Mackmyra standard products and try to answer the simple question: are they any good?

My expectation is that a standard Mackmyra is comparable to common Scottish malts. For that level of quality I would be willing to pay a little premium (for Mackmyra being a small, new, Swedish distillery).

I bought the following Mackmyra single malts (no age indication)

  • Mackmyra Brukswhisky (hard to translate, but the cheapest one)
  • Mackmyra Svensk Ek (Swedish Oak)
  • Mackmyra Svensk Rök (Swedish Smoke)

My testing and tasting method is simple. On each testing occation I try the Mackmyra and a Scottish malt that I expect to be similar. The idea is to decide if the Mackmyra is comparable, better or worse. Note that I did the three testings on different days.

1. Mackmyra Brukswhisky vs Glenturrent 10 years old
Glenturret is one of the single malt whiskies that they let me try in The Whisky Experience in Edinburgh. My bottle says 10 years old and not much more. It does not get more standard when it comes to Scottish Single malt, I think.

Appearance: Very similar, the Mackmyra being slightly paler.

Aroma: Glenturret has a richer, sweeter aroma, but also one I dont find entirely pleasant (it smells Blend, to me). Mackmyra is more subtle, and a bit more fruity (not sweet, perhaps pear).

Taste: Glenturret is quite bitter, fading away with time. Mackmyra has some bitterness, tastes a bit wood (young/dry/burnt), and fades away quicker. At second try the Glenturrent reveals more fruitiness. Adding a little bit of water to the Mackmyra brings out much more fruitiness and that pear I felt in my nose. Adding water to the Glenturret: it has some spiciness and heaviness and improves a little as I slowly finish the small glasses.

Badness: Both of them just have very little badness. The Mackmyra tastes slightly too young (the freshly cut and slightly burnt dry wood, like the smell in a carpenter shop). The Glenturret on the other hand, a little bit chemical and too bitter.

Conclusions: The Glenturret tastes older, and ridiculous as it may be – it tastes more scottish. The younger Mackmyra is a bit different, but it clearly tastes like a single malt.

Winner: no winner. You can serve me Glenturrent or Mackmyra – I will be equally satisfied.

2. Mackmyra Svensk Ek vs Clynelish 14 years old
Both Mackmyra Svensk Ek and Clynelish 14 years old are about 46% strong. The Clynelish I got from a package of three Classic Malts.

Appearance: Very similar, Mackmyra slightly paler.

Aroma: Clynelish clean and elegant. Mackmyra more fruit and vanilla (it’s probably oak). Clynelish a bit heavier and sweeter.

Taste: Clynelish quite thin, a little bitter (probably needs water). Mackmyra some oak, some sourness and bitterness (also in need of water). At this stage, both smell better than they taste so I add water to both.

Clynelish got a nice bourbon flavour with some water. The Swedish oak is clearly there in the Mackmyra – a slightly unusual whisky flavour. While the Clynelish taste is quite well defined, the Mackmyra is more everywhere in the mouth, and a little bit burnt in the finish. I add more water to both.

Well, I have thought about it since the first taste, there is clearly pear in Mackmyra. I think the water did its job and the Mackmyra is now softer, but it also tastes a little diluted. The Clynelish is more oily, sweeter and has more flavour – not bad, but not particularly interesting.

Badness: If you like whisky, there is nothing bad about the Clynelish, but it is not remarkable either. The Mackmyra needs water (and at 46% that is ok) for me to appreciate it, but it quickly tastes a little diluted – to me this is a sign that there simply is not enough flavour in it, and for a young whisky that is not so strange.

Conclusions: The Clynelish is very solid: perfected at 14 years in Bourbon cast to the point that it is not very interesting at all. My impression is that it tastes like a perfect blend, but with little character (Clynelish is not Brora, after all). The Mackmyra, with enough water, tastes fine. But it requires a friendly attitude to come out good.

Winner: The Clynelish wins, and I believe it does for two reasons. First, whisky is Scottish business and while the Clynelish is very solid, the Mackmyra is a little too different, too fruity and too young. Second, the Mackmyra with too little water is not a premium experience. That said, the Mackmyra is more interesting than the rather boring Clynelish, to me. And with enough water, the Mackmyra is a tasty drink.

3. Mackmyra Svensk Rök vs Bunnahabhain 8 years old
I decided to try the Mackmyra Svensk Rök (Swedish Smoke) against a Bunnahabhain from Gordon MacPhails, 8 years old. It is labeled “heavily heated”, and my hope was that the level of peatiness/smokiness would be quite the same for the two contestants.

Appearance: Mackmyra is slightly paler, perhaps, they look very similar.

Aroma: Bunnahabhain has a classic Islay smell (which I don’t usually expect in a Bunnahabhain). It is a powerful yet soft smell, not so dominated by peat and smoke after all. Unfortunately, I should have smelled the Mackmyra first, because now I realise that the Bunnahabhain is too powerful and the character of Mackmyra appears to be very subtle. However, after waiting a little while the Mackmyra has a clear and pleasant smell, with not so little smoke (it is not peat) after all. The Mackmyra more resembles (as I remember them) the earlier two Mackmyra, than it resembles Bunnahabhain.

Taste: Mackmyra first now: at 46% some smoke, some fruitiness and some sourness, but it clearly needs water. With little water a nice yet quite subtle smokiness is revealed and behind it the dry flavour of young wood. But it still needs more water. What happens here (with more water) is that the (still subtle) smokiness hides the fruity and nice character of the two previous Mackmyra.

The Bunnahabhain (which arguably smells closet) has a long, complex and soft taste (at its original 43%). It is clearly not as heavy as its more famous Islay neighbours, but compared to Mackmyra it is very rich and oily.

Switching back to Mackmyra is surprisingly pleasant (it tastes nicer after I had the Bunnahabhain, not worse as I expected after something heavier). But the Mackmyra, after Bunnahabhain, is mostly fruity and fresh, not smoky at all.

Badness: Mackmyra, again, requires a certain amount of water get right. It is a rather thin experience, especially with this competition. Bunnahabhain, I would not call it elegant, is rather wild. It is not that it is very powerful or peaty, it is just a little bit everywhere, and now and then, in some places in my nose and mouth, not very refined or elegant. It is a young little Islay brother.

Conclusions: I knew it was going to be tricky to pick a contestant to Mackmyra Svensk Rök. I did not find a Highland Park in my stash, that could have been better. I have a Jura Superstition: it would perhaps have been less peaty and for that reason a better opponent to Mackmyra. But I really like that Jura and I did not want to pit Mackmyra against a personal favourite.

Winner: Bunnahabhain beats Mackmyra, and usually, head to head, a much heavier whisky beats the lighter one. But Bunnahabhain did not come out as fantastic this evening. But there was just too little to explore in the Mackmyra.

My impression is that while the Clynelish is much better than the Glenturrent, the Svensk Ek is not much better than the Brukswhisky. And while Bunnahabhain is not necessarily much better than Clynelish, the Mackmyra Svensk Rök fails to improve much compared to the other two. At least, this is my impression when testing them head to head on different occasions.

In fact Svensk rök was the most disappointing experience (but perhaps the competition was completely unfair).

I think it is unreasonable to expect of a little young Swedish distillery that they produce world class whisky immediately, especially in a business where long storage time is a significant factor in product quality. Mackmyra claims they use small casks to speed up the process, but perhaps this shortcut is not perfect. Mackmyra needs water, but it quickly tastes diluted – there is not so much flavour to reveal. I think it needs more time (and perhaps it needs better casks, I don’t know about that).

I appreciate Mackmyra for being different (sometimes it reminds me of something coming from south of Sweden rather than from west of Sweden). I don’t find Mackmyra unpleasant (disgusting, chemical, bad, as I sometimes do with whisky). But if it is going to beat Scottish whiskies head to head, it needs weaker opponents or more time to mature.

Update: Mackmyra Svensk Rök vs Teachers
Teachers is a respectable Scottish blend with some smoky character so I decided to test it against Mackmyra Svensk Rök. Those who mostly appreciate whisky for being sweet might prefer Teachers (sweetness is something you won’t find in the Mackmyra). I don’t like my whisky sweet, and, side by side, I prefer the Mackmyra (with some water in it, please) to Teachers. As I slowly finish the glasses, I more and more prefer the Mackmyra – compared to Teachers it appears to be a very decent whisky.

This could seem like a ridiculous comparison; a standard blend vs a whisky that is far more expensive than a cheap single malt. I however find it meaningful to establish the relative quality of Mackmyra. And since it is better than a respectable blend, it has quality.

Update: Mackmyra Svensk Ek vs Glenfiddish 12
Glenfiddish 12 is another standard Scottish single malt. I compared it to the Mackmyra Svensk Ek. I think the quality is quite similar. The Glenfiddish is softer and sweeter (aged partly on Sherry casks) and the Mackmyra has more character. I, with a taste for more dry whisky, prefer the Mackmyra.

Upgrading ownCloud 7.0.4 to 8.1.1

I am running ownCloud on a Debian machine with Mysql and I have been a little behind with upgrading it. Today I upgraded from 7.0.4 to 8.1.1 following the standard instructions. A few more notes on my environment:

  1. I don’t use encryption for files
  2. I don’t use https/ssl (I am behind an openvpn server)
  3. I did the upgrade in one step (7.0.4 to 8.1.1, not via intermediate versions)

It basically went fine. When I ran:

$ sudo -u www-data php occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
Checked database schema update
Checked database schema update for apps
Updated database
Disabled 3rd-party app: calendar
Disabled 3rd-party app: contacts
Disabled 3rd-party app: documents
Updating  ...
Updated  to 0.7
Updating  ...
Updated  to 0.6
Updating  ...
Updated  to 1.1.10
Updating  ...
Updated  to 2.0.1
Updating  ...
Updated  to 0.6.2
Updating  ...
Updated  to 0.6.3
Updating  ...
Updated  to 0.6.0
Update 3rd-party app: calendar
Exception: App does not provide an info.xml file
Update failed
Maintenance mode is kept active

I am a little surprised, because I don’t remember calendar, contacts and documents being 3rd party apps before (?). Anyway, the server did not come up, so I ran the command again:

$ sudo -u www-data php occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
Turned on maintenance mode
Checked database schema update
Checked database schema update for apps
Updated database
Update successful
Turned off maintenance mode

Now it worked. Logged in, no traces of the three 3rd-party apps. Whatever, I use ownCloud for the files.

Performance after upgrade
ownCloud is not particularly fast. I did a very quick and unscientific performance check: before upgrading I uploaded a folder (17 files, 4.1 MB) to ownCloud: it took 30 seconds (for the desktop client to complete syncing). After the upgrade the same folder took 19 seconds to sync. This proves nothing of course, but at least it seems promising.

Ubuntu Client
My Ubuntu client used ownCloud vs 1.7. It does not work with 8.1.1. Installing ownCloud client from external repository worked fine. Same thing for Debian, obviously.