Youtube 500 Internal Server Error

As noted in Youtube 500 Internal Server Error today I again noted an “500 Internal Server Error”. Normally you would not expect these kind of errors from Google. It says:

Sorry, something went wrong.

A team of highly trained monkeys has been dispatched to deal with this situation.

If you see them, send them this information as text (screenshots frighten them):


Converting WordPress Export File to Hugo

I have written on the Hugo static site generator here. Now I have written a migration program in the Go programming language to convert from WordPress export format to Hugo format. This program wp2hugo.go is in GitHub. It can be freely downloaded and does not need any further dependencies, except, of course, Go. The Go software is in Arch Linux or Ubuntu.

To convert a blog from WordPress you have to create an export file.

If the blog is not too voluminous one downloads a single XML-file which contains all posts and pages. If the blog in question is larger then you will receive an e-mail from that you can download a ZIP which contains two or more XML files in them. If you have such a ZIP-file, then unpack it, for example by using p7zip. Then run

go run wp2hugo.go XML1 XML2 ...

Continue reading

Using Odroid as IP Router

I purchased an Odroid-XU4 for ca. 80 EUR including power-supply and case from Pollin. The original manufacturer is hardkernel. I intended to use this small ARM computer as a router and firewall. In the past I had used routers from multiple vendors, e.g., Linksys/Cisco, TP-Link, AVM/FritzBox, Netgear, and so on. There is a rule of thumb with all these devices: Usually you have to reboot them once or twice a month, otherwise they misbehave somehow. At least three of these device went completely catatonic. Now I had enough of this, I also wanted a command line interface to the router, ideally a real Linux system with bash, cron, gcc, etc. Although I already own an Intel NUC and I am very happy with this computer, an Intel NUC is a little bit too expensive to be used as just a router.

I recommend to additionally purchase a RTC backup battery. The Odroid has a realtime clock, but looses all date and time information once powered off. This way the log of the computer is garbled.

Continue reading

Exceeding 10.000 km with E-Bike

As described in Commuting to Work with an E-Bike I drive to my work place using an e-bike. As I found out that using a bike is a viable alternative to public transport I bought a better e-bike after about a year. I bought my first e-bike in March 2015, my second in December 2015, and used it since January 2016. With this second e-bike I now exceeded more than 10.000 km within a year, as shown in below photographs from the odometer. In total I have now travelled about 20.000 km with my two bikes within two years, i.e., I cycled half the earth perimeter.

Continue reading

Wiping Disks

How fast can you wipe a complete disk? For this I dumped zeros to a MS Windows partition based on an SSD formatted with NTFS.

[root@i7 ~]# time dd if=/dev/zero of=/dev/sda1 bs=1M
dd: error writing '/dev/sda1': No space left on device
81920+0 records in
81919+0 records out
85898297344 bytes (86 GB, 80 GiB) copied, 182.699 s, 470 MB/s

real    3m2.703s
user    0m0.033s
sys     0m43.470s

It was a real pleasure to get rid of MS Windows after just 3 minutes 😉

Once more, second partition on SSD formatted with NTFS.

[root@i7 ~]# time dd if=/dev/zero of=/dev/sda2 bs=1M
dd: error writing '/dev/sda2': No space left on device
147015+0 records in
147014+0 records out
154155352064 bytes (154 GB, 144 GiB) copied, 326.108 s, 473 MB/s

real    5m26.110s
user    0m0.097s
sys     1m21.503s

Continue reading

Make USB Stick Bootable

In various forums one reads that one should use dd to copy a ISO image to an USB stick. Although this works, more often you do not want to use a ISO image but rather copy a Linux system at hand. First you mount the root filesystem of the new USB stick, then mount /boot within a chroot. Finally use grub commands. I.e., type

mount /dev/sdc2 /mnt/stick
arch-chroot /mnt/stick
mount /dev/sdc1 /boot           <--- /boot is local to chroot!
grub-install --target=i386-pc --boot-directory=/boot /dev/sdc
grub-mkconfig -o /boot/grub/grub.cfg
umount /boot                    <--- umount "local" /boot

Also see GRUB in the Arch Wiki.

Setting the bootable flag in the partition table one either uses gparted, a graphical tool, or, as the task at hand is so simple, one just uses parted.

parted /dev/sdc
set 1 boot on

Unrelated, but often useful. Just in case you changed something in the initial RAM disk, use

mkinitcpio -p linux