Fix Windows as default boot on Ubuntu with Grub2 loader

If you install Ubuntu on a machine that came with Windows pre-installed you have the choice of preserving Windows and chose each time you boot which operating system to run. By default, the boot menu will list the current Linux kernel, followed by any older Linux kernel versions, followed by a memory test and finally the original Windows version. By changing a GRUB boot loader configuration file you can chose which one is the default that gets booted when you just wait and don’t touch the keyboard.

(NOTE: The following instructions assume the Grub2 loader used in Ubuntu 9.10 – earlier versions are different)

For example, the menu might look like this:

Ubuntu, Linux 2.6.31-14-generic
Ubuntu, Linux 2.6.31-14-generic (recovery mode)
memory test (memtest86+)
memory test (memtest86+, serial console 115200)
Windows Vista (loader) (on /dev/sda1)

You can configure Linux to — unless you tell it otherwise — always boot Vista by setting GRUB_DEFAULT in /etc/default/grub to the number of lines above the entry you want to boot (4 in this case), instead of 0 (zero) for the top entry. After any change to /etc/default/grub you need to also run sudo update-grub:

joe@ubuntu910:~$ gksudo gedit /etc/default/grub


joe@ubuntu910:~$ sudo update-grub

The problem with that is, when the next kernel update comes out, two lines will be inserted at the top and your default value now selects the wrong entry:

Ubuntu, Linux 2.6.31-15-generic
Ubuntu, Linux 2.6.31-15-generic (recovery mode)
Ubuntu, Linux 2.6.31-14-generic
Ubuntu, Linux 2.6.31-14-generic (recovery mode)
memory test (memtest86+)
memory test (memtest86+, serial console 115200)
Windows Vista (loader) (on /dev/sda1)

You would need to manually select the latest kernel and repeat the above steps with a new value of 6 in this case. This is clearly a problem. Fortunately, there’s a simple workaround: use a name instead of a number for selecting the default. Here is how it works:

1) List the bootable operating systems:

