Here are the results of two tests I've run so far.
Test #1:
In order to determine if the magic key testing routines are part of the code for the first-run processor (for lack of a better term) I added an empty file named "forceupdate" in the root of the PHTSYS partition. I did this on my non-Phatnoise Toshiba drive - the same model as my Kenwood DMS drive, but with a different firmware revision I've since found out. Anyway, after a raw sector by sector copy of my original DMS to this non DMS drive the Keg wouldn't recognize the drive. So by adding the forceupdate file, and seeing the drive get rejected in exactly the same manner as without this file, it appears the key checking code is indeed part of the first-run processors routines, and runs before the code that updates the firmware.
Interestingly, the garbage (key) stored between the partition table and the start of the first partition is about 130k in size. I'm wondering if this isn't actually part of the first-run processors code!
What I would like to do now is to rename a file or two on the DMS just to be absolutely certain that the Keg doesn't load anything off of the drive, after mounting it, in order to check the key. What I need is for someone to tell me the order that the files are loaded. Is the file linux loaded first of all, and then royallin.ux? What are these two versions anyway? I assume one of them has to be loaded before rc.sh is called, right? Please let me know.
Test #2:
I wanted to see if the partition sizes can be changed. Having a small 10GB DMS and seeing 230+MB of space wasted on the PHTSYS partition prompted this. In a nutshell, it worked!
Here are the gory details:
I first tried to reduce the partition down to about 31MB and use FAT16. Barf. The keg only recognizes FAT32. Of interest is the fact that when I plugged the DMS into the Keg with the FAT16 PHTSYS partition, it passed the key check and started a firmware update! (The drive was initialized due to the reformat, hence the forceupdate file on the DMS. ) The firmware update didn't complete in over 30 minutes so I knew it wasn't working, it couldn't read the format of the drive. I had no choice but to pull the DMS out while the lights were blinking, and they didn't stop blinking! I had to unplug the Keg to HU cable to kill the lights.
I then reformated the partition to the smallest size (around 33MB) that FAT32 would allow and reformated. Unfortunately, I couldn't force the 1k cluster size I wanted, it defaulted to 1 sector per cluster. I was hoping to reduce the FAT size during this experiment as well. I figured it couldn't hurt. By the way, the original cluster size was 8k, so there was a bit of slack waste, but not anymore, and the FAT is roughly the same size it was before. I wonder if the Keg caches the FAT. I'm guessing not so a smaller FAT would mean faster file access. I think the format utility that comes with XP allows for forcing the cluster size, so I might play with that next for some more fun. Anyway, after reformatting and reinitializing, the DMS worked fine!
So I gained around 230MB, which is roughly 4 or 5 more CDs. And I also feel this proves that there is no partition table data in the key as well. AND as a side effect of this I corrected Phatnoises somewhat wacky partition table. They use a Linux utility to do the partitioning and to the best of my knowledge it doesn't break any rules, it just does things in an unusual way. It starts the second partition in the very next sector after the extended partition tables sector. Usually a head (side) is skipped. This is one of the reasons that programs like Partition Magic won't operate on the partition tables of the DMS. Nortons Disk Doctor also complains about problems with the partitions. At least mine did. Phatnoises partitioning program also incorrectly sets up the extended partition as just that, an extended partition, not an extendedx partition, which is really what is should be, seeing as how the partition crosses the 1024 track boundary. Maybe this doesn't matter with Windows, but it does with DOS. Anyway, my partition table are cleaned up and Norton and Partition Magic and DOS and Windows and the Keg are all happy with it this way.
I do want to say that I wouldn't recommend that anyone attempt to repartition their DMS unless they are absolutely sure they know what they are doing. Most partition utitlities WILL erase the magic key. If there is enough interest I will post a guide on how one can change their partition sizes, but even then it will require some understanding of partition tables and also the tools to manipulate them.
So here are some questions, maybe they might be better in their own thread. I'll leave it up to the answerer to start a new one.
What is the boot order of the DMS files?
Are there two different versions of Linux on the DMS? Royallin.ux, and Linux?
Does anyone know what the first-run processor is?