Hacking HDD for Wii U and vWii use?

Arnold101

Well-Known Member
Member
Joined
May 19, 2006
Messages
403
Trophies
1
XP
863
Country
United States
As you seem to be interested, I dumped my drive to explain to you how partitions are working.

I have a drive with 50GB FAT32 + 200GB WBFS partition.
I dumped my MBR and both partition's first sector.

Code:
Sector 0 (MBR)
       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
====  ===============================================  ================
0000  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0040  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0050  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0060  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0140  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0160  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0170  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0180  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0190  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01b0  00 00 00 00 00 00 00 00 bc 0b 19 94 00 00 80 01  ................
01c0  01 00 0c fe ff ff 3f 00 00 00 6d 78 d7 03 00 00  ......?...mx....
01d0  c1 ff 07 fe ff ff ac 78 d7 03 d5 cc 44 19 00 00  .......x....D...
01e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa  ..............U.

Sector 63 (Little Endian 3f 00 00 00 -> 0x0000003F = 63)
       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
====  ===============================================  ================
0000  eb 58 90 4d 53 44 4f 53 35 2e 30 00 02 20 20 00  .X.MSDOS5.0..  .
0010  02 00 00 00 00 f8 00 00 3f 00 ff 00 3f 00 00 00  ........?...?...
0020  6d 78 d7 03 70 3d 00 00 00 00 00 00 02 00 00 00  mx..p=..........
0030  01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0040  80 00 29 3f 59 08 7c 4e 4f 20 4e 41 4d 45 20 20  ..)?Y.|NO NAME 
0050  20 20 46 41 54 33 32 20 20 20 33 c9 8e d1 bc f4    FAT32   3.....
0060  7b 8e c1 8e d9 bd 00 7c 88 4e 02 8a 56 40 b4 08  {......|.N..V@..
0070  cd 13 73 05 b9 ff ff 8a f1 66 0f b6 c6 40 66 0f  ..s......f...@f.
0080  b6 d1 80 e2 3f f7 e2 86 cd c0 ed 06 41 66 0f b7  ....?.......Af..
0090  c9 66 f7 e1 66 89 46 f8 83 7e 16 00 75 38 83 7e  .f..f.F..~..u8.~
00a0  2a 00 77 32 66 8b 46 1c 66 83 c0 0c bb 00 80 b9  *.w2f.F.f.......
00b0  01 00 e8 2b 00 e9 48 03 a0 fa 7d b4 7d 8b f0 ac  ...+..H...}.}...
00c0  84 c0 74 17 3c ff 74 09 b4 0e bb 07 00 cd 10 eb  ..t.<.t.........
00d0  ee a0 fb 7d eb e5 a0 f9 7d eb e0 98 cd 16 cd 19  ...}....}.......
00e0  66 60 66 3b 46 f8 0f 82 4a 00 66 6a 00 66 50 06  f`f;F...J.fj.fP.
00f0  53 66 68 10 00 01 00 80 7e 02 00 0f 85 20 00 b4  Sfh.....~.... ..
0100  41 bb aa 55 8a 56 40 cd 13 0f 82 1c 00 81 fb 55  [email protected]
0110  aa 0f 85 14 00 f6 c1 01 0f 84 0d 00 fe 46 02 b4  .............F..
0120  42 8a 56 40 8b f4 cd 13 b0 f9 66 58 66 58 66 58  [email protected]
0130  66 58 eb 2a 66 33 d2 66 0f b7 4e 18 66 f7 f1 fe  fX.*f3.f..N.f...
0140  c2 8a ca 66 8b d0 66 c1 ea 10 f7 76 1a 86 d6 8a  ...f..f....v....
0150  56 40 8a e8 c0 e4 06 0a cc b8 01 02 cd 13 66 61  [email protected]
0160  0f 82 54 ff 81 c3 00 02 66 40 49 0f 85 71 ff c3  [email protected]..
0170  4e 54 4c 44 52 20 20 20 20 20 20 00 00 00 00 00  NTLDR      .....
0180  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0190  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01a0  00 00 00 00 00 00 00 00 00 00 00 00 0d 0a 52 65  ..............Re
01b0  74 69 72 65 7a 20 6c 65 73 20 64 69 73 71 75 65  tirez les disque
01c0  73 ff 0d 0a 45 72 72 2e 20 64 69 73 71 75 65 ff  s...Err. disque.
01d0  0d 0a 50 72 65 73 73 65 7a 20 75 6e 65 20 74 6f  ..Pressez une to
01e0  75 63 68 65 20 70 6f 75 72 20 72 65 64 82 6d 61  uche pour red.ma
01f0  72 72 65 72 0d 0a 00 00 00 ac c2 d0 00 00 55 aa  rrer..........U.

Sector 64452780 (little endian ac 78 d7 03 --> 0x03d778ac = 64452780)
       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F  0123456789ABCDEF
====  ===============================================  ================
0000  57 42 46 53 19 44 cc d5 09 16 00 00 01 01 01 01  WBFS.D..........
0010  01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01  ................
0020  01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01  ................
0030  01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01  ................
0040  01 01 01 01 01 01 01 00 01 01 01 01 01 01 01 01  ................
0050  01 01 00 01 00 00 01 00 00 01 01 01 01 01 01 01  ................
0060  01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0070  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0080  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0090  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0100  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0110  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0120  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0130  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0140  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0150  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0160  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0170  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0180  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
0190  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01a0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01b0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01c0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01d0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01e0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
01f0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
Sector 0 is the MBR, starting at "0x01be" it can contains 4 primary partition definitions (16 bytes each), followed by the Magic word (0x55 0xAA) (or AA55 as it's in fact in little endian).

Partition table :
Active flag (0x80=Active)
first usable CHS (cylinder/Head/Sector)
Partition type 0x0c = FAT32, 0x07=NTFS
End sector (of the drive? or it's screwed up in my mbr, they both share the same one)
Partition's first sector in LBA
Partition length in number of sectors

FAT32: 80 | 01 01 00 | 0c | fe ff ff | 3f 00 00 00 | 6d 78 d7 03
NTFS: 00 | 00 c1 ff | 07 | fe ff ff | ac 78 d7 03 | d5 cc 44 19

My WBFS partition is marked as "NTFS" (0x07), because the tool I used to partition to WBFS didn't set 0xBF in the MBR. USBloaders are checking partition headers instead of relying on the MBR's Partition_type.
The second partition is starting at LBA : "3f 00 00 00" (64) + "6d 78 d7 03" (64452717) = "ac 78 d7 03" (64452780)
WBFS Table
Magic (always "WBFS")
Number of HDD Sectors in the partition
HDD Sector size (2^x)
wbfs sector size (2^x)
2 padding bytes
Game table [1 byte each up to the end of the sector]


First 4 bytes = WBFS (magic word), it's this magic word that USBLoaders are using to check if WBFS is present.
partition size : 19 44 cc d5 (big endian), 217056913920bytes (200GB)
HDD Sector size : 2^9 = 512 bytes
(virtual) WBFS sector size = 2 ^16 = 0x40 000 = 4194304 byte
Game table : each byte set to 0x01 means there's presence of 1 game.

HDD with sector size of 512byte, WBFS partition can hold up to 500 games and the last two bytes are used as Game's presence too.
You can see that last two byte doesn't contain 55AA, while FAT32 partition does. FAT32 use the same Magic than MBR.

I don't know if you will find that information useful, but it's always interesting to learn new things ;)
hello can you help me to recover sector0 of a fresh formatted wiiu hdd to then put it into my wiiu hdd to fix it? please
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Bunjolio @ Bunjolio: legit nobody irl knows I'm trans(it hasn't been long enough yet)