Jump to content


Photo

Xboxdumper - Creating Xbox Hdd From Windows Os


  • Please log in to reply
42 replies to this topic

#1 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 07 March 2010 - 01:30 PM

Thanks to Cygwin, I've managed to compile xboxdumper under Windows OS. xboxdumper and the companion mkfs.fatx are the key components in xboxhdm that does the actual work of marking a new hdd with the magic value that identifies it as a xbox hdd and creating the FATX partitions.

Note that this doesn't solve the hdd locking after you have created the partitions. You probably need a combination of MHDD and some other means of booting (ISO,USB) and LiveInfo Beta 3 for that - to lock the replacement hdd with the correct password calculated from the eeprom. Or if you have been working with the original hdd, hotswapping is still needed.

Instructions:
1. Download xboxdumper.exe , mkfs.fatx.exe and cygwin1.dll from xboxhdm2.1 soureforge site to the same folder.

2. Start a Command Prompt in Windows in that folder. You are likely to need adminstrator rights since you will be doing physical disk access later.

3.
CODE

xboxdumper prepare \\.\PhysicalDrive1

where PhysicalDrive1 represents the second hard drive attached to your PC under Windows - the replacement xbox hdd. You should verify under Disk Management if you are working on the correct hdd. Execution will try a while depending on the size of the hdd.

Output will look something like this, ignore references to xboxhdd
CODE

Written -> BRFR
Creating -> part50 start 2884108288 size 5120024576
createPartition : Filename : xboxhdd
createPartition : clusters       312501
createPartition : start          2884108288
createPartition : size           5120024576
createPartition : chainMapSize   4
createPartition : chainTableSize 1253376
Creating -> part51 start 2359820288 size 524288000
createPartition : Filename : xboxhdd
createPartition : clusters       32000
createPartition : start          2359820288
createPartition : size           524288000
createPartition : chainMapSize   2
createPartition : chainTableSize 65536
Creating -> part52 start 524288 size 786432000
createPartition : Filename : xboxhdd
createPartition : clusters       48000
createPartition : start          524288
createPartition : size           786432000
createPartition : chainMapSize   2
createPartition : chainTableSize 98304
Creating -> part53 start 786956288 size 786432000
createPartition : Filename : xboxhdd
createPartition : clusters       48000
createPartition : start          786956288
createPartition : size           786432000
createPartition : chainMapSize   2
createPartition : chainTableSize 98304
Creating -> part54 start 1573388288 size 786432000
createPartition : Filename : xboxhdd
createPartition : clusters       48000
createPartition : start          1573388288
createPartition : size           786432000
createPartition : chainMapSize   2
createPartition : chainTableSize 98304
Calling ioctl() to re-read partition table.


Have not tested the hdd in the xbox yet. This is WIP.

Edited by ldotsfan, 07 March 2010 - 01:31 PM.


#2 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 09 March 2010 - 01:56 PM

xplorer360 beta 6 is required to insert files/folders onto the hdd prepared by xboxdumper.

I've verified with a hex editor the binary output from xboxhdm against xboxdumper's and only the FATX Volume IDs of the 5 FATX partitions differ so this is definitely viable. subfdisk uses a random value for the volume ID anyway.

#3 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 11 March 2010 - 01:57 PM

Appropriate for the scenario where a chipped or tsop flashed xbox does not have a working dvd drive and needs to replace the hdd.

#4 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 13 March 2010 - 10:50 AM

Hacked together hdtool (used in xboxhdm and from xbox linux) for the hdd locking stuff and Christian Franke's hdparm for win32 and Linux's kernel source.
For the IOCTL_IDE_PASS_THROUGH support in Windows OS. Commented out the i2c stuff which is intended for reading the eeprom directly from xbox motherboard.


File: hdtool.exe available from xboxhdm2 sourceforge.

CODE

hdtool (c) David Pye dmp@davidmpye.dyndns.org
Licenced under the GNU GPL
Usage:  hdtool <options> <device>

-p, --password <password> - the password to use.
-e  --eeprom-file <file>  - use an Xbox eeprom image from file to generate passw
ord
-o, --operation           - the operation to perform, either LOCK, UNLOCK, or DISABLE-PW.

Either -a, -e or -p  must be specified. -d is mandatory
If no operation is specified, the current drive security settings will be displayed
Example:
hdtool  -p 12345678 --operation DISABLE-PW /dev/hda
will permanently remove the HDD password protection


