xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Usenet Offers: +1150 days binary retention, 99%+ Completion, and Unlimited Speed/Access!

360 ODD Emulators: X360 Key $99 | Wasabi360 FAT $99 | Wasabi360 Slim $99
C4E's iXtreme Burner MAX Drive: LiteOn iHAS124 DROPPED TO JUST $17


Welcome Guest ( Log In | Register )

 Forum Rules Rules
3 Pages V  1 2 3 >  
Reply to this topicStart new topic
> Xboxdumper - Creating Xbox Hdd From Windows Os, Creating a xbox hdd under Windows
ldotsfan
post Mar 7 2010, 01:30 PM
Post #1


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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.

This post has been edited by ldotsfan: Mar 7 2010, 01:31 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 9 2010, 01:56 PM
Post #2


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 11 2010, 01:57 PM
Post #3


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



Appropriate for the scenario where a chipped or tsop flashed xbox does not have a working dvd drive and needs to replace the hdd.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 13 2010, 10:50 AM
Post #4


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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.

This post has been edited by ldotsfan: Mar 13 2010, 10:53 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 14 2010, 04:14 AM
Post #5


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

I'll upload my source to sourceforge next time.

Documented my changes to hdtool in here
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 27 2010, 04:03 AM
Post #6


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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.

This post has been edited by ldotsfan: Mar 27 2010, 04:03 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 28 2010, 03:00 PM
Post #7


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 29 2010, 02:01 PM
Post #8


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 29 2010, 02:22 PM
Post #9


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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.

This post has been edited by ldotsfan: Mar 29 2010, 02:50 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 29 2010, 02:46 PM
Post #10


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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


This post has been edited by ldotsfan: Mar 29 2010, 02:57 PM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Heimdall
post Mar 29 2010, 04:27 PM
Post #11


X-S Legend
*********

Group: Members
Posts: 5749
Joined: 27-August 08
From: UK
Member No.: 388964
Xbox Version: v1.4
360 version: v4.0 (jasper)



Excellent work, as usual.

beerchug.gif beerchug.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Mar 30 2010, 03:43 PM
Post #12


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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.

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Apr 1 2010, 03:11 AM
Post #13


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
ldotsfan
post Apr 2 2010, 03:45 AM
Post #14


X-S Messiah
*******

Group: Dev/Contributor
Posts: 3098
Joined: 23-March 08
Member No.: 376711
Xbox Version: v1.1
360 version: unknown



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

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
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
tripslipfall
post Apr 3 2010, 02:55 AM
Post #15


X-S Enthusiast


Group: Members
Posts: 7
Joined: 7-February 10
Member No.: 432317



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.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





3 Pages V  1 2 3 >
Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 23rd May 2013 - 03:20 AM