Category Archives: NetBSD

My view on the NetBSD operating system

RAIDframe to the Rescue

One of the hard disks in my NetBSD server developed problems … again. This time it was one of the Western Digital VelociRaptors which I use for performance reasons.

The good news is that I didn’t notice for almost two weeks because NetBSD RAIDframe handled the situation smoothly. It kicked the broken disk out of the RAID array, reported the problem in the nightly e-mails (which I somehow missed) and kept the machine up and running. Well done RAIDframe, have a cookie!

NetBSD-friendly Web Videos

Watching videos online has become very popular in recent years. Large video web sites as Youtube or Netflix are responsible for a lot of the Internet traffic these days. The predominant technology for delivering video over the Internet is still Adobe Flash. Unfortunately the Flash Player isn’t only renown for its poor security record and adverse effects on browser performance it is also available for only a small number of platforms (Windows, Mac OS X and a few Linux platforms). There are other browser video plugins like Microsoft’s Silverlight and RealPlayer. But they are available for even less platforms and not widely deployed.

Of the above video solutions only Flash works under NetBSD’s amd64 and i386 ports, but often not very well. While NetBSD 6.0 should improve that situation with the updated Linux emulation Flash will still be limited to the x86 ports. So how can you create a web page with an embedded video that is NetBSD-friendly despite all these technology problems?

Fortunately the new upcoming HTML5 standard can help here. Although it is still under development a lot of its aspects are already supported by modern browsers. One of them is the video element. It allows to embed a video into a web page with only a few lines of HTML code. Here is a simple example for a video element:

<video height="320" width="240">
<source src="my-video.ogv" type="video/ogg" />

This allows video playback in e.g. Firefox under NetBSD without any extra plugins. There is however one small problem: there is no single video file format that is supported by all browsers. Safari, Internet Explorer 9 and most mobile browsers only support MP4 files. Firefox and Opera however only support OGV files. Only Google Chrome supports both video file formats.

Fortunately the HTML5 video element allows you to specify multiple different video file format. Here is an improved version of our example:

<video height="320" width="240">
<source src="my-video.ogv" type="video/ogg" />
<source src="my-video.mp4" type="video/mp4" />

In this case the browser can pick either the MP4 or the OGV video file. There are various programs for creating video files in MP4 or OGV format. If you are lucky your video editing software will already support generating MP4 files. If it doesn’t you can try the ffmpeg program to convert the video file into an MP4 file. Although ffmpeg can generate OGV files as well I would recommend ffmpeg2theora for this job. It can read the same file formats and generates OGV files whose audio information is correctly played back by Firefox.

If you create a web page with video using the above recipe it will work on a large number of platforms. Playback of this video has been tested with Firefox (NetBSD, Mac OS X, Linux, Windows), Safari (Mac O X), Internet Explorer 9 (Windows), Opera (Linux) an HTC Desire Z under Android 2.3.3, an iPhone 4 and an iPad. Only an iPhone 3GS refused to play the video simply because the video’s resolution isn’t supported on that hardware.

VMware Fusion 4.0

VMware recently released version 4.0 of VMware Fusion, their virtualisation solution for Mac OS X. I tried out the new version on my Mac Pro under Mac OS X Snow Leopard yesterday.

The update from VMware 3.1.3 to 4.0.1 worked absolutely smoothly. I didn’t even have to reboot my Mac. Both of my virtual machines booted without problems afterwards. And the really good news is that NetBSD, although still not officially supported as a guest operating system, continues to run very well under VMware Fusion. My NetBSD/i386 current machine using four virtual cores and 3GB of memory actually runs faster since the update:

VMware Time to run ./ -j 8 distribution
3.1.3 42:47 minutes
4.0.1 40:30 minutes

I haven’t particularly noticed any of the new features except the single window user interface. I suppose those enhancements are more visible if you use Window extensively.

I haven’t decided yet whether VMware Fusion 4.0 was worth the money. But nothing got broken and I could now safely upgrade to Mac OS X Lion. If you think this update is too expensive you can always try out VirtualBox.