hfs [TiVo]

The linux kernel on the TiVo uses what is essentially the Apple hfs filesystem. The only real differences are that the TiVo uses a 512 byte sector size and also a different magic number to identify the partition map and other internal data structures.

There are two things you have to do to a linux system to allow it to mount a TiVo filesystem.

  1. Modify drivers/block/genhd.c
  2. Use the kernel ide option hdX=bswap

Hacking genhd.c

Here's a copy of the context diff from my system. It's a Debian stable 2.2.20.0.1-2000-12-03 system with a 2.2.18pre21 kernel.

Byte swap the ide drive(s)

Since the powerpc has a different byte order that the i386, it's necessary to have the ide driver swap bytes after reading from the disk and before writing to it.

One way to do this is to specify the arguments when you boot.

Another is to add a line to your lilo.conf:

append="hda=bswap hdb=bswap hdc=bswap hdd=bswap"
Be careful; if you are using a ide drive as your linux system disk, you don't want to byte swap it!

As a side note, if you are doing a image backup (drive to drive copy), it'll run a hell of a lot faster if you use two drives that are NOT byteswapped. When you use byteswapped drives, the kernel reads data, swaps it, swaps it again and then writes it to the other drive. Very slow process...

Back to Craig's TiVo page

Copyright © 2000
Craig Leres