Booting GParted on MacBook Air 11" (late 2010)

I wanted to boot GParted-0.13.0-1 (kernel 3.2.0-3-486) from a USB stick on my MacBook Air 11" (late 2010) using the EFI bootloader which appears when holding down Option while turning on the laptop. However, only HFS+ partitions appear to be attached in a way that GRUB can see, but GParted's initrd cannot mount HFS+ (or even exFAT) partitions, saying hfsplus not found in modules.dep or exfat not found in modules.dep, respectively.

So I used Disk Utility to create a HFS+ as well as a FAT partition on the USB key and copied the contents of the GParted image into both partitions using

$ pax -rw

A possible optimisation would be to try and work out which files exactly are really required on each partition, but since GParted unly uses about 120MB space shouldn't be an issue even for small USB sticks.

Interestingly, whether the USB stick is partitioned using MBR or GPT doesn't make a difference.

After that, the MBA's EFI bootloader (hold down Option while turning on) shows two items called "EFI boot", the first of which should refer to the HFS+ partition. After booting, GParted's initrd then finds the required boot image on the FAT partition. GParted loads and runs successfully using default settings.

There was still another small hurdle before I could reset the SSD:

# hdparm -I /dev/sda
showed the SSD's Security state as frozen which disallows issuing the SECURITY_ERASE command. Googling revealed a trick to change the state to not frozen by putting the laptop to sleep and waking it up. Amazingly, simply issuing
# echo mem > /sys/power/state
and closing and pressing the shift key to wake it up worked perfectly. If you're working on a detachable disk, it also helps to only attach the disk once GParted has booted.

Note: I tried again using GParted 0.19.0-1 (kernel 3.14). I had to select "VGA" mode in the boot menu in order to make X start and waking up from sleep didn't work. So I used 0.13.0-1 instead.

Broken "DNS relay" in DLink DIR-615

In my student days, I owned a DLink DI-624+ router. It needed resetting at least once a day and even more often under heavy use. Not exactly the behaviour you look for in a router... After this experience I vowed never to waste time on DLink hardware again.

As it happens, I just got a DLink DIR-615 router with my new cable connection. It has a setting to turn the "DNS relay" function on or off. I left it turned on because it was the default and I've always configured my routers to act as DNS servers -- if only because it enable neat little tricks like accessing the router as "dlinkrouter" (which doesn't work over WiFi, by the way).

I then noticed that my IM client failed to connect to several of my Jabber accounts (also known as XMPP). As it happens, the SRV records for those accounts which are required to find the Jabber server for a given e-mail address were not returned by the DNS server. After some digging around (intended pun: dig srv _jabber._tcp.domain.com) it eventually dawned on me that the "DNS relay" in the DLink router was eating those SRV replies.

Needless to say, after turning off the relay "feature," my IM clients could happily connect to all accounts again.

I'm now replacing the DLink router with an AVM Fritz!Box I have lying around...

Edit (January 2015): salvation for the DLink router was found at DD-WRT.

The year I was born

  • 0103 Apple incorporated
  • 0104 Pilot of BBC's »The News Quiz« recorded
  • 0525 First Star Wars movie, »A New Hope«, released
  • 0526 »Stop«-Schild introduced in DDR
  • 1005 Inbetriebnahme U8 Osloer Str.
  • 1013 Landshut (Lufthansa flight 181)
  • 1216 Queen opens tube to Heathrow airport
  • Donald E. Knuth starts work on TeX (summer)
  • Lion's commentary on UNIX completed
  • Alfred V. Aho, Peter J. Weinberger, and Brian W. Kernighan release awk as part of AT&T UNIX V7
  • Commodore PET released
  • Planetarium Stuttgart opened
  • Death of Schleyer, Baader, Meinhof and Ensslin
  • Innisfree meteorite recovered in Canada
  • »Der Aufmacher« by Günter Wallraff published

And now Berlin

Places I've lived, in near-alphabetical order:

  1. Adelaide (10m)
  2. Bristol (10m)
  3. Blaustein (6y)
  4. Stuttgart
  5. Oxford (4y)
  6. Canberra (3m)