joe@ubuntu910:~$ fgrep menuentry /boot/grub/grub.cfg
menuentry “Ubuntu, Linux 2.6.31-15-generic” {
menuentry “Ubuntu, Linux 2.6.31-15-generic (recovery mode)” {
menuentry “Ubuntu, Linux 2.6.31-14-generic” {
menuentry “Ubuntu, Linux 2.6.31-14-generic (recovery mode)” {
menuentry “Memory test (memtest86+)” {
menuentry “Memory test (memtest86+, serial console 115200)” {
menuentry “Windows Vista (loader) (on /dev/sda1)” {

2) Mark and copy the entry you want to stay bootable, including double quotes, for example "Windows Vista (loader) (on /dev/sda1)".

3) Edit the Grub configuration and paste the new value after the GRUB_DEFAULT= (in place of 0 or 4 or whatever number):

joe@ubuntu910:~$ gksudo gedit /etc/default/grub
GRUB_DEFAULT=”Windows Vista (loader) (on /dev/sda1)”
joe@ubuntu910:~$ sudo update-grub

Note: Make sure to close the gedit window before doing sudo update-grub

That’s it, no more Grub configuration tinkering required! 🙂

Marvell MC85 with NdisWrapper on Ubuntu 9.10

Last week I updated my Gateway M-6750 from Ubuntu 9.04 to Ubuntu 9.10 (“Karmic Koala”) and managed to get myself into a right mess, as I lost access to both my wired and wireless internet connections. I then burnt an Ubuntu 9.10 live CD from an ISO image dowloaded with uTorrent and reinstalled from there. That got the wired connection working, but the wireless was still gone. Before I fixed that problem I upgraded my notebook hard disk drive, complete with dual-boot Vista and Ubuntu partitions, to a new 500 GB drive (see yesterday’s blog post).

The Marvell MC85 doesn’t have a native Ubuntu driver yet. Therefore you have to use a Windows XP driver for it as described here. You can download the Netgear wn311t_setup_4_1.exe driver set and extract its content on either XP or Wine. You’ll end up with NetMW14x.inf, netmw143.sys and netmw145.sys. Only NetMW14x.inf and netmw145.sys are actually needed.

See my instructions in my earlier blog post for the initial steps (look for a section labeled “Update, 2008-03-18”).

Installing the driver with ndiswrapper does almost everything. The magic ingredient that was missing when I tried to get it working this time was to ensure that ndiswrapper loads every time, before using the Network Manager or when booting up. Without ndiswrapper the Windows driver won’t be loaded and Ubuntu simply won’t see the wireless adapter. It will show up as unclaimed on this command:

lshw -C network

*-network UNCLAIMED
description: Ethernet controller
product: Marvell Technology Group Ltd.
vendor: Marvell Technology Group Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 03
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:f6000000-f600ffff memory:f4000000-f400ffff
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:06:00.0
logical name: eth0
version: 01
serial: 00:e0:b8:XX:XX:XX
size: 10MB/s
capacity: 100MB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10MB/s
resources: irq:28 ioport:4000(size=256) memory:fa200000-fa200fff memory:c0000000-c001ffff(prefetchable)

Ubuntu uses file /etc/modules to enumerate extra drivers and kernel modules that need to be loaded at boot time. Therefore I needed to add a line in /etc/modules using gedit:

gksudo gedit /etc/modules



in a line of its own at the bottom of the file and save it, then restart your machine. After the reboot you should be able to use the Network Manager to manage wireless connections, including looking for available networks and configuring security parameters (for WPA, WPA2 / RSN) to be able to connect.

I found many other threads and blog postings that discussed manually editing configuration files and configuring wpa_supplicant, but none of that is required if you just configure Ndiswrapper for NetMW14x.inf, tell NDiswrapper about the device ID and then ensure that Ndiswrapper is always laoded. Here is the lshw output with Ndiswrapper having claimed the wireless adapter:

description: Wireless interface
product: Marvell Technology Group Ltd.
vendor: Marvell Technology Group Ltd.
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 03
serial: 00:16:44:XX:XX:XX
width: 32 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=ndiswrapper+netmw14x driverversion=1.55+NETGEAR,10/04/2006, ip= latency=0 link=yes multicast=yes wireless=IEEE 802.11g
resources: irq:16 memory:f6000000-f600ffff memory:f4000000-f400ffff
description: Ethernet interface
product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:06:00.0
logical name: eth0
version: 01
serial: 00:e0:b8:XX:XX:XX
size: 10MB/s
capacity: 100MB/s
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list rom ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half latency=0 link=no multicast=yes port=MII speed=10MB/s
resources: irq:28 ioport:4000(size=256) memory:fa200000-fa200fff memory:c0000000-c001ffff(prefetchable)

Notice the driver=ndiswrapper+netmw14x after configuration:. If you get that you should be in business! 🙂

Backing up / migrating your hard disk data with a Ubuntu live CD

Recently two hard disks died in my household, both of which were Windows boot disks, just as if I needed a reminder how quickly one can lose important data. This and some troubles while upgrading my Gateway M-6750 notebook from Ubuntu 9.04 to Ubuntu 9.10 (“Karmic Koala”) prompted me to get some spare hard disks and do a complete backup / upgrade.

I upgraded my notebook from 250 GB to 500 GB, and I can now keep my old drive as a safe snapshot to go back to if anything should ever go wrong with the new drive.

The most important tools needed for this were an Ubuntu 9.10 live CD from an ISO image (downloaded with uTorrent) and the NewerTech Universal USB 2.0 Adapter, which lets you hook up just about any IDE or SATA drive to a USB-equipped computer.

My notebook has Windows Vista on it, for which Gateway did not ship an install DVD – theres’s only a recovery partition. For installing Ubuntu I had originally shrunk the Vista NTFS partition on the 250 GB drive to make space for a 60 GB Linux partition, which provides a dual-boot feature via the GRUB loader.

I ordered some WD Scorpio Blue 500 GB notebook hard disks (WD5000BEVT) from Amazon and they arrived the next day. These are good work horse drives. I hooked one up to the NewerTech Universal USB 2.0 Adapter and booted into the Ubuntu Live CD.

From there I started a terminal window and used the “dd” command to make an image copy of the drive, see below. Be very careful with the source and destination specification. Use fdisk -l to verify which drive is which and in some cases the USB drive will appear as /dev/sdc instead or /dev/sdb. For IDE (PATA) drives the names could be /dev/hda, /dev/hdb, etc. If you specify the wrong drive as the destination you could wipe out all your data!

sudo dd if=/dev/sda of=/dev/sdb

This will copy every single byte from the first SATA hard disk to the second SATA (or USB 2.0) hard disk on the machine. You won’t have to worry about what partitions there are and which one is bootable, because it will simply copy all of them.

I started it last thing before I went to bed. It took about 2 hours to copy the entire 250 GB of the existing to the existing WD2500BEVS to the new drive. In the morning I shut down Ubuntu, opened the bottom of the case and transplanted the new drive inside, which took a small screw driver and about 10 minutes. Then I fired up the machine again and it successfully booted both Windows Vista and Ubuntu 9.10 off the new drive.

Since the new drive had more space, I wanted to resize the partitions so that each could take 250 GB instead them having to share that space. GNU utility gparted lets you do that. It can shrink, grow and move partitions pretty any way you like. You can tell it the new size of a partition and how much space to leave before and after it.

I first did not know that gparted can move partitions as well as resizing them, so I decided to remove the Ubuntu partitions, grow the NTFS (Windows) partitions and the reinstall Ubuntu into the remaining space. Be careful when removing an Ubuntu partition in a dual-boot system, because the active loaded and its menu file will be in the Ubuntu partition. Thus if you shoot it without first making the Windows partition the active boot partition you won’t be able to boot off that hard disk any more! Either boot of your operating system install CD/DVD or off an operating system recovery partition (if available) and select the command prompt. From there use fixldr /mbr (2000/XP/2003) or bootrec /FixMbr (Vista / 7) to rewrite the Master Boot Record. This will disable the Ubunto bootstrap loader. Make sure Windows will boot without the Ubuntu boot menu coming up. No you can remove the Ubuntu

With sudo gparted on the Ubuntu Live CD you can resize the NTFS partition for Windows to any sensible value. In my case I got an error because some NTFS data structures were in an inconsistent state. To fix that I had to boot Windows and run chkdsk /f from a command prompt and then restart. Windows fixed the problem and one restart later I was back in Ubuntu live and gparted was able to resize the partition

After that I installed Ubuntu into the free space that I’d left for it on the 500 GB drive.

Given the low cost of SATA and USB 2.0 drives versus the time and data lost when something goes wrong with your hard disk, I do recommend a full image backup like mine. The dd command also lets you copy drives or partitions to files, so you can back up multiple machines to one large drive.

Acer Revo R3600 and other dual core Atom 330 NVidia Ion nettops

The new Acer AspireRevo R3600 (Acer AspireRevo R3610-U9012) that combines a dual core Atom 330 processor with the Nvidia Ion platform was introduced at the IFA consumer electronics fair in Berlin in September. It is just one of several interesting new nettops coming out now that will offer significantly more processing power, especially for video decoding, while still using little electricity.

Low cost, low power Atom CPUs in small desktop cases (nettops) such as the Asus EeeBox 202 first became popular about a year ago, following in the footsteps of their mobile cousins, netbooks such as the Asus Eee PC range. The latest generation of machines are adding new features and more performance, which will expand the market for low end machines.

Other machines with similar specs to the AspireRevo (dual core Atom 330, NVIDIA Ion chip set and 2 to 4 GB of RAM) include the Asus EeeBox EB1012, the ASUS EeeBox EB1501, the ASRock Ion 330 / Valore ION 330 and the Zotac MAG HD-ND01. In addition, people are building their own low power Atom 330 NVIDIA ION desktops based on mini ITX motherboards such as the ZOTAC ION ITX A Series or the ASUS AT3N7A Atom 330 motherboard and small cases such as the M350.

So what makes this latest bunch of machines so interesting?

First, they use the dual core version of the Atom, the 330 which will speed up multi-tasking as well as single applications that are multi-threaded (click here for a table comparing performance of the N330 to other CPUs).

Second, they abandon the rather pedestrian Intel 945GC chip set (which is basically a four year old design by now) and replaced it with the NVidia GeForce 9400 chip set (Intel Atom + NVidia 9400 = NVidia Ion). The new chip set not only supports DirectX 10 for Windows Vista and Windows 7 but also hardware decoding of digital video. This dramatically reduces the CPU load in software video players that take advantage of it, so that even a humble Atom CPU can keep up with high definition 1080p video streams.

Video performance may have been less of an issue on small netbooks with tiny 1024×600 pixel screens and lacking optical drives, but nettops and other desktops are more likely to use 20 inch screens and bigger that lend themselves well to watching video clips and movies.

Still, NVidia Ion is not a perfect solution for video yet. Amongst others, high definition Adobe Flash videos currently may still have problems because Adobe does not yet take advantage of decoding hardware even if present. For now, only Core 2 and other faster CPUs can cope with all video formats with all software, but Adobe has announced support for hardware decoding for Flash video before the end of the year, at least for the Windows version of Adobe.

NVidia Ion is also much more energy efficient than the Intel 945 GC Express chipset that was used in some earlier Atom nettops. While the Mobile 945 chipset used with single core Atom N270 netbooks (945GSE) is reasonably efficient, the desktop version of the 945 chip set used with the single core Atom N230 and dual core Atom 330 burns more than 20 Watt, over 5 times as much as the modest 4 Watt of the Atom 230 itself and 2 1/2 times as much as the 8 W of the 330. In fact the 945GCE is so inefficient that the cooling fan on the first Intel Atom desktop board had to be mounted on the 945 chip, not the N230 CPU which could be cooled with a passive heat sink alone. Less power than a conventional desktop means not only a lower electricity bill and a smaller carbon footprint, it also means less fan noise and heat.

A dual core Atom with the Ion chip set will actually consume less power than a single core N230 with the 945GC chip set (see GeForce 9400M Versus 945GC – Review Tom’s Hardware : Nvidia’s Ion: Lending Atom Some Wings for a full comparison of the two chip sets).

Another major benefit of the NVidia chipset is that it supports up to 4 GB of RAM while the 945GC and 945GSE are limited to 2 GB even though the Atom was capable of more. This limitation didn’t get much attention before because most Atom machines were shipped with Windows XP, which Microsoft did not allow to be bundled with machines that had more than a single GB of RAM, even though most of these machines could be upgraded to 2 GB by the user. However, if you add a 2 GB DIMM to a 945GSE board that already has 512 MB installed and one free slot, you will still only have 2 GB available, not 2.5 GB. The Ion removes this artificial barrier. Also, Ion boards typically have two DIMM slots while many 945 boards have only one. More memory is welcome because it often means less disk swapping, with a direct boost to performance. Ion offers better memory bandwidth too, which does help when both the CPU and the video chip have to share access to the main memory.

Most Ion boards have 3 internal SATA connectors and also one eSATA connector, while 945GC boards tend to have only two SATA and no eSATA ports. Having an eSATA port is great for using an external drive such as a Blue-Ray disk player or a an external hard disk subsystem such as the Guardian MAXimus external RAID-1 solution to provide robust Network Attached Storage (NAS) via a network-connected Ion machine. Ion nettops also tend to offer HDMI (a digital video link to digital TVs and monitors) and S/PDIF (digital multi-channel audio). Most have 6 or 8 USB ports and draft-N WiFi (802.11b/g/n). On top of that both 945GC and Ion support Gigabit Ethernet.

I’ve been checking online retailers for actual availability of the dual core Ion machines, but things have been moving slowly. I wonder if manufacturers have been holding back until after the Windows 7 release date on Oct 22, to avoid upgrade hassles. Who knows? For example, stocks the ASRock ION 330 NVIDIA ION (which comes without any operating system) and the single core AspireRevo AR1600-U910H (which comes with XP), but any of the 2 GB or 4 GB dual core machines that for now are supposed to ship with Windows Vista, are not available yet. Likewise, Amazon sells a 2 GB single core version of the AspireRevo with Linux or a 1 GB single core version with XP, but no dual core version of it at all yet. Whatever the reason, for now you still have to be patient.

Hopefully more machines will gradually start hitting the stores by November and I certainly expect them in volume before Christmas. With a dual core CPU and the superior NVidia chip set, these carbon-saving small desktop machines are becoming viable for many new purposes, whether running Windows XP, Windows 7 or Linux.

Memory upgrades for Lenovo S10e, Aspire M5201, eMachines T6212

Last month my Gateway GT4014j suddenly died and I replaced it with an Acer Aspire M5201, which came with 2 GB of memory installed. That was less than the 3 GB I had in the Gateway and it affected some very memory hungry apps I use. So three weeks later I did a memory upgrade – a series of upgrades to be more precise. I bought two sets of memory upgrades and upgraded three machines.

In my experience, most computers don’t become obsolete because of CPU clock speeds that are too slow but because either there is too little main memory (RAM) for newer, more demanding (i.e. more bloated) applications or because the machine runs out of disk space. The latter used to be more of a problem than it is now, because of the availability of external USB drives, but lack of RAM is still a problem.

Giving your computer enough memory usually is the best way to give it a performance boost because insufficient memory will result in disk swapping. Without enough memory your applications will spend more time waiting for data to get swapped to and from disk, which slows even the fastest CPU down to a crawl such that even a medium or low end CPU with sufficient RAM could run circles around it.

When Vista came out, many manufacturers still sold 512 MB configurations with Vista Home Basic, while advertising mainly the processor speed. Buyers would have been far better off picking a somewhat slower CPU but equipped with a whole GB of RAM. The same is basically still true today for 1 GB machines (usually with Vista Home Premium) vs. 2 GB machines: More main memory almost always beats more Gigahertz!

Back to my Aspire M5201: It has four DIMM sockets (2 banks) for up to 8 GB of memory (2GBx4), but unless you run a 64-bit operating system such as a 64-bit Linux, Vista 64-bit or (from 22 Oct 2009) Windows 7 64-bit, you can’t actually make use of more than 4 GB. Therefore I opted to go as far as 4 GB only for two 1 GB DDR2 PC2-6400 DIMMs from Crucial Technology (CT12864AA800, from They were 1,980 yen each (about US$22) including sales tax.

I also ordered one 2 GB DDR2 PC2-5300 SODIMM (CT25664AC667) for 3,800 yen (about US$42) for a Lenovo IdeaPad S10e. The S10e is a typical Atom N270 netbook with 1 GB of RAM. One 512 MB SODIMM base memory is soldered in while the other can be replaced with either a 1 GB or 2 GB SODIMM. You end up with 1.5 GB or with 2 GB (not 2.5 GB because the 945 GSE chip set is not capable of addressing more than 2 GB of total memory). The Intel Atom itself supports up to 4 GB, which is why nettops with the NVIDIA Ion chip set such as the Acer Revo 3600 can handle up to 4 GB of RAM. The memory upgrade went very smoothly, especially the netbook. The Acer Aspire M5201 (AMD 780G chip set) now shows 3.75 GB of RAM in Windows while the Lenovo shows 1.99 GB.

Encouraged by that I removed the 1.5 GB of DDR DIMMs from my 2005-vintage eMachines T6212 and transplanted the 3 GB of DDR DIMMs (1 GB x 2 and 512 MB x 2) from the dead Gateway GT4014j to it. DDR memory was superseded by DDR2 3 years ago, but now that old machine that originally came with 512 MB shows 2.75 GB of memory in Windows.

If you’re not sure what memory is right for your machine or how much memory you can fit, Crucial have a convenient Memory Finder application that will figure it out for you.

IPv6 with DD-WRT router and Hurricane Electric

Last weekend I got IPv6 working on my US$60 router, allowing all my machines here to talk IPv6 to the outside world. That includes an Ubuntu Linux server, 4 PCs and one Mac.

The biggest incentive for upgrading to IPv6 is the fact that at the current pace we’ll run out of (IPv4) IP addresses in about two years. These are the unique host addresses (usually written in dotted decimal format like that identify client and server computers on the Internet. The newer IPv6 standard that replaces 32-bit addresses with 128-bit addresses will forever take care of this shortage. It will also do away with the primary need for Network Address Translation (NAT) which has been a big headache for voice over IP (VoIP) and other peer to peer applications.

However, over a decade after the introduction of the newer standard (in 1997), uptake is still slow. Many ISPs still don’t support IPv6 and neither does a lot of the equipment used at homes and offices. This is gradually starting to change. IPv6 is an integral part of modern operating systems such as Linux, Mac OS X, Windows 7, Windows 2008 Server, Windows Vista, Windows 2003 Server and Windows XP (where it’s optional).

If your ISP does not support IPv6, you can still use it by employing the services of a tunnel broker, which gives you IPv6 connectivity over an IPv4 tunnel. This lets you test your software with the new APIs, though you won’t gain native IPv6 performance. If you have a static IP you can use by Hurricane Electric, Inc. Their service is professionally run and free. Another option is SixXS, but I have not tried them.

My router is a Buffalo WHR-HP-G54, which is compatible with the Linux based open source DD-WRT firmware. Recent versions of DD-WRT have IPv6 support. My first attempt with the v24 sp1 std build which is supposed to include IPv6 was unsuccessful, but I had more luck after trying the v24 10070 crushedhat version (dd-wrt.v24-10070_crushedhat_4MB.bin). Here’s what you do:

  • The following instructions assume that your WHR-HP-G54 router is running open source DD-WRT firmware. If your router is still running the default firmware, install DD-WRT v24 sp1 mini generic (SVN build 10020, 27-July-2008) on it. See my blog post on the WHR-HP-G54 with DD-WRT for detailed instructions. The WHR-HP-G54DD is a version of this router that comes with DD-WRT preinstalled.
  • Go to Security / Firewall on your DD-WRT and remove the check mark on Block anonymous WAN requests (ping) so that Hurricane Electric can verify your router exists by pinging it.
  • Go to and sign up for an account. Then log in and go to Create a Regular tunnel. You’ll need to enter your static IP, which will be conveniently displayed. You have a choice of tunnel endpoints. Pick one that has a short ping time from where you are. Make a note of all the details of the tunnel that is created. You will need to enter some of these details on your router, in particular these:
    • Server IPv4 address
    • Server IPv6 address
    • Routed /64
  • Read crushedhat’s description of how to configure the router with his firmware, which should work with most Broadcom-based DD-WRT-compatible routers.
  • I’m assuming you have updated the firmware of your router before and know the usual caveats about “bricking” your router if anything goes wrong. I won’t be responsible for that. 😉 I went from the factory Buffalo firmware to v24 sp1 mini to v24 sp1 std to v24 sp1 mini to v24 crushedhat 10070, with no problems, but your mileage may vary. I downgraded from v24 sp1 std (4 MB) to v24 sp1 mini (2 MB) “just in case” before flashing crushedhat’s std (4 MB) build. I did not opt to reset the NVRAM to factory defaults.
  • Download a copy of the v24 crushedhat 10070 build and save it on your hard disk. Use a computer with a wired connection to the router, not WLAN for the firmware upgrade. Go to Administration / Firmware Upgrade and select the dd-wrt.v24-10070_crushedhat_4MB.bin file. Click the upgrade button. Don’t touch anything until after the router has reset and is running the new firmware.
  • Go to Administration / Management and check Enable for IPv6 and Radvd enabled. Then paste the following into the Radvd config box:

    interface br0
    AdvSendAdvert on;
    prefix 2001:470:YYYY:YY::/64
    AdvOnLink on;
    AdvAutonomous on;

    where 2001:470:YYYY:YY::/64 matches the value of “Routed /64” in the created tunnel given to you by

    Server IPv4 address:
    Server IPv6 address: 2001:470:XXXX:XX::1/64
    Client IPv4 address:
    Client IPv6 address: 2001:470:YYYY:YY::2/64
    Routed /48: 2001:470:ZZZZ::/48
    Routed /64: 2001:470:YYYY:YY::/64

  • Go to Administration / Commands and enter these commands, then click Save Startup:

    ip tunnel add he-ipv6 mode sit remote ttl 64
    ip link set he-ipv6 up
    ip addr add 2001:470:XXXX:XX::2/64 dev he-ipv6
    ip route add ::/0 dev he-ipv6
    ip addr add 2001:470:YYYY:YY:200:00ff:fe00:0000/64 dev br0

    Replace with Server IPv4 address from your tunnel settings, 2001:470:XXXX:XX:: with the Server IPv6 address value and 2001:470:YYYY:YY:: with the Routed /64 value.

  • Go to Administration / Commands and enter these commands, then click Save Firewall:

    insmod ip6t_REJECT
    ip6tables -F
    ip6tables -A FORWARD -p tcp -i he-ipv6 –syn -m multiport –dports ftp-data,ftp,ssh,smtp,http,https,ntp,domain -j ACCEPT
    ip6tables -A FORWARD -p tcp -i he-ipv6 –syn -j REJECT –reject-with adm-prohibited
    ip6tables -A FORWARD -p udp -i he-ipv6 -m multiport –dports ntp,domain -j ACCEPT
    ip6tables -A FORWARD -p udp -i he-ipv6 -j REJECT –reject-with adm-prohibited

  • Now it’s time to check if everything works. It may take a few minutes or one reboot for your client to obtain an IPv6 address. Here is what things should look like after that:


    Windows IP Configuration

    Ethernet adapter Motherboard Network Connection:

    Connection-specific DNS Suffix . :
    IP Address. . . . . . . . . . . . :
    Subnet Mask . . . . . . . . . . . :
    IP Address. . . . . . . . . . . . : 2001:470:YYYY:YY:290:feff:fe66:e237
    IP Address. . . . . . . . . . . . : fe80::290:feff:fe66:e237%6
    Default Gateway . . . . . . . . . :

    Tunnel adapter Teredo Tunneling Pseudo-Interface:

    Connection-specific DNS Suffix . :
    IP Address. . . . . . . . . . . . : fe80::ffff:ffff:fffd%5
    Default Gateway . . . . . . . . . :

    Tunnel adapter Automatic Tunneling Pseudo-Interface:

    Connection-specific DNS Suffix . :
    IP Address. . . . . . . . . . . . : fe80::5efe:
    Default Gateway . . . . . . . . . :

    You can ping Google’s IPv6 servers:


    Pinging [2001:4860:c004::68] from 2001:470:YYYY:YY:290:feff:fe66:e237 with 32 bytes of data:

    Reply from 2001:4860:c004::68: time=307ms
    Reply from 2001:4860:c004::68: time=307ms
    Reply from 2001:4860:c004::68: time=331ms
    Reply from 2001:4860:c004::68: time=318ms

    Ping statistics for 2001:4860:c004::68:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
    Minimum = 307ms, Maximum = 331ms, Average = 315ms

    Fire up FireFox 3 or the browser of your choice and go to – if the image of the turtle is dancing then you have IPv6 working. Go to to see your IPv6 address.

Good luck! 🙂

Windows 7 versus Linux on netbooks

“Does Linux stand a chance now that Windows 7 will run on netbooks?”, Shane O’Neill asks in an article in ComputerWorld on 15 January 2009 that overall sounds fairly optimistic on Microsoft’s prospects. However it largely avoids one crucial subject that matters for Microsoft in the struggle over market share in the booming nettop market: Money.

In 1985 Jack Tramiel, head of Atari Corporation came to visit Digital Research Inc. (DRI) to license its GEM graphical desktop environment for the new Atari 520ST. It was going to be a low-cost machine based on the same Motoroloa 68K CPU as Apple’s much more expensive Macintosh, which itself was a low-cost derivative of the Apple Lisa (that was long before Microsoft Windows became a viable product). Tramiel had a reputation as a fierce negotiator, so his counterpart at DRI, then the main competitor of Microsoft and Apple, was only half joking when he said to Tramiel: “Jack, I know you’ll probably start off by offering us a dollar per copy.” – “No,” replied Tramiel dryly. “50 cents.”

Tramiel knew that by coming out with a fully-functional product at rock-bottom prices he could grow the PC market. In the segment he envisaged there simply was no margin for a $50 operating system license. What was true when an Atari machine cost around $1000 is even more true today with $250-$450 netbooks, and future netbooks will be even cheaper than that. Soon we will also see netbooks based on the same low-power, low-cost ARM processors that power virtually all mobile phones.

Commentators cited by Computerworld on Windows 7 don’t really talk about money:

Analyst Rob Enderle, president of technology research firm The Enderle Group, agrees that Microsoft doesn’t see Linux as much of a threat and that refocusing on the netbook market is more about “Microsoft addressing the problem of having to keep shipping Windows XP long after its expiration date.”

Enderle says that getting XP on netbooks was clearly a response to Linux gaining traction, but that Microsoft is not afraid of consumers or OEMs having a preference for Linux.

“The problem was that Linux could run on a netbook and Vista couldn’t, not any consumer or OEM love for Linux,” he adds.

But Microsoft’s real problem wasn’t just that Vista was too big to fit on a 4 GB flash drive and too slow and bulky to run on an Intel Atom with 512 MB of RAM. It was also too expensive. So Microsoft could save face by charging next to nothing for its 5 year old Windows XP, but it didn’t make any real money on it. So what’s going to happen when Windows Vista 1.1 aka Windows 7 hits the streets in volume maybe a year from now?

Does it really matter to Microsoft shareholders and employees if the 21 million or so netbooks expected to be sold this year (and the even bigger numbers in 2010) will be running some version of Windows or a version of Linux (which is free), if previously those buyers would have picked up a more powerful machine that netted Microsoft $40-$100 per license?

Whether Windows 7 will run with decent performance on low-cost machines is really only half the question. The other is, how much Asus, Acer and the other netbook OEMs will offer to pay Steve Ballmer of Microsoft. Is it going to be $1 or 50c per copy? That is no way to sustain a business with a market capitalization of $150 billion and almost 90,000 employees worldwide (Jan 2009 numbers), as Microsoft is realizing to its horror.

Linux Eee Box now available, MS giving away XP?

Two months ago I commented on the non-availability of either of the two Linux versions of the Asus Eee Box 202 that had been announced months ago along with its XP-equipped sibling, which has been shipping for two months already.

It appears you can now also get Linux versions of this tiny energy saving desktop machine, but the pricing is most curious. Originally Asus announced an 80 GB Linux version for $269, $30 less than the similarly equipped XP version. This would presumably pay for the Windows XP license fee that Microsoft collects from every Windows OEM. Linux, which is free software licensed under GPL, comes without any such fees.

However, the actual pricing is now quite different. For example, sells the 1 GB RAM / 80 GB hard disk Windows XP Home version (in black) for $298 while the 1 GB RAM / 160 GB hard disk Linux version (in black) is available for $321 (prices may vary by the time you read this). The picture is similar at, which offers the 1 GB RAM / 80 GB hard Windows XP Home version for $299 and the 1 GB RAM / 160 GB hard disk Linux version for $319. That’s $20-$23 more for a bigger hard disk, but a cheaper operating system. Retail prices of the 80 and 160 GB Seagate Momentus 5400 RPM SATA drives used in the two versions differ by only $10 (about $50 vs. $60, at

Adjusting for the hard drive cost, the Windows version is now $10 cheaper instead of $30 more expensive than the Linux version, money which we can assume came out of Microsoft’s revised OEM pricing. Asus is making at least $10 more per machine that ships with Linux than with Windows, even if Microsoft was giving away XP for free to Asus, which is probably not far from the truth.

Let’s put it this way: At this stage, Microsoft must have been pretty desperate to keep Linux off as many high volume, low end machines as possible. It had made a blunder by heavily betting on the success of Vista, which requires fairly high end hardware, but the market decided otherwise. To its surprize it found that customers wanted to stick with less resource-hungry XP. Then the boom in low end machines triggered by the One Laptop per Child initiative and the Asus Eee PC took Microsoft completely by surprize.

You see, Microsoft makes money on Windows by licensing it to OEMs like HP and Dell. In a mature market where almost everyone already owns a PC these OEMs were supposed to be able to sell more machines (and bundled Windows licenses) only if a new Windows version made the old machines obsolete. The actual needs of users played almost no role in this.

Microsoft had bet on selling ever more powerful machines, thinking that if old machines were not powerful enough to run Vista, owners of XP machines would dump their hardware and buy new machines from Microsoft’s OEM customers. Instead both retail and corporate customers revolted, as Vista offered them few real benefits but a number of potential problems. Instead of triggering a rush to Vista, Microsoft motivated customers to look at other alternatives such as Mac OS X, Ubuntu and other Unix or Linux flavours or simply to sit it out and stick with XP as long as possible.

This of course is a mortal threat to Microsoft’s business. Once millions of customers get used to no longer owning the latest and greatest Windows software or even start surfing the net, doing email, watching YouTube and running OpenOffice on non-Windows machines, where is that going to leave Microsoft in 2010, when Windows 7 and perhaps Office 2010 come out?

Right now Microsoft’s business model is still generating large cash flows from selling operating systems and application software to OEMs and retail customers. This is the classic model the microcomputer software industry has used since the 1970s, even before “microcomputers” where renamed to personal computers (yes, I was around then). It’s not how the mainframe business operated before and it’s not how new Internet businesses work now.

Witness successful companies such as Google and eBay, which are making money by acting as go-betweens between buyers and sellers (ads in the case of Google, merchandise in the case of eBay). Canonical and other Linux companies get their revenue from support contracts while giving away the software. Many new business models rely on advertising or shared sales revenue. Google makes billions of dollars and has hundreds of millions of daily users without in most cases selling directly to the people who use its services. The world as Microsoft knew it is changing and it will have to change with it. That will be extremely painful for them.

Microsoft is well aware of the need to move to a new net-centric business model. For evidence look no further than its recent desperate attempt to acquire Yahoo’s user base by buying out the whole company, after having spent years and pouring billions of dollars into largely unsuccessful efforts to match Yahoo with its own MSN/Hotmail/OfficeLive offerings. The problem is, Yahoo is only up for sale because it has not managed to compete terribly well against Google either. If Microsoft and Yahoo merge, it will be a case of the blind leading the blind.

Without a working alternative, Microsoft is finding it very difficult to move away from its classic business model, which depends on its ability to get customers to buy new copies of Windows and Office every couple of years at fairly hefty prices, whether users are keen on these new versions or not.

Microsoft is going to find this ever more challenging as new low-cost mobile devices come along, especially in the sub-$500 bracket. These new gadgets will bridge the gap between mobile phones, consumer devices and PCs, offering adequate performance and convenience at low prices. Think about it: How many people are still going to pay $499.95 for a copy of Microsoft Office Professional 2007 when the mini notebook or nettop they will be running it on only cost $300-$400? That pricing model only worked while Microsoft had a de-facto monopoly on desktop operating systems and office suite applications and especially when hardware was still expensive.

Microsoft’s pricing is really a relic of the 1980s, when a 6 MHz PC AT with half a MB of RAM and a 20 MB hard drive cost as much as $6,700. Then it still made sense to spend an extra 10-30% of that amount on software to make the machine useful, but today’s numbers look very different.

The recent announcement by Canonical to port Ubuntu to ARM-based low-power devices further illustrate the danger for Microsoft from the market moving to a low-cost, low-power, net-centric model. Most mobile phones use ARM-based chipsets. So do many consumer broadband routers. It’s the de-facto standard in those markets. Both the Apple iPhone and the Google Android-based G1 run variants of Unix or Linux on ARM CPUs. So do many $50-$150 broadband routers. Meanwhile Intel is working on integrating its Atom CPU core with the graphics chip in its upcoming “Pineview” chips, going head to head with ARM for low-cost “PC on a chip” designs. Competition in this segment will result in a plethora of interesting products available to consumers.

While there will always be a demand for high end PCs for gaming (where Microsoft competes with Sony’s PlayStation and other dedicated games machines), the low end mobile market will be the real growth market, especially in emerging markets such as Asia, Africa and Latin America.

What Microsoft is effectively doing in the netbook / nettop market today is giving away Windows XP just to keep a foot in the door for a remote chance of profits a few years from now. That’s only about as smart as selling mortgages to people who can’t really afford to buy a house. Sure, you get customers that way to keep the market growing, but what is going to happen a year or two later? As the sub-prime mortgage crisis has taught us, you can’t fudge revenue numbers forever. In the short term, giving away Windows may prop up market share numbers, but the result is no more than window dressing. The Vista debacle seriously damaged Microsoft’s value as a brand amongst consumers. Don’t count on their brand loyalty too much. Microsoft has lost its ability to steer the market that it used to control, just as big old IBM did before it.

Microsoft’s Windows and Office sales are the equivalent of a subprime crisis waiting to happen. Microsoft’s revenue model is being hollowed out. The software giant is now too big to quickly move to a model that will still fit the market a few years down the road.

When the big crunch comes, expect things to get nasty. Microsoft employs 4 1/2 times more people than Google which already makes more money than Microsoft does. This ratio is not going to stay that way.

UPDATE (2008-11-20):

I mentioned that the XP version went from initially being $30 more expensive to $10 cheaper than the Linux version and credited this to Microsoft deciding to essentially give XP away in order to hang on to market share.

A review of the Dell Inspiron mini 9 sub-notebook mentions that Dell charges $40 extra for XP compared to the Linux version. That’s exactly the margin by which the price of the Eee Box XP version dropped relative to its Linux sibling between the announcement and the start of shipments, so it would back up my reasoning.

Ubuntu on a VIA MM3500 – 2 Terabyte NAS RAID1 server for $350

Sometimes raw power is the enemy of efficiency. For example, many car buyers opt for powerful engines for their cars, only to get disappointing fuel economy around town, where that power is not needed. A smaller engine that might have to work harder when pushed but runs much closer to peak efficiency in everyday driving would be more suitable. Likewise, many computer buyers get machines with high end CPUs that when doing mundane tasks such as email and web browsing spend more then 90% of their time idle, but still burning 90 to 200 Watts. A less powerful CPU might get the same job done drawing less than 50 Watts. This easily adds up to hundreds of kilowatt hours (kWh) wasted during the computer’s lifespan.

Yes, sometimes less is more. I took this philosophy to heart when I bought a Toyota Prius, which has only a modest 1.5 litre engine, drawing on electric motors and a battery for peak loads. I also recently purchased a sub-$70 motherboard with a 1.5 GHz VIA CPU that typical desktop CPUs will run circles around when running under full load, but at a cost in electricity and money. This board will take over the workload of multiple, more energy-hungry machines that have been sitting mostly idle doing what they’re doing every day. It’s powerful enough and economical, drawing a maximum of about 20W. Typical desktop chips have a maximum power draw of 45 W, 65W or more.

MM3500 - VIA C7-D 1.5GHz, CN896 + VT8237A

(Click here to see a full set of pictures of the upgrade)

Five months ago the largest and most important hard disk on my LAN died after only 15 months. Even though I could still rescue the most crucial data off it before the drive finally went offline forever, it was a very close shave and I lost some data. I realized I needed to move my data to a RAID, a “Redundant Array of Inexpensive Drives”. It’s a system in which data is transparently written to multiple drives for reliability. If any one drive dies you can still read your data and recover gracefully from the failure after swapping the dead drive for a replacement drive. This is relatively easy to do in Linux, in fact the server that hosts this website uses RAID too.

Last weekend I set up a machine for about $350 in total as a network attached storage server (NAS) under Linux with adequate processing power for other tasks. I equipped it with 2 GB of RAM and twin 1 TB mirrored hard disk drives. The main expense were the two drives (WD10EADS “GreenPower”, 5400 rpm, $110 each), whose cost made up about 2/3 of the total investment. The other parts were the Micro-ATX VIA MM3500 motherboard ($70), two 1 GB DDR2 PC5300 memory modules ($25 each), SATA cables (one comes with the motherboard) and Molex to SATA power adapter cables, as my older ATX SFX power supply (PSU) did not have the right connectors yet. Also, the motherboard uses a 24-pin power connector while the PSU only had a 20-pin plug, but the four extra pins are not required for this board and the plug is keyed to only fit in the proper place.

The case that was to house these components used to be an eMachine 366i, a cheap minitower I had bought in 1999 for about $450 and which had served me well for many years. I once had to replace the power supply for $25 with a FSP180-50NIV-H (dead PSUs are the most common problem in eMachines) and otherwise only upgraded the hard disks, the last one being a 60 GB IBM DeskStar that failed in 2007. By now the 366i’s Celeron 366 MHz CPU was slow, it’s 256 MB (the maximum supported by the board) inadequate for modern operating systems and it neither supported SATA drives nor any drives greater than 128 GB. It also didn’t have any USB2 ports. Still, the replacement power supply was relatively recent and the case big enough for this project.

Since the RAID drives had to be online 24/7 for my spam processing I was looking for a motherboard that used as little power as possible while being adequate for running the file server and spam filter. After considering various Intel and AMD desktop boards (including the Intel Atom processor 230 Intel 945GC Mini ITX desktop board) I finally came across the VIA MM3500. As mentioned above, this board includes a VIA C7-D CPU running at 1.5 GHz.

While that VIA CPU is even slower than an Intel Atom (which is not exactly known for its speed) its price of under 7000 Japanese yen (less than US$70) was attractive and both the CPU and the chipset draw little power. While the CPU on the Intel Atom board only sips power, its chipset is fairly inefficient (which is why the cooling fan sits on the Northbridge heatsink, not the passively cooled Atom heatsink). Like the Atom board the MM3500 has two SATA ports, enough for handling RAID1. 8 USB2 ports provide plenty of expansion capabilities, as does a PCI-E slot for video cards (not available on the Atom). Two DDR2 slots will accept up to 4 GB of RAM, twice the limit of the Atom board which only has one slot and can only reach its maximum of 2 GB by using a 2 GB SIMM. Both boards offer one PCI slot.

The main complication with the VIA board turned out to be video driver support for the onboard graphics (CN986 Northbridge / Chrome9 HC IGP). As soon as Ubuntu switches into graphics mode, the screen becomes unreadable. I got around this only by plugging an old Jaton Video-198PCI-64 Twin video card into the PCI slot (any Ubuntu-supported PCI or PCI-E card will do). I am hoping to find a proper work-around to be able to remove this card again and minimize power usage [done, see UPDATE below!]. I could do away with it by running the server only in text mode (with ssh access) and never using its GUI. That wouldn’t matter for a file server.

I first tried installing Ubuntu 8.04 LTS (desktop edition), but after the video problems I switched to a torrent of the Ubuntu 8.10 beta. Ubuntu 8.10 (Intrepid Ibex) is due for release on October 30, 2008. The 8.10 beta includes a fix for booting off a RAID1 system with one dead drive, which I may need in the future. 8.04 doesn’t handle this yet.

After installing the PCI video card, the operating system installation (including configuring the two mirrored drives as RAID1 following these very helpful instructions) went very smoothly.

It is a pity VIA doesn’t provide better video driver support for up-to-date Linux versions, otherwise this would be a nice little board that I would find easy to recommend to people who want to build a low-power usage system on a small budget.

UPDATE (2008-10-14):

I now have the motherboard video working in VESA mode and it’s very usable.

Following some pointers in various forums, I tried adding the xforcevesa option to the kernel loader line in /boot/grub/menu.lst, but that didn’t seem to have any effect in Ubuntu 8.10 beta (Intrepid Ibex).

Then I renamed /etc/X11/xorg.conf to a backup and copied xorg.conf.failsafe to xorg.conf (in folder /etc/X11/). I shut down the machine, connected the monitor cable to the motherboard VGA and removed the add-on VGA from the PCI slot. When I powered up the machine again, it booted fine. I get a 1280×1024 screen, the maximum for the Dell 1905FP monitor I used.

I am still hoping that the Ubuntu developers will manage to get an updated Chrome9 HC IGP driver into the upcoming release, but for now I have a workable solution and am happy with this setup.

UPDATE (2008-11-10):

I got rid of the VESA driver and am using the default OpenChrome driver for the motherboard video after specifying two options to disable features on the driver that cause problems in the current build:

Section “Device”
Identifier “Configured Video Device”
# Driver “vesa”
Option “XaaNoImageWriteRect”
Option “SWCursor” “True”

Also, a couple of days ago VIA uploaded a beta test version of their driver for Ubuntu 8.10 to their Linux support site (a month after 8.10 was released), but I haven’t tested it yet.

Eee Box B202 – What happened to Linux?

When ASUS announced its Eee Box B202 back in May, there were going to be three models:

  • the base model running Linux version with 1 GB of RAM and a 80 GB hard disk for $269,
  • a Windows XP Home version with the same 1 GB of RAM and 80 GB of disk for $299 and
  • a Linux version with 2 GB of RAM and 160 GB of disk for $299

Four months later only one of these three versions is available and it’s neither the cheapest nor the best equipped of the three anounced configurations: Only the Windows version hit the stores, at $50 more than previously announced (it’s around $350).

Meanwhile the Linux versions are nowhere to be be found, though rumour has it that they will become available later this year.

Considering that ASUS shipped it trailblazing Eee PC notebook with Linux first, before following it with a Windows version, this turn of events with their desktop is somewhat surprizing. Low prices are a major reason why their machines are attractive, but every Windows machine shipped means royalty payments to Microsoft, which is why the XP version was going to be $30 more expensive than the base model (Linux is royalty-free). By opting for only shipping XP, ASUS is also preventing its customers from buying a 160 GB version, as Microsoft refuses to let OEMs ship XP with machines with more than 80 GB of disk space.

To get a 160 GB Eee Box with 2 GB of RAM and Linux (the configuration I was interested in) you would have to buy an 80 GB model with 1 GB of RAM and XP, only to discard the 80 GB drive, the 1 GB SIMM and Windows XP (which you’ve all paid for) and then install a separately purchased 160 GB drive and 2 GB SIMM and a (free) copy of Linux.

When the Eee PC was launched, I was very excited by the prospect of low-energy, low cost computing, but wanted to wait for the desktop as I would use them mostly as unattended servers and had no need for an LCD screen. Like many other potential ASUS customers, I will keep on waiting now.

I currently use a set of four machines to process external spam feeds for the SURBL Multi JP blacklist. Since these machines are on 24 hours a day, seven days a week I would like to minimize power usage and Intel’s Atom processors with a TDP of less than 5W sounded like a very attractive upgrade path for me. I use some older machines with sub-1 GHz clock speeds that draw relatively little power, but these old motherboards have some drawbacks. First of all they are limited to a maximum of between 256 and 512 MB of RAM, while Atom boards support up to 2 GB. Secondly, their motherboards are 7 to 10 years old and they won’t work forever.

I had a look at Intel’s Atom 230-based Mini-ITX desktop board, which can be found for under $70 and fits existing ATX-based machines like my ancient eMachine eTowers. At first glance that looked attractive. However, even though the CPU is efficient, the Northbridge support chip of the Intel 945GC Express Chipset on that board burns about five times more power than the Atom CPU itself. The Eee Box sounds like a much better choice in the long term, as it uses an Atom 270 with the much more efficient Mobile Intel 945GSE Express Chipset. The catch is, you can’t currently buy an Eee Box without paying the “Microsoft tax”, i.e. a Windows XP license that you pay for whether you have a use for it or not.

The decision by ASUS to push back on the Linux version makes no sense to me. I suspect Microsoft made ASUS an offer they found hard to refuse, in order to establish the Eee Box as a Windows-only machine. It will cost ASUS sales and it won’t make Microsoft any more popular. It’s not good for the planet either if people buy power-hungry desktop hardware instead of one of the more economical computers available.