Menu

#2295 Using the Backup GPT - allowing to use a Hard Drive for both WiiU and vWii

New
nobody
None
Low
Enhancement
2015-01-17
2014-12-28
Anonymous
No

Originally created by: Bach.Flo...@gmail.com

Together with another german Developer,  I have found a way to partition a Hard Drive that is used in the WiiU - so in theory, it should be possible to use a Hard Drive for both WiiU and vWii - but any application that needs access to the vWii part needs to get modified.

Please provide any additional information below.
Please give here as much information as you can.
Note: Please avoid attaching too big files if not really needed.

During our test, we did the following (if you want to test yourself, this does only work with a USB hard drive (no usb pen) and you need to have Linux):

- Create a new GPT partition table on the drive.
- Add a new FAT32 or NTFS Partition at the very end of the device, leave the first part unallocated.
- Set the "Host Protected Area"-Flag on the Hard Drive ( http://en.wikipedia.org/wiki/Host_Protected_Area ) by executing "hdparm -N pXXXXXX --yes-i-know-what-i-am-doing /dev/sdX" - replace "XXXXXX" with the first sector of your partition minus 1.
- Unplug the device from your computer and reconnect it - it should now be recognized as a smaller device by your computer.
- run "dd if=/dev/zero of=/dev/hdX count=1M bs=10
- Plug the device into the WiiU and let the WiiU format the drive.

If everything worked correctly, you now have a hard drive with a WiiU partition, and a hidden NTFS partition without partition table.

The good thing about GPT is - there is a backup partition table at the end of the device.

So, the "only" thing that has to be done (I have no idea how hard this is) is to rewrite the USB Loader in two points:

1., it has to use the backup GPT without restoring the main one, and
2., ignoring the set HPA and directly write / read to sectors.

I do not exactly know, how the USB-Loaders or cIOS do communicate with the hard drive - maybe this is not even possible because of WiiU limitations.

But if it IS possible to read / write data inside the HPA area without resetting the HPA, the WiiU just sees its own partition, but the USB-Loader has access to the hidden NTFS one.

Discussion

  • Anonymous

    Anonymous - 2014-12-29

    Originally posted by: Bach.Flo...@gmail.com

    A thing I forgot to say: It is also possible to remove the HPA temporarily. So instead of ignoring it, it can be removed temporarily, and with the next reboot of the WiiU (and so the reboot of the hard drive) the HPA area is hidden again.

    So, only point 1 is important: Use the backup GPT if the main one is broken / not available *without* trying to repair it (because that would destroy the WiiU data).

     
  • Anonymous

    Anonymous - 2014-12-29

    Originally posted by: c...@mangaheart.org

    I already knew this method, and this was tested few days after WiiU release date, but it was decided to not add it to loaders because it's too difficult for users to setup or use on a daily basis. Instead, it's using the "UStealth" method, with modified MBR signature for vWii HDD only (no shared partition with WiiU format).

    If HPA can be edited on the console, it could be done by the loader or a dedicated homebrew to format/resize/unhide temporarily.
    I don't know how to edit or access HPA commands on the console, nor if it's even possible.

    So currently, it requires a computer to hard-edit the HPA every time you want to edit the vWii partition content, or switch between WiiU to vWii mode. Not a lot of users have Linux (I don't, so it's difficult for me to do proper tests).

    I'll read more information about HPA, but I don't promise anything.

     
  • Anonymous

    Anonymous - 2014-12-29

    Originally posted by: Bach.Flo...@gmail.com

    Well, when a linux computer would be needed every time a user wants to switch from WiiU to vWii, this method is senseless and noone would use this.

    But if there was a way for the USB-Loader to temporarily (until next hard drive restart) remove the HPA, this has to be set up only once.

     
  • Anonymous

    Anonymous - 2014-12-29

    Originally posted by: c...@mangaheart.org

    I'll post this here for later references:
    will need to check if Wii IOCTL has these commands.

    List of IOCTL commands
    http://lxr.free-electrons.com/source/include/linux/hdreg.h?v=3.0

    struct return by WIN_IDENTIFY (0xEC) command
    http://msdn.microsoft.com/en-us/library/windows/hardware/ff559006%28v=vs.85%29.aspx

    c example of WIN_SET_MAX (0xF9) and WIN_READ_NATIVE_MAX (0xF8)
    http://www.win.tue.nl/~aeb/linux/setmax.c

     
  • Anonymous

    Anonymous - 2015-01-17

    Originally posted by: ciapa1...@gmail.com

    Is there any progress with this? I'm already working on a simple way of setting things up on a Windows PC, without having to install a Linux distribution. So the only part left in the chain would be the USB Loader and/or the libogc, depending on where this has to be done from(i think it could even be libogc, but I'm not that familiar with hardware-near programming on the Wii.

     

Log in to post a comment.