Need help rebuilding hard drive partition

Discussion about Modding the XBOX, including hardware and software hacks.
Post Reply
dballs
Posts: 7
Joined: Tue Dec 03, 2013 11:54 pm

Need help rebuilding hard drive partition

Post by dballs »

In Short: I have selected MBR in Windows Disk Manager on my xbox HDD and now it wont work in my xbox. Can I fix this?

In Detail:
I have been cloning my modded xbox HDD with a stand alone HDD duplicator for new xbox's. But I no longer have access to that duplicator so I thought I would give Cloning Software a try.

I hooked up both my new 2tb HDD and my exsitting 2tb xbox HDD to my windows based computer. I installed Acronis True Image 2014 and used the clone disk utility but neither of my 2tb drives were available in the drive list.

Then I went to Disk Management where I saw the 2 drives. They were unallocated and when I clicked on them it made me choose MBR or GPT. I selected MBR (big mistake). They showed up in acoris now but say they are empty.

Now when i put my original HDD back in my hard modded X2.5035 TSOP xbox, it hangs on loading xcutter config and the eject button flashes red green....

Is there anyway to get the proper partition table back without disturbing all my files? This things nearly full! HELP!


p.s. is there anyother forums anyone would suggest to ask this? xbox-scene is down :(
User avatar
Nextelhalo
Posts: 725
Joined: Wed Jul 04, 2012 5:55 am
Location: Yoyorast Island
Has thanked: 61 times
Been thanked: 77 times

Re: Need help rebuilding hard drive partition

Post by Nextelhalo »

No idea how to help on this end but glad to see you on these forum Dballs :D

EDIT: have you tried loading an autoinstaller disc like Slayers or Hexen to see if it shows you your files?
Last edited by Nextelhalo on Wed Dec 04, 2013 5:18 am, edited 1 time in total.
Halo LE Blue (Japan Black jewel) v1.0 1.0GHZ Trusty 128 RAM 640GB Blue-White P/E LED's
White v1.4 X3 CE with X3 CP 500GB Blue-white P/E LED's Blue Jewel
Debug kit untouched
User avatar
mrmajikbus45
Posts: 346
Joined: Mon Nov 18, 2013 12:36 am
Location: Kent, OH, USA
Has thanked: 32 times
Been thanked: 56 times

Re: Need help rebuilding hard drive partition

Post by mrmajikbus45 »

That's above my pay grade. Wait for a senior coder/mod on this one. Good luck though.
A strong man doesn't need to read the future, he makes his own. -Solid Snake
American as Guile!
Get your Chimp on!
Heimdall
Posts: 331
Joined: Thu Jul 05, 2012 6:43 pm
Location: UK
Has thanked: 4 times
Been thanked: 45 times

Re: Need help rebuilding hard drive partition

Post by Heimdall »

I think you are out of luck unless you can write and compile Xbox code, but a little edited history may help here:

The original Xbox hard drive had no partition table - partition information (about the size and location of the C, E, X, Y and Z partitions) was hard coded into the original Xbox BIOS, and not stored on the disk.

When the writers of hacked BIOSes first started using larger hard drives they extended the same hard coded partition scheme, leading to the 06 or 67 designations for hacked BIOSes, reflecting the new hard coded disk layout with either an F partition, or an F and a G partition.

A hacker known as OzPaulb noticed that the Xbox FATX disk layout didn't use the first sector of the disk (sector 0), and worked out that there was enough space there to hold a small partition table, in the same way that a normal computer disk would.

This on-disk partition table was adopted by the later hacked BIOSes (X2.4981, Evox M8+, iND-BIOS, X3.3xxx), and XBPartitioner was created to write this partition table onto the disk.

Now for the bad news. This sector 0 is where a standard computer disk keeps its Master Boot Record (MBR) (which contains a partition table and a boot loader).

The standard MBR partition table and the OzPaulB partition table are different, and incompatible.

Now that you have overwritten the OzPaulB sector 0 with a standard Microsoft MBR on sector 0, your hacked BIOS can't find the OzPaulb partition table, so can't find your Extended (F/G) partitions. (I would guess, in passing, that your boot dash is on your F or G partitions, otherwise the Xbox should still boot).

Rewriting the original sector 0 would fix the problem, but....

Each partition has a File Allocation Table (FAT) that keeps track of the individual files and directories on that partition.

I believe that XBPartitioner not only writes the OzPaulB partition table, but also writes a new, empty FAT within each partition you create. It would be illogical for it not to do this - BUT I MAY BE WRONG ABOUT THIS. The reason there is doubt in my mind is that you can run XBPartitioner to sort out the F/G partitions without it affecting your C, E, X, Y and Z partitions, so the writing of a new FAT must at least be conditional depending on what exactly you are asking XBPartitioner to change on your disk.

Consequently it is likely that using XBPartitioner to replace the OzPaulb partition table would also overwrite the FAT in each partition, rendering your data unreadable.

So, I believe you have four options:

1. Simply try using XBPartitioner to "reformat" the disk. (Note that it doesn't actually format any of the disk surface, it just creates some data structures on the disk). It will sort out the partitions, but may also overwrite the FAT in each partition, so you would lose your data anyway.
2. Have a look at the XBPartitioner source code. If it only writes to sector 0, or if it never writes a new FAT, then go ahead and run it, and your data will be restored. However, if (as I suspect) it writes elsewhere on the disk, then create and compile a version that only writes the appropriate data to sector 0, and ignores any data structures in the individual partitions, and use this to recreate the original sector 0. As long as the FAT in each partition is untouched then your data will still be there.
3. Use a low-level disk sector editor to take a copy of sector 0 from a working 2TB hard drive that has EXACTLY the same partition layout as your broken drive, and paste it onto your broken drive. It's years since I did anything like this, I can't even remember the names of any of the software that you might use, but Google will help.
4. Start again. Reformat the disk, FTP the data across from your backup.

1. is very risky. 2 and 3 should work, but there is no guarantee that Windows didn't also change something else on the disk.....

The only guaranteed solution is 4 ... but you knew that before you even posted!
User avatar
Xphazer
Posts: 524
Joined: Wed Jul 04, 2012 4:39 am
Location: Montréal
Has thanked: 240 times
Been thanked: 106 times

Re: Need help rebuilding hard drive partition

Post by Xphazer »

I am extremely happy to see you back around here Heimdall! :D
ldotsfan
Posts: 49
Joined: Sun Jul 08, 2012 1:47 pm
Has thanked: 1 time
Been thanked: 24 times

Re: Need help rebuilding hard drive partition

Post by ldotsfan »

1. http://www.xbmc4xbox.org.uk/forum/viewt ... =13&t=1055
2. http://blog.creativeitp.com/posts-and-a ... -workshop/
3. http://www.bydavy.com/2012/01/lets-decr ... ot-record/

The culprit is 446 bytes of bootstrap code. Otherwise the 2 partition tables don't actually overlap... I will suggest you inspect the first 446 bytes with your favorite hex editor (HxD , Hex Workshop etc) and assess the damage. You can get by reconstructing E,C,X,Y,Z portions of the xbox partition table based on captainn's post since those are hard coded sizes/locations common to any xbox. As for F and G, do you know their exact sizes? You probably have to calculate offsets and sizes by hand though so this is a variant of Heimdall's suggestion no 3. Good luck...
Ldotsfan :)
dballs
Posts: 7
Joined: Tue Dec 03, 2013 11:54 pm

Re: Need help rebuilding hard drive partition

Post by dballs »

Wow hey thanks everyone for your replies!

Some of these options sounds like some fun learning opportunities. I might just look into them :) I can get a recently cloned HDD of mine i made for a friend but i did do a couple hours worth or work since that clone so I might try these.

Thanks!
Dusty
User avatar
blighty
Posts: 189
Joined: Sun Jul 22, 2012 12:56 am
Location: England
Has thanked: 26 times
Been thanked: 8 times

Re: Need help rebuilding hard drive partition

Post by blighty »

what if he popped it into a tsop'd box and just used an unleashx boot disc but not formating f or g? but the cluster size may stop that working i dont know, sounds easyer to just grab a copy of your mates hdd but just use ftp in the future ;)
Heimdall
Posts: 331
Joined: Thu Jul 05, 2012 6:43 pm
Location: UK
Has thanked: 4 times
Been thanked: 45 times

Re: Need help rebuilding hard drive partition

Post by Heimdall »

Use the UnleashX boot disc to do what?

If you mean "and then run XBPartitioner to rewrite the partition table", then that's what my Option 1 - Use XBPartitioner" is all about.

If you mean "and then use UnleashX to format the C and E partitions" then that will achieve nothing, because UnleashX doesn't write the partition table, and that's the bit that's missing.
User avatar
blighty
Posts: 189
Joined: Sun Jul 22, 2012 12:56 am
Location: England
Has thanked: 26 times
Been thanked: 8 times

Re: Need help rebuilding hard drive partition

Post by blighty »

so does unleashx only write the partition table when it builds f and g drives?
Heimdall
Posts: 331
Joined: Thu Jul 05, 2012 6:43 pm
Location: UK
Has thanked: 4 times
Been thanked: 45 times

Re: Need help rebuilding hard drive partition

Post by Heimdall »

UnleashX doesn't ever write the partition table. The only tool that does that is XBPartitioner.
Tpruner
Posts: 1
Joined: Sun Sep 13, 2015 7:02 pm

Re: Need help rebuilding hard drive partition

Post by Tpruner »

I hate to revive an old thread like this. But i screwed the pooch. I accidentally selected the mbr function. Im not interested in modding my hard drive. It actually started to fail so i wanted to recover my data before it was to late. I'm freaking out because im about to lose 7 years worth of of saves, etc. (I know back up you back ups) can anyone give me a link to what i should restore my hex to? I've literally never used a hex editor. I know this is an absolutely stupid long shot. But please. Can someone help? I'm desperate over here.
Post Reply