FAT problems

Palm LD

HDD access is now working fine, the problems I mentioned earlier were all slight configuration issues (like not turning on IDE disk support whoops!). So now we come to the issue of how to stick our Linux rootfs onto the disk. I was hoping we could just mount the data partition and stick a filesystem image in there, but it looks like things won't be that simple. Linux refuses to mount the data partition claiming both the primary and backup FATs are corrupt. I tried reformatting the partition using mkfs.vfat and all works fine for Linux, however now PalmOS doesn't see anything on the partition and tries to recover a bunch of 'lost clusters'. Hmm.

My suspicion is that Linux and PalmOS must be intepreting the location of the FATs differently. It should be fairly straightforward to track down what's going on and modifying the Linux FAT driver so it can understand the PalmOS FAT32 format but right now I'm more interested in quickly hacking together something that will work.

So, for my next trick, I will attempt to resize the data partition, tack a Linux filesystem onto the end of the drive and then pull a rabbit out of the SD slot.

As far as i know, data on

As far as i know, data on lifedrive is transparently encrypted, so we can't read PalmOS Fat32 normally...

I had heard it might be

I had heard it might be encrypted when you have a password set on the device. It doesn't look like it's encrypted normally. I can see the contents of files when I browse through the drive with a hex editor. Plus I can access the FAT16 'application area' partition no problems. It's just the FAT32 3.7GB data partition that's problematic. You'd think they'd encrypt the application area where most apps save data if they were going to encrypt something.

Palm say that you should not

Palm say that you should not format the drive with Windows as it will end up with too small of a cluster size (solution id 9214) and ms claim it would set such a drive to 64KB clusters of 128 sectors (article id 314878). Could it simply be that whatever unusual cluster size which is being used by palm is not correctly detected by the linux/ld fat driver? Determining what values palm uses and then feeding them back into the blocksize option of mount and/or the -s/-S options to mkdosfs may yield results? Personally I think the loopback mounted rootfs from the main palm partition is the way to go ... if possible. Perhaps a mail to Palm may yield some useful information?

Aaaaaaaah! Thanks very much!

Aaaaaaaah! Thanks very much! I hadn't thought to look at what was going on with the USB 'Drive Mode'. I now know why the FAT32 is offset, it's not actually anything to do with the cylinder size (Linux detects that fine) or anything like that. It's because the 3rd partition is not just a partition, it's a drive image! Yes, it has it's own MBR, partition table etc. So if you have a modern BIOS you could boot your PC off it. Heheh. I'm going to have a mess around and see if I can mount the FAT32 partition within a drive image, within a partition, within the HDD now. But this is good news, because it means we can just repartition the data drive image via USB and don't have to worry about messing anything up.