If anyone spots a pattern please let me know...

Leaving England

10 things I think I'll miss... in no particular order at all...

  1. Smoke-free pubs serving Real ale and nuts(!)
  2. Supermarkets with online delivery and automatic checkouts to avoid queues, and Post Office queues everywhere else
  3. Great Asian food from take-aways, restaurants and supermarkets
  4. Chocolate Fudge Cakes, Millionaire's Shortbread, Flapjacks, Banoffee Pies
  5. Breakfast rolls!
  6. Frozen croissants for home baking from Redland Village Bakery
  7. Trips to London
  8. Relaxed, casually dressed people
  9. 3's PAYG 3G that doesn't robinson all the time (like Tchibo's) or expire (like O2's)
  10. BBC iPlayer
  11. Scottish call centres (and waiting for things to go wrong just to hear the accent)

Food from Chinese Takeaways in Berlin is appalling, and I can't even find one that serves yellow bean sauce... nor can I find a greasy spoon to satisfy my breakfast cravings. :(

And the English countryside is amazing for cycling! The most beautiful little villages dotted everywhere and rolling hills with hedges and dry stone walls between them.

JavaScript debugging

In order to simplify JavaScript debugging, it's useful to have the following code in the [Visualizer] section of Common7\Packages\Debugger\autoexp.dat:

;------------------------------------------------------------------------------
;  JSString
;------------------------------------------------------------------------------
JSString{
 preview ( [$e.mChars,su] )
 stringview ( [$e.mChars,sub] )
 children
 (
  #if(!($e.mLength & JSString::DEPENDENT))
  (
   #(
    [actual members]: [$e,!] ,
    #array
    (
     expr: $e.mChars[$i],
     size: $e.mLength & JSString::LENGTH_MASK
    )
   )
  )
  #else
  (
   ; Dependent strings aren't done yet
   #(
    [actual members]: [$e,!],
    #array
    (
     expr: $e.mChars[$i],
     size: $e.mLength & JSString::LENGTH_MASK
    )
   )
  )
 )
}
;------------------------------------------------------------------------------
;  JSObject
;------------------------------------------------------------------------------
JSObject{
 preview (
  #(
   (void *)&$e,
   " [object ",
   [((JSClass *)($e.classword & ~3))->name,s],
   "]"
  )
 )
 children (
  #(
   #(#(#(
   [actual members]: [$e,!],
   #if ($e.fslots[0])
   (
    #(prototype : (JSObject *)($e.fslots[0] & ~7))
   )),
   #if ($e.fslots[1])
   (
    #(parent : (JSObject *)($e.fslots[1] & ~7))
   )),
   #if (((JSClass *)($e.classword & ~3))->flags & 1)
   (
    #(private : (void *)($e.fslots[2]))
   )),
   #(class : (JSClass *)($e.classword & ~3))
  )
 )
}

Late influential people

An intentionally incomplete list of influential people who died during my lifetime:

  • 19770816 Elvis Presley
  • 19780319 Gaston Julia
  • 19911124 Freddie Mercury
  • 19951218 Konrad Zuse
  • 19961120 Paul Erdős
  • 20010224 Claude Shannon
  • 20010511 Douglas Adams
  • 20010729 Wau Holland
  • 20031112 Johnny Cash
  • 20060707 Rudi Carrell
  • 20061230 Saddam Hussein
  • 20071029 Itojun
  • 20080305 Joseph Weizenbaum
  • 20080519 Arthur C Clarke
  • 20090625 Michael Jackson
  • 20101014 Benoît Mandelbrot
  • 20110502 Osama bin Laden
  • 20110723 Amy Winehouse
  • 20110822 Vicco von Bülow
  • 20111005 Steve Jobs
  • 20111008 Dennis M Ritchie
  • 20111122 Georg Kreisler
  • 20160421 Prince
  • 20160110 David Bowie
  • 20161107 Leonard Cohen