SteveJay's Weblog

« 2004 World Series... | Main | OpenSolaris - The... »

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]

Comments:

Hi, SteveJay! Was your Ipod purchased as a "windows" ipod? Mine seems to be formatted with HFS+ ... I thought they were all fat32 these days (mine's a mini)... hfstools was able to see the readme file i have on my mini, when connected to my sunblade 100 at work (mlb.com... even the desks are powered by sun)... no hidden directories, though.

Posted by Ryan Nelson on November 30, 2004 at 11:32 PM EST #

Two more tidbits: Turns out the readme I saw with hfstools was what you get if you try to mount HFS+ as "old HFS"... it explains that my system is too old (or alien, in this case) The other thing is, did you know your sun blog page doesn't render under Safari on a mac? totally white page. Works fine under firefox, though... other sun blogs display ok. It fetches fine, 'cause i can see it with view source...

Posted by ryan nelson on November 30, 2004 at 11:42 PM EST #

Ryan, Yeah, my iPod is a 'Windows' iPod. I guess all bets are off with what I described above in you have a 'Mac' iPod (HFS+ formatted). You could probably convert from HFS+ to FAT32... but I wouldn't really suggest it. I haven't heard too many success stories. Also... no, I didn't know the blog was messed up on other browsers. (I wonder if it works on IE?) I'll look into that. Thanks for the heads-up.

Posted by SteveJay on December 01, 2004 at 11:34 AM EST #

Do you have your build instructions for GTKPod? I was able to build it but had some problems with the libmp4v2 library for AAC files. So I built it without AAC support for now.

Posted by watt on April 01, 2005 at 07:53 PM EST #

Post a Comment:

Comments are closed for this entry.