UDF, the new lingua franca of filesystems?

Not too long ago, when creating a filesystem on a removable storage device, or on a hard disk shared between several different operating systems, the natural choice was FAT32. FAT32 is reasonably well supported on all major OSes, however its limitations (eg. 4G maximum file size) make it unsuitable for large media.

So what is an adequate replacement for FAT32? NTFS support in Linux has improved a lot in the last years. Unfortunately, it is based on reverse engineering instead of public specifications. Due to its proprietary nature, the NTFS specification can change without notice, possibly leading to data loss/corruption when accessed with unprepared tools.

Enter UDF, which was developed for removable optical media, has no silly limitations and can be read and written to by current versions of Linux, Windows and Mac OS X. One minor issue is that the UDF specification does not allow placing it inside a partition, it must always occupy a whole disk. But no ill effects are expected from ignoring this.

Now in Linux create a partition of type 0x7 (IFS), run mkudffs, and boot into Windows. Whoops, no filesystem recognized. Ok then, run format /fs:udf then boot into Linux again. Whoops, UDF-fs says "No partition found". Experiment with different UDF revisions, no luck. Examine more closely, find out that the Linux UDF driver defaults to a block size of 2048 bytes, while Windows format uses 512 byte blocks. Mount with mount -o bs=512 and it works! Well, almost.

Copy a small file on the partition and it is recognized by the other OS. Copy a 6G file with Linux, and Windows doesn't see it. What is going on here?


Nigeria dumps Linux, or: Mandriva in bed with the wrong people

It's all over the news, Mandriva closes a deal to deliver thousands of laptops to schoolchildren in Nigeria with Mandriva Linux preinstalled. Then suddenly the customer decides to replace Linux with Windows. Mandriva CFO cries "foul" and the usual frenzy ensues.

A sad day for Mandriva? Certainly. A sad day for education in developing countries? Not particularly. For their project, Mandriva chose the Classmate PC, a laptop project which was envisioned by Intel after the latter missed out on the OLPC educational project and had to hack together something cheap. The folks at OLPC however realized from the very beginning that selling stripped-down ordinary computers below cost would bring them nowhere.

Now the whining is all about how hard it was to coordinate everything, how much work went into it, and so on. But they chose an inferior and unsustainable platform. The OLPC's visionary design required a clean software design to complement it, something Microsoft has had a hard time to achieve. Making the Classmate PC run Windows doesn't cost Microsoft a thing, so it's hardly surprising that they opted for piggybacking into Nigerian classrooms.

I hope Mandriva have learned their lesson and stop being bad losers. They have interesting products in the pipeline. Had their laptop been based on the same CPU as their upcoming Loongson Box, they wouldn't be in that position now.


How to recover dial-in passwords from broadband/dsl/cable routers

Ever got into the situation where you need the dial-in password for your ISP and you either lost or forgot it? And it won't be shown in the router's configuration interface or you lost that password as well? And the router configuration is obfuscated when saved into a file? Well, here comes the solution (at least if you run Linux):
  1. Install rp-pppoe (emerge rp-pppoe on Gentoo, apt-get install pppoe on Debian or the equivalent command on your distro)
  2. Create the file /etc/ppp/pppoe-server-options containing the following lines:
  3. Add the following line to /etc/ppp/pap-secrets
    "your ISP login name" * "some bogus password"
  4. Connect the router's uplink port to your computer's network interface and run the following command as root (assuming eth0 is the name of your interface):
    # pppoe-server -I eth0 -F
  5. Now the server should tell you that it's waiting for incoming connections. Trigger a dial-in on your router. When that happens, the password will be printed to the system log in plain text.
Obviously, if your router has an integrated cable/DSL modem, it needs to be disabled first. If the PPTP protocol is used for dial-up, install PoPToP instead of rp-pppoe (adjust the name of the configuration file and the startup command accordingly).


Frst OpenMoko Phone Goes on Sale

The Neo1973 is now available at the OpenMoko website. It is the first totally open and documented phone. I was planning to get one, but sadly the shipping costs are prohibitive. It is a good thing that this phone can be ordered worldwide, but depending on where you live, you pay up to 50% extra. FIC has so many offices world-wide, a shame they did not have more concern for the development community outside the US.

So I'll wait for the next revision, announced for October, which hopefully will be distributed from Europe as well.