Difference between revisions of "Script to run firmware patch"

From PhatHack Wiki
Jump to navigation Jump to search
m
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]
  +
  +
''' ******** UPDATE: New [http://wiki.phathack.com/DMS_Hack_and_Repair_CD WIKI entry] for a CD we've made to do this process for you!!! ******** '''
  +
  +
  +
  +
 
This is a quick howto on using scripts to patch the disk signature checking function of the phatbox...
 
This is a quick howto on using scripts to patch the disk signature checking function of the phatbox...
   
   
Download [http://phatnoise.savageguild.com/files/phat-patch.zip phat-patch.zip] and extract it to the PHATSYS drive when the DMS is connected to your pc.
+
Download [http://downloads.phathack.com/judb/phat-patch.zip phat-patch.zip] and extract it to the PHATSYS drive when the DMS is connected to your pc.
   
   
  +
----
* From the PHATSYS root move flacplay and flacplay.sig into the PHATSYS\backup folder.
 
   
  +
'''VERY IMPORTANT.. This could damage your phatbox / keg or disable it and have to send it to someone or to phatnoise for repair. Also make sure you have any and all plugins you want to use loaded on the existing working DMS and working in the Phatbox / keg. Also before starting this process make sure you have the most recent firmware on the box.'''
* From the PHATSYS\backup folder copy flacplay-hacked and flacplay-hacked.sig into the PHATSYS root directory.
 
   
  +
'''You must use a known good DMS to run this process. Part way through the process you'll swap that drive out for another non phatnoise drive. If you have a broken DMS (the drive functions but the signature is dead on it this process could be used to fix the DMS. Please contact someone on the boards about this if you need help.'''
* Renamed PHATSYS\flacplay-hacked and the .sig file you just copied to remove the -hacked from the filenames.
 
   
  +
----
* Explore the PHATDATA\profiles\default directory. You should see a lot of files in there starting with P and ending in .idx / .sig / .pbx ... find p0.idx / .sig / .pbx and rename them backup0.idx / .sig / .pbx
 
   
* From PHATSYS\backup copy p0.* to PHATDATA\profiles\default ... This will make the first playlist that the phatbox plays execute the patch.
 
   
 
* From the PHTSYS root move flacplay and flacplay.sig into the PHTSYS\backup folder.
You can instead of using p0 as steps 4 and 5 say, change the name of the p0 files in PHATSYS\Backup to PXXX where XXX equals any number of a playlist as long as its in consecutive order with the existing playlists and then navigate to it when you are ready to patch the box.
 
   
 
* From the PHTSYS\backup folder copy flacplay-hacked and flacplay-hacked.sig into the PHTSYS root directory.
* Eject the DMS from your PC
 
   
 
* Renamed PHTSYS\flacplay-hacked and the .sig file you just copied to remove the -hacked from the filenames.
* Insert the DMS into your Phatbox / Keg and navigate to your playlist and it will patch your flash. You should almost instantly see the playlist change after it starts.. thats normal, theres no audio to play. Let the box play for about 30 seconds to be sure everything is done and then shut it off, wait for the lights to turn off and then unplug the headunit cable from the back of the phatbox OR disconnect your car battery.
 
   
 
* Explore the PHTDTA\profiles\default directory. You should see a lot of files in there starting with P and ending in .idx / .sig / .pbx ... find p0.m3u / .sig / .idx / .pbx and rename them backup0.m3u / .sig / .idx / .pbx
This will kill power to the phatbox causing it to do a full restart from the new flash. Let the system boot up and once it starts playing music you can shut it off again.
 
   
 
* From PHTSYS\backup copy p0.* to PHTDTA\profiles\default ... This will make the first playlist that the phatbox plays execute the patch.
* Remove your DMS and take it back to your PC. Plug it in and look for a file called bootload.log ... open it in notepad or your favorite text editor.
 
  +
 
You can instead of using p0 as steps 4 and 5 say, change the name of the p0 files in PHTSYS\Backup to PXXX where XXX equals any number of a playlist as long as its in consecutive order with the existing playlists and then navigate to it when you are ready to patch the box.
  +
 
* Eject the DMS from your PC
  +
 
* Insert the DMS into your Phatbox / Keg and navigate to your playlist and it will patch your flash. You should almost instantly see the playlist change after it starts.. thats normal, theres no audio to play. Pause playback (save cpu time) and wait for about 30 seconds to be sure everything is done and then shut it off, wait for the lights to turn off and THEN remove the DMS. This makes sure all the logs are saved to disk.
  +
 
* Take the DMS back to your PC and plug it in... look for a file called bootload.log... open it in notepad or your favorite text editor.
   
 
If the drive has a valid signature, after you boot, your logfile will look like this:
 
If the drive has a valid signature, after you boot, your logfile will look like this:
Line 47: Line 60:
   
   
You can also review the logs in PHATSYS\log for more information.
+
You can also review the logs in PHTSYS\log for more information.
   
  +
* You must write the first 1 meg of the original DMS onto the new DMS. Use dd to write the file drive-sig-1mb.bin '''(created in PHTSYS\backup, but copy it to a local drive before using this as you have to swap DMS drives)''' to the new DMS once it is inserted. [http://uranus.it.swin.edu.au/~jn/linux/rawwrite/dd.htm DD for windows users get version 0.3 binary at the bottom of the page]
* The scripts will copy your original flacplay and flacplay.sig back into place so you don't have to. You will however have to remove the patch related playlist files (the .idx / .sig / .pbx ) we played with in PHATDATA\profiles\default so you don't get a CORRUPT TRACK message when it tries to play.
 
   
  +
* Also make a backup copy of your plugin directory for copying to the new DMS drive.
* You can now make any drive a DMS drive. Partition it into two partitions, a PHATSYS of 64 megs to 256 megs and a PHATDATA of any size. At this time I have not tested the phatbox with a larger than 127 gig drive so it MAY not currently support drives of that size. We'll have to see.. but since laptop drives havent exceeded 120 gigs we should be fine for now.
 
  +
  +
* You can now make any drive a DMS drive. Partition it into two partitions, a PHTSYS of 64 megs and a PHTDTA of any size. PHTDTA must be an extended logical partition (partition number 5). I suggest waiting on this till you get a few more steps below and using the phatnoise DMS recovery CD / boot disk. This wiki entry does not cover the hardware portion of swaping the contents of the DMS. See http://wiki.phathack.com/DMS_drive_swap for more info on DMS hardware.
  +
  +
  +
----
  +
'''WARNING USING DD AS INSTRUCTED BELOW AGAINST THE WRONG DRIVE CAN AND WILL RESULT IN DATA LOSS. BE SURE YOU HAVE THE CORRECT OUTPUT DEVICE (of=) BEFORE RUNNING THE COMMANDS!!!!'''
  +
----
  +
  +
Windows Users:
  +
launch c:\windows\system32\diskmgmt.msc for windows 2K or XP
  +
to see what physical drive number windows has assigned your DMS. Replace X below with that number.
  +
dd if=c:\drive-sig-1mb.bin of=\\.\physicaldriveX bs=512 count=2048
  +
  +
Unix Users:
  +
I shouldnt have to explain this but use dd to copy the file
  +
dd if=/home/joeblow/drive-sig-1mb.bin of=/dev/sda bs=512 count=2048
  +
  +
* Download the DMS Rescue Disk from [http://unix.phatnoise.com/bootdisk.php here]
  +
  +
* Make either the floppy or CD version of the Rescue disk, and boot off it. (you may have issues with newer motherboard USB drivers not working with this older linux kernel.. if thats the case contact someone on the board for help.)
  +
  +
* Once the disk is booted plug in your DMS. '''DO NOT HIT ENTER ON THE MAIN PAGE''' hit ALT+F2 to go to the advanced menu.
  +
  +
* Select the Reparition Reformat option without the bad block check. Bad block check will take a LONG TIME. Play tetris on ALT+F5 if you do that option or reboot and try again.
  +
  +
* When that is complete reboot into windows and load up the PMM. It should see your new virgin DMS Of Unusual Size. (sorry Princess Bride joke) Go into the options in PMM and have it load up the current firmware onto the DMS. In explorer go to the PHTSYS drive and '''delete the two files forceupdate and forcesettings'''.
  +
  +
* Copy your plugin folder back onto the PHTSYS drive.
  +
  +
* Use PMM to copy over a few songs in one playlist. Save and Eject the DMS. Try it in your system to see if you are in luck!
  +
  +
* Don't steal music.. stealing is bad. mmmkay?
  +
  +
  +
----
  +
  +
 
At this time I have not tested the phatbox with a larger than 127 gig drive so it MAY not currently support drives of that size. We'll have to see.. but since laptop drives havent exceeded 120 gigs we should be fine for now.
   
 
YAY!!!!
 
YAY!!!!
  +
  +
'''Also, Pro Tip: Make sure you dont have your new drive set to slave or cable select. (No jumpers == goodness usually)'''

Latest revision as of 06:09, 27 July 2005


******** UPDATE: New WIKI entry for a CD we've made to do this process for you!!! ********



This is a quick howto on using scripts to patch the disk signature checking function of the phatbox...


Download phat-patch.zip and extract it to the PHATSYS drive when the DMS is connected to your pc.



VERY IMPORTANT.. This could damage your phatbox / keg or disable it and have to send it to someone or to phatnoise for repair. Also make sure you have any and all plugins you want to use loaded on the existing working DMS and working in the Phatbox / keg. Also before starting this process make sure you have the most recent firmware on the box.

You must use a known good DMS to run this process. Part way through the process you'll swap that drive out for another non phatnoise drive. If you have a broken DMS (the drive functions but the signature is dead on it this process could be used to fix the DMS. Please contact someone on the boards about this if you need help.



  • From the PHTSYS root move flacplay and flacplay.sig into the PHTSYS\backup folder.
  • From the PHTSYS\backup folder copy flacplay-hacked and flacplay-hacked.sig into the PHTSYS root directory.
  • Renamed PHTSYS\flacplay-hacked and the .sig file you just copied to remove the -hacked from the filenames.
  • Explore the PHTDTA\profiles\default directory. You should see a lot of files in there starting with P and ending in .idx / .sig / .pbx ... find p0.m3u / .sig / .idx / .pbx and rename them backup0.m3u / .sig / .idx / .pbx
  • From PHTSYS\backup copy p0.* to PHTDTA\profiles\default ... This will make the first playlist that the phatbox plays execute the patch.

You can instead of using p0 as steps 4 and 5 say, change the name of the p0 files in PHTSYS\Backup to PXXX where XXX equals any number of a playlist as long as its in consecutive order with the existing playlists and then navigate to it when you are ready to patch the box.

  • Eject the DMS from your PC
  • Insert the DMS into your Phatbox / Keg and navigate to your playlist and it will patch your flash. You should almost instantly see the playlist change after it starts.. thats normal, theres no audio to play. Pause playback (save cpu time) and wait for about 30 seconds to be sure everything is done and then shut it off, wait for the lights to turn off and THEN remove the DMS. This makes sure all the logs are saved to disk.
  • Take the DMS back to your PC and plug it in... look for a file called bootload.log... open it in notepad or your favorite text editor.

If the drive has a valid signature, after you boot, your logfile will look like this:

BOOT0-0: OK
BOOT0-1: OK
BOOT0: Successful
BOOT9: Successful
BOOTB: Successful
BOOTF: Successful
BOOT*: Successful 

Now, if you boot with a bad signature, or non phatnoise signed drive it will look like this:

BOOT0-0: OK
BOOT0-1: OK
BOOT0-2: Successful
BOOT9: Successful
BOOTB: Successful
BOOTF: Successful
BOOT*: Successful


You can also review the logs in PHTSYS\log for more information.

  • Also make a backup copy of your plugin directory for copying to the new DMS drive.
  • You can now make any drive a DMS drive. Partition it into two partitions, a PHTSYS of 64 megs and a PHTDTA of any size. PHTDTA must be an extended logical partition (partition number 5). I suggest waiting on this till you get a few more steps below and using the phatnoise DMS recovery CD / boot disk. This wiki entry does not cover the hardware portion of swaping the contents of the DMS. See http://wiki.phathack.com/DMS_drive_swap for more info on DMS hardware.



WARNING USING DD AS INSTRUCTED BELOW AGAINST THE WRONG DRIVE CAN AND WILL RESULT IN DATA LOSS. BE SURE YOU HAVE THE CORRECT OUTPUT DEVICE (of=) BEFORE RUNNING THE COMMANDS!!!!


Windows Users:
launch c:\windows\system32\diskmgmt.msc for windows 2K or XP 
to see what physical drive number windows has assigned your DMS. Replace X below with that number.
dd if=c:\drive-sig-1mb.bin of=\\.\physicaldriveX bs=512 count=2048
Unix Users:
I shouldnt have to explain this but use dd to copy the file
dd if=/home/joeblow/drive-sig-1mb.bin of=/dev/sda bs=512 count=2048
  • Download the DMS Rescue Disk from here
  • Make either the floppy or CD version of the Rescue disk, and boot off it. (you may have issues with newer motherboard USB drivers not working with this older linux kernel.. if thats the case contact someone on the board for help.)
  • Once the disk is booted plug in your DMS. DO NOT HIT ENTER ON THE MAIN PAGE hit ALT+F2 to go to the advanced menu.
  • Select the Reparition Reformat option without the bad block check. Bad block check will take a LONG TIME. Play tetris on ALT+F5 if you do that option or reboot and try again.
  • When that is complete reboot into windows and load up the PMM. It should see your new virgin DMS Of Unusual Size. (sorry Princess Bride joke) Go into the options in PMM and have it load up the current firmware onto the DMS. In explorer go to the PHTSYS drive and delete the two files forceupdate and forcesettings.
  • Copy your plugin folder back onto the PHTSYS drive.
  • Use PMM to copy over a few songs in one playlist. Save and Eject the DMS. Try it in your system to see if you are in luck!
  • Don't steal music.. stealing is bad. mmmkay?




At this time I have not tested the phatbox with a larger than 127 gig drive so it MAY not currently support drives of that size. We'll have to see.. but since laptop drives havent exceeded 120 gigs we should be fine for now.

YAY!!!!

Also, Pro Tip: Make sure you dont have your new drive set to slave or cable select. (No jumpers == goodness usually)