SteveJay's Weblog

Main | Next day (Nov 30, 2004) »

20041130 Tuesday November 30, 2004

So you actually wanted to use your iPod with Solaris 10?!

Well... so it turns out that there's actually a Solaris bug that prevents the iPod from mounting properly (without a little coaxing). Let's just say we're working on it.

Update (01/18/2005): I have just confirmed that the workaround described below is completely unnecessary for Solaris 10 on x86. The 'pcfs' bug and workaround below only affect Solaris SPARC. If you are using Solaris SPARC, continue reading. Otherwise skip to "But wait... there's more..." below.

But if you're reading this, then you probably actually wanted to try out your iPod with Solaris 10 now. So I've included some details below on the workaround I'm using.

Problem
The iPod contains two partitions: the 1st is a small one used by iPod firmware, the 2nd is the rest of the disk. Originally, both are marked FAT32 and both are marked primary. But unfortunately Solaris 'pcfs' doesn't see the 2nd partition (which is, of course, a bug).

The 1st partition's signature is in the first sector:

  # dd if=/dev/rdsk/c5t0d0p0 count=1 | od -c
  1+0 records in
  1+0 records out
  0000000 353   X 220   M   S   D   O   S   5   .   0 002  \0  \b  \0 002
  0000020 002  \0  \0  \0  \0 370  \0  \0   ?  \0 377  \0  \0  \0  \0  \0
  0000040   _ 340 276 001  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
  0000060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
  0000100 002  \0   )   R   6 213 250   i   P   o   d  \0   M   E
  0000120           F   A   T   3   2               3 311 216 321 274 364
  .......

Now the first part of the workaround is basically to modify the "FAT32" signature to something different, e.g. replacing 'F' with 'C' will be sufficient. As a result, 'pcfs' will ignore 1st partition and will skip to the 2nd.

But wait... there's more...

The iPod's music repository is also located in a hidden directory. And, by default, Solaris 'pcfs' will not show hidden directories. However, there is an undocumented 'hidden' option to override this behavior. So your mount command will typically look something like this:

  # mount -F pcfs -o hidden /dev/dsk/c5t0d0s0:1 /mnt/ipod

Update, cont'd. (01/18/2005): If you are using Solaris 10 on x86, then you need only to mount the 2nd partition with:

  # mount -F pcfs -o hidden /dev/dsk/c5t0d0p2 /mnt/ipod
Nothing else, no additional hacking of the first sector, etc. For Solaris 10 on x86, all of the rest of the hacks I described here are unnecessary.

Summary
So basically what I did to my iPod was this:

At this point everything is ready to roll. And I, personally, just leave my iPod in this 'hacked' state. It makes it easier going from work to home. And I haven't had any problems using it in this state on Windows, Solaris, or Linux, with iTunes, or in the car. But if you're uncomfortable and want to undo, you can always do this at any time:
  dd if=restoreoriginal_iPodhack of=/dev/rdsk/c5t0d0s0 count=1

So that's it. No big deal really. Hopefully we'll get this Solaris bug fixed soon and none of us will have to go through this convoluted process just to use our iPods. But until then... I hope this workaround helps.

BTW... with the help of some gtkpod developers, the latest version (v0.85) now compiles and runs unmodified on Solaris 10. Pretty cool. Thanks guys! Try it out for yourself.

(2004-11-30 18:02:59.0) Permalink Comments [4]