Jim's Depository

this code is not written

Let’s just say you have taken your old PPC G4 mac Mini with the dead hard disk and fitted it with an 8GB compact flash card in a 2.5” IDE adapter. Installing Debian Lenny on there is easy, but you end up with an ext3 journaled filesystem that may be concentrating wear on the journal area.

NILFS2 is a spiffy new filesystem that probably doesn’t concentrate wear and is attractive when writing is slower than reading. Sounds great, but yaboot doesn’t know how to find the kernel and initrd.img on it, so you need to make an ext2 /boot partion and then tell yaboot to look there.

The secret is in the naming of the files in yaboot.conf. Here is mine:


    partition 3

    partition 3

As you can see, hda3 is my /boot, hda4 is my root.

Astute readers will also notice that you have to either save a partition or migrate from another drive to pull this off since you need to build yourself a shiny new 2.6.31 kernel with NILFS2 compiled in.

Note: My G4 Mini has developed an odd hanging problem when using X programs with the root on NILFS2. I’ll go back to ext2, 2.6.26 for now then try ext2 2.6.31 and see where the trouble lies.

I just finished finding a four day bug. It sounds simple in retrospect, but oh the wrong paths I have trod and wild codes I have explored.

If, like me, you run Debian on tiny routers, like WRTSL54GS or other Broadcom units from Linksys, you probably use an OpenWRT kernel and a Debian root. Somewhere between 2.6.25 and 2.6.28 the OpenWRT people chopped the FPU emulator out of their Linux tree. Sadly for Debian people this causes any program you try to run, like init, to hang in an infinite loop.

The solution is now enshrined over at https://dev.openwrt.org/ticket/5774 where it talks about the invisible kernel config option: MIPS_FPU_EMU.

Addendum: Oh yeah, you are going to want to go into drivers/usb/host/ehci-ssb.c and pull the static off of ssb_ehci_attach and ssb_ehci_detach if you want USB 2.0 built into the kernel.

The OpenWRT folks "resolved" this by adding a printk that mentions the FPU emulation is disabled somewhere early in the boot, but not making the kernel option visible or preventing the infinite emulator trap.

At best this will let your kernel tell you "I told you so." after you spend four days debugging.