Category Archiverants
apple & rants Ralf on 21 Jan 2008
Safari hangs / locked PubSub sqlite3 database
I just spent 15 minutes of my limited life chasing a frigging Safari bug. Apparently on my last logout, Safari didn’t close the PubSub [that’s Apple’s framework for dealing with RSS feeds] sqlite3 database properly. This led to a hang upon the next startup, and every subsequent startup. After a little bit of fun with gdb and lsof, I figured out that it was lock that was held on the PubSub database (located in ~/Library/PubSub/Database). I simply moved that heap of bitrot away and everything is dandy again. As expected, Safari recreated it.
apple & rants Ralf on 30 Oct 2007
Converting FileVault images for OS X 10.5.
Just upgraded to Leopard doing a clean reinstall. Before I copied my sparseimage FileVault container (/Users/$USER/$USER.sparseimage) to an external USB drive, after the reinstall I copied it back. Then I remembered that FileVault in OS X 10.5 uses a new format (as reported in FileVault doesn’t use Sparse-Images anymore) and thought better of it. The new format apparently splits the image into 8MB big chunks, called bands which should make deallocation of free space much easier.
After a look into the man page of hdiutil(1) I had located the name for the new SPARSEBUNDLE format and converted the container into the new format using the following command:
hdiutil convert /mnt/$USER.sparseimage -encryption CEncryptedEncoding -format UDSB -o /Users/$USER/$USER.sparsebundle
Note well: your data no longer is accessible with the system-wide FileVault recovery certificate/private key. If this feature is of importance to you (it is to me, in the opposite way: I’m glad that the recovery key now is invalid), look into the -recover and -certificate options of hdiutil(1).
Upon the next login I realized that my UID had changed, meaning I could no longer access the data contained in the FileVault. Argh! Turns out that there’s no more messing around with niutil(1) under Leopard. NetInfo is gone, replaced by Directory Services. The command line utility for Directory Services is surprisingly pleasant: As simple as 1,2,3, I changed my uid…
dscl -change . /Users/$USER UniqueID
rants Ralf on 30 Aug 2006
ACPI problems with Acer laptops caused by a BIOS logic bomb?
The brand new Acer Core Duo laptop of a co-worker of mine refused to wake up from hibernation this morning. After rebooting, his Windows installation refused to boot up due to his computer allegedly missing ACPI support. His machine being a Windows box, this caused nothing more than a smirk and childish sniggering noises from my side when he told me. Interesed I got when he came back after having re-installed with the same media on a blank new hard drive and the same error reappeared. My colleague threw a Knoppix CD at him and off he went again. Later, eating Pizza at lunch I asked him to show me the output of dmesg. Now my eyebrows really curled: The Linux ACPI layer was complaining about a corrupt checksum on his ACPI tables! The real kicker however came when he called the Acer support hotline: “Yeah yeah”, the guy on the phone said. “Simply set the time ahead by a day and it’ll work again”. And indeed it did. Now, the thing I’m wondering about: Why on earth would some part of the BIOS initialization such as the decompression of the ACPI tables from the ROM chip where the BIOS is contained into RAM depend on the time of day??? Some disgruntled employee that decided to plant a logic bomb in the BIOS code that goes of on August, 30th 2006? Apparently Acer got caught by surprise as well since my co-worker was told that “[they] are in the process of [cobbling together] a firmware update for the issue”.
apple & linux & rants Ralf on 24 Feb 2006
Gentoo Linux on the iMac Core Duo
So I’ve been running Gentoo on my shiny new iMac Core Duo the last two days and I already have several issues biting me.
The ATI Radeon X1600 is completely unsupported under Linux right now, which means you need to run your X11 using fbdev and the framebuffer hack the xbox-linux.org guys have come up with. Even the current proprietary ATI drivers (from the manufacturer itself, for chrissakes!) do not support Radeons with a R500/R600 chipset. This sucks. Hard. fbdev is working, but it’s slow. Also, I the scroll-ball of the Mighty Mouse does not trigger any events in xev at all, which means you have a regular 3-button mouse without scrolling functionality. I reckon Apple is using its own protocol here.
Another major pain is the Broadcom BCM4310. Neither can I find appropriate Windows drivers for the PCI device 14e4:4312 to be run under ndiswrapper, nor have my attempts at getting the free bcm43xx drivers to work with this chipset been successful. All I’ve been able to extract after some quick-and-dirty patching of the driver was to find out that the BCM4310 seems to be using 4 cores, all of which have Core IDs and revisions that are currently not known to the bcm43xx driver. This was after several OOPSen and reboots. Sigh. Gotta contact the mailing list, I guess.
The infrared receiver and the iSight are hanging of a USB bus. This means that the Linux Firewire iSight drivers need to be adapted as well. I haven’t toyed with the IR receiver yet, so I don’t know yet how hard it is to get that one working.
Oh, and yes. Everything else seems to be running fine. Even Windows XP in a VMware in full-screen mode (with both cores, whoot!)
Of course, some of you might argue that I’ve been lucky to get that much of Linux running on this machine at all. To this I counter that I bought this machine for exactly the purpose of being able to dual-boot x86 Linux and OSX and that I have great faith that we will get driver support for all of the components eventually.
Because all sites mention the installation on an external USB HDD: My installation is on a partition of the internal hard drive and dual-boots just with with OSX.
Update: I do have the Broadcom working with ndiswrapper now. Try the Broadcom 802.11a/b/g drivers supplied by Hewlett-Packard for the tc4200 tablet PC. They work just fine, even with WPA-PSK.
rants Ralf on 05 Jan 2006
(most) SQL Databases suck
One of the biggest gripes I had concerning WordPress when I looked into migrating to it from blosxom half a year ago was that it required me to use a MySQL database. Using a fully blow SQL database for maintaining a blog is just pure overkill in my opinion. Databases of course have their place, but c’mon… Using them to store a couple of posts and comments is using a sledge hammer to drive a nail into a 2mm thick piece of balsa wood.
This has now turned into a real problem. The database performance of my web hoster just isn’t up to par. For some reason the WordPress people seem to have ignored a patch allowing for database abstraction; this would allow me to replace MySQL with SQLite. Hopefully it isn’t too hard to port this patch to WordPress 2.0…
apple & rants Ralf on 25 Dec 2005
OSX resolver idiocy
Being a frequent OpenVPN/TunnelBlick user these days, I want to change my DNS resolver configuration after having established a tunnel. Until very recently I was under the impression any decent Un*x-like OS has its resolver configuration in /etc/resolv.conf. Well, this doesn’t apply for OSX. The resolv.conf in /etc is only a read-only mirror of the resolver configuration; changes in this file will not be propagated back to the resolver. No, this setting needs to be manipulated in a “dynamic store maintainted by configd(8)” [AFP548: Using scutil to set DNS server]. Thank you very much, Apple.
UPDATE: The above apparently only applies to Tiger; the issue has been discussed in several other places before