In plain English, hdd locking/unlocking from Windows (if your OS driver supports IOCTL_IDE_PASS_THROUGH). XP SP2 has this. Unknown for other versions of Win OS. My test machine is on Win7.

My motherboard bios has Security Frozen feature so I can't test it myself but the program was able to issue low level ATA commands to read the hdd Serial and Model.
CODE

hdtool.exe /dev/hda
HDD Serial      :       <blanked out>
HDD Model       : Hitachi <blanked out>
Drive Security Settings
Security supported : yes
Security enabled : no
Security locked : no
Security frozen : yes
Security count expired: no


I'll upload my source to sourceforge next time.

Edited by ldotsfan, 13 March 2010 - 10:53 AM.


#5 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 14 March 2010 - 04:14 AM

QUOTE(ldotsfan @ Mar 13 2010, 05:50 PM) View Post

I'll upload my source to sourceforge next time.

Documented my changes to hdtool in here

#6 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 27 March 2010 - 04:03 AM

QUOTE(ldotsfan @ Mar 9 2010, 08:56 PM) View Post

I've verified with a hex editor the binary output from xboxhdm against xboxdumper's and only the FATX Volume IDs of the 5 FATX partitions differ so this is definitely viable. subfdisk uses a random value for the volume ID anyway.

xboxhd and xbrowser (xboxhdm) doesn't recognize the partitions created and refused to work with them - testing was done from vmware agains the raw physical hdd. Even after manually creating the hda* device nodes with mknod and mounting them, xbrowser reported space problems while copying files to both C and E. Somehow the FATX partitions are broken somewhere. Further work is needed to investigate why this isn't working.

Edited by ldotsfan, 27 March 2010 - 04:03 AM.


#7 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 28 March 2010 - 03:00 PM

QUOTE(ldotsfan @ Mar 27 2010, 11:03 AM) View Post

Further work is needed to investigate why this isn't working.

1. Reformatted the hdd as FAT32 under Windows.
2. Executed xboxdumper.
3. Noted that BRFR the magic xbox hdd identifier at offset 0x600 was missing and inserted the value with the hex editor. xboxdumper's logic for this is somehow broken.
4. Run xboxhdm1.9 under virtualbox.
5. This time, xbrowser did not complain and the file copies from Kingroach's C and E from the iso completed without errors.
6. Locked the hdd in the chipped xbox.
7. Booted xbox with chip off and was greeted by UnleashX dash from Kingroach's Ndure.

In other words, the xbox liked the xboxdumper created FATX partitions enough to boot from it. Need to do more tests on C,E,X,Y,Z partitions to verify.

#8 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 29 March 2010 - 02:01 PM

QUOTE(ldotsfan @ Mar 28 2010, 10:00 PM) View Post

Need to do more tests on C,E,X,Y,Z partitions to verify.

Happy to report that the XBMC install as dash and other apps went smoothfully without any surprises. Rebooted to XBMC and other apps worked too.

#9 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 29 March 2010 - 02:22 PM

Time to put the pieces together for an end-to-end solution for hdd upgrades/replacement in Windows.

The necessary tools:
1. xboxdumper.exe. cygwin1.dll and mkfs.fatx from the same location.
2. hdtool.exe.
3. xplorer360
4. Installing Kingroach's Ndure (xplorer360 style).
5. eeprom.bin. Reference
Optional:
1. LiveInfo
2. CASH disc as a source of msdash 5960 files.

Instructions in the next post.

Edited by ldotsfan, 29 March 2010 - 02:50 PM.


#10 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 29 March 2010 - 02:46 PM

Instructions:

1. Download all files into the same folder.
2. Start a Command Prompt in Windows in that folder with administrative rights.
3. Run diskmgmt.msc. Take note of the Disk number corresponding to the xbox hdd, for example Disk 1 by using the drive size as a guide.
4.
CODE

xboxdumper prepare \\.\PhysicalDrive1

Make sure the first line of output is
CODE

Written -> BRFR


where PhysicalDriveN represents the xbox hdd, the number N must match the Disk number identified in step 3. In this case, N is 1.
5. Installing Kingroach's Ndure with xplorer360. If you are using Windows 7, you may need to disable UAC to enable drag&drop.
a. Open xbox hdd with xplorer360. Backup contents of C drive (partition 3). You might substitute msdash files from CASH disc in place of the backup of C drive.
b. Close the drive in xplorer360 and open shadowc.img in shadowc folder of ndure C folder with xplorer360.
c. Copy backup files from step 1 over to partition 0. Close the image.
d. Open xbox hdd with xplorer360 again. If you want ndure to coexist with existing msdash, delete xbox.xtf and xbox book.xtf in partition 3 and then copy over contents of ndure C folder over to partition 3. and take care ernie.xtf is copied before xbox.xtf. Otherwise delete away contents of partition 3 and copy over Ndure C folder contents over.
e. Copy ndure E folder contents to partition 4.

<Optional>
f. For setting up of UDDAE,
g. Copy xboxdashdata.17cdc100 folder in ndure C folder to partition 3.
h. Copy settings_adoc.xip from ndure C folder 's xboxdashdata.185ead00 folder to same folder in partiton 3.
i. If on partition 4, under TDATA/fffe0000/music folder , ST.DB exists, rename to ST2.DB.
j. Copy ST.DB from ndure E folder TDATA/fffe0000/music folder to same folder on partition 4.

6. Lock the hdd with hdtool.
CODE

hdtool /dev/hdc

will identify the hdd. Eg:
CODE

HDD Serial      :       <blanked out>
HDD Model       : Hitachi <blanked out>
Drive Security Settings
Security supported : yes
Security enabled : no
Security locked : no
Security frozen : yes
Security count expired: no


CODE

hdtool -e eeprom.bin -p LOCK /dev/hdc

hda represents IDE primary master.
hdb is IDE primary slave.
hdc is IDE secondary master.
hdd is IDE secondary slave.

If xbox doesn't boot, use a hex editor and insert BRFR at offset 0x600 of the hdd. You have to unlock the hdd first with
CODE

hdtool -e eeprom.bin -p DISABLE-PW /dev/hdc
hdtool -e eeprom.bin -p UNLOCK /dev/hdc

Edited by ldotsfan, 29 March 2010 - 02:57 PM.


#11 Heimdall

Heimdall

    X-S Legend

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 5,749 posts
  • Location:UK
  • Xbox Version:v1.4
  • 360 version:v4.0 (jasper)

Posted 29 March 2010 - 04:27 PM

Excellent work, as usual.

beerchug.gif beerchug.gif

#12 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 30 March 2010 - 03:43 PM

QUOTE(Heimdall @ Mar 29 2010, 11:27 PM) View Post

Excellent work, as usual.

beerchug.gif beerchug.gif

dry.gif A minor bug fix for the reading of eeprom.bin and a newer copy of hdtool.exe uploaded to sourceforge.



#13 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 01 April 2010 - 03:11 AM

QUOTE(ldotsfan @ Mar 30 2010, 10:43 PM) View Post

and a newer copy of hdtool.exe uploaded to sourceforge.

This version doesn't set the master password to a known value like XBOXSCENE unlike the linux variant by ldots used by xboxhdm. A workaround is to use hdparm win32 to set the master password.

#14 ldotsfan

ldotsfan

    X-S Messiah

  • Dev/Contributor
  • PipPipPipPipPipPipPip
  • 3,100 posts
  • Xbox Version:v1.1
  • 360 version:unknown

Posted 02 April 2010 - 03:45 AM

QUOTE(ldotsfan @ Apr 1 2010, 10:11 AM) View Post

A workaround is to use hdparm win32 to set the master password.

1. I've incorporated the hdparm code for master password setting into hdtool but it's untested. I still don't have a rig with the necessary specifications (since xboxhdm2.1 days) to test it myself. If you have a stock 8-10 GB hdd that you are prepared to brick and your rig meets the necessary requirements, ie OS runs hdtool and bios does not freeze lock and has the IOCTL_IDE_PASS_THROUGH support, please drop me a PM to sign up as a beta tester. Thanks.

2. xboxhdm traditionally has a rebuild C drive option. It should be easy to incorporate that into xboxdumper should there be a demand. If you would like this to be included, simply reply smile.gif .

3. A Powershell script or batch file to wrap-around the functionality in xboxdumper/hdtool and integrate things together will be nice. I will look into this in due time or if somebody is interested in taking the challenge, I welcome your help. pop.gif

4. I'll be contacting the author of Xbox 360 Commander. This is related to point 3 and a GUI integrating xboxdumper/hdtool/xplorer360 will be very nice indeed. I hope he's receptive to supporting old-school xbox1 guys like us dry.gif

#15 tripslipfall

tripslipfall

    X-S Enthusiast

  • Members
  • 7 posts

Posted 03 April 2010 - 02:55 AM

Can you do this with a fully formatted PC drive?

If so, how?

Because when I do it, I don't get the BRFR at the beginning, and Xplorer360 for some reason only finds a Partition 0.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users