Hacking wbfs2fat.py

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
That is indeed wired.
Unfortunatly I don't have access to a Mac to test things.

Your best chance are probably filesystem checking tools.

Do you (or somebody else reading this) have access to a MAC and linux?

The only thing I can think of is that wbfs2fat creates only a single FAT table.
By default other FAT formating tools create 2 copys.
But using one saves space, is compliant to the FAT spec and the wii FAT drivers ignore (which leads to inconsistencys, which is bad imho) the others anyway

To create such an FS under linux use (MIGHT work on OSX too)
mkdosfs -F32 -f1 /dev/sdX
then check if it works on a Mac

can you upload the backup file to let me check for other potential sources?
 

Kronusdark

Active Member
Newcomer
Joined
Jan 2, 2010
Messages
36
Trophies
1
XP
83
Country
United States
I have access to linux, is that command non-destructive? I really dont have the storage space to make a backup of my wii drive.
 

Kronusdark

Active Member
Newcomer
Joined
Jan 2, 2010
Messages
36
Trophies
1
XP
83
Country
United States
Here is what i get from an fsck.

Code:
dosfsck 3.0.12, 29 Oct 2011, FAT32, LFN
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "wbfs2fat"
Media byte 0xf8 (hard disk)
      512 bytes per logical sector
    32768 bytes per cluster
        69 reserved sectors
First FAT starts at byte 35328 (sector 69)
        1 FATs, 32 bit entries
  61044224 bytes per FAT (= 119227 sectors)
Root directory start at cluster 2 (arbitrary size)
Data area starts at byte 61079552 (sector 119296)
  15259160 data clusters (500012154880 bytes)
0 sectors/track, 0 heads
        0 hidden sectors
976705536 sectors total
Checking for unused clusters.
Checking free cluster summary.
/dev/sdb1: 455 files, 14866078/15259160 clusters
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
It's destructive but you could use a different device eg some usb stick
edit: use a partition (like /dev/sdx1)

fsck looks as expected
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Hi Psyblade.

Having difficulty getting the prog to run at all have run from cmd line in windows but get error :
Error loading Python DLL: python27.dll (error code 126)​
I installed python and clicked on wbfs2fat.py but that just pops a window up and then cloeses right away.
I then ran Python and dragged wbfs2fat.py into it and get:
c:\python>wbfs2fat.py​
Traceback (most recent call last):​
File "C:\python\wbfs2fat.py", line 12,​
wbfs2fat.main()​
File "C:\python\wbfs2fat.py", line 731​
import gui.gui​
ImportError: No module named 'gui.gui'​
ANy helpm would be appreciated.
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Which version of wbfs2fat?
Which Windows?

Both errors can be caused by missing files (windows/python27.dll or python/gui/gui.py).
Are you sure that you extracted all of them?
(Some packing tool allow you to run progams directly without extracting them manually first. But they only extract the one file you actually clicked.)
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Which version of wbfs2fat?
Which Windows?

Both errors can be caused by missing files (windows/python27.dll or python/gui/gui.py).
Are you sure that you extracted all of them?
(Some packing tool allow you to run progams directly without extracting them manually first. But they only extract the one file you actually clicked.)


Thanks for the fast reply. Neither of those files are present. When I installed python I used the Windows installer so thought it would be a complete package.
Any idea how I can grab those files then?
I'm on w8 btw and latest version of your aPP

thanks
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I did not mean files from the windows python installer, I meant files from wbfs2fat.

Unless you have experience with python it's probably easier to concentrate on the standalone version (the ".exe" one in the "windows" folder).
It does not need you to have python (or anything else) installed.

Heres a list of the folders/files included in the archive:
(If one or more are missing try things like extracting them again/using a different unpacker/downloading again)

wbfs2fat/
wbfs2fat/howto.txt
wbfs2fat/readme.txt
wbfs2fat/windows/
wbfs2fat/windows/wbfs2fat.exe
wbfs2fat/windows/wbfs2fat.exe.manifest
wbfs2fat/windows/select.pyd
wbfs2fat/windows/unicodedata.pyd
wbfs2fat/windows/sip.pyd
wbfs2fat/windows/_hashlib.pyd
wbfs2fat/windows/bz2.pyd
wbfs2fat/windows/PyQt4.QtCore.pyd
wbfs2fat/windows/win32ui.pyd
wbfs2fat/windows/PyWinTypes27.dll
wbfs2fat/windows/pythoncom27.dll
wbfs2fat/windows/_ctypes.pyd
wbfs2fat/windows/_win32sysloader.pyd
wbfs2fat/windows/win32trace.pyd
wbfs2fat/windows/PyQt4.QtGui.pyd
wbfs2fat/windows/win32api.pyd
wbfs2fat/windows/Microsoft.VC90.CRT.manifest
wbfs2fat/windows/msvcr90.dll
wbfs2fat/windows/msvcp90.dll
wbfs2fat/windows/msvcm90.dll
wbfs2fat/windows/python27.dll
wbfs2fat/windows/QtCore4.dll
wbfs2fat/windows/Microsoft.VC90.MFC.manifest
wbfs2fat/windows/mfc90.dll
wbfs2fat/windows/mfc90u.dll
wbfs2fat/windows/mfcm90.dll
wbfs2fat/windows/mfcm90u.dll
wbfs2fat/windows/QtGui4.dll
wbfs2fat/windows/qt4_plugins/
wbfs2fat/windows/qt4_plugins/codecs/
wbfs2fat/windows/qt4_plugins/codecs/qcncodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qjpcodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qkrcodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qtwcodecs4.dll
wbfs2fat/windows/qt4_plugins/imageformats/
wbfs2fat/windows/qt4_plugins/imageformats/qgif4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qico4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qjpeg4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qmng4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qsvg4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qtiff4.dll
wbfs2fat/windows/qt4_plugins/iconengines/
wbfs2fat/windows/qt4_plugins/iconengines/qsvgicon4.dll
wbfs2fat/windows/support/
wbfs2fat/windows/support/gen_py/
wbfs2fat/windows/support/gen_py/__init__.py
wbfs2fat/windows/support/gen_py/dicts.dat
wbfs2fat/python/
wbfs2fat/python/__init__.py
wbfs2fat/python/cfg.py
wbfs2fat/python/cli.py
wbfs2fat/python/wbfs2fat.py
wbfs2fat/python/gui/
wbfs2fat/python/gui/Ui_guiconvert.py
wbfs2fat/python/gui/Ui_guirestore.py
wbfs2fat/python/gui/Ui_guiselect.py
wbfs2fat/python/gui/__init__.py
wbfs2fat/python/gui/gui.py
wbfs2fat/python/gui/guiconvert.py
wbfs2fat/python/gui/guirestore.py
wbfs2fat/python/gui/guiselect.py
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
I did not mean files from the windows python installer, I meant files from wbfs2fat.

Unless you have experience with python it's probably easier to concentrate on the standalone version (the ".exe" one in the "windows" folder).
It does not need you to have python (or anything else) installed.

Heres a list of the folders/files included in the archive:
(If one or more are missing try things like extracting them again/using a different unpacker/downloading again)

wbfs2fat/
wbfs2fat/howto.txt
wbfs2fat/readme.txt
wbfs2fat/windows/
wbfs2fat/windows/wbfs2fat.exe
wbfs2fat/windows/wbfs2fat.exe.manifest
wbfs2fat/windows/select.pyd
wbfs2fat/windows/unicodedata.pyd
wbfs2fat/windows/sip.pyd
wbfs2fat/windows/_hashlib.pyd
wbfs2fat/windows/bz2.pyd
wbfs2fat/windows/PyQt4.QtCore.pyd
wbfs2fat/windows/win32ui.pyd
wbfs2fat/windows/PyWinTypes27.dll
wbfs2fat/windows/pythoncom27.dll
wbfs2fat/windows/_ctypes.pyd
wbfs2fat/windows/_win32sysloader.pyd
wbfs2fat/windows/win32trace.pyd
wbfs2fat/windows/PyQt4.QtGui.pyd
wbfs2fat/windows/win32api.pyd
wbfs2fat/windows/Microsoft.VC90.CRT.manifest
wbfs2fat/windows/msvcr90.dll
wbfs2fat/windows/msvcp90.dll
wbfs2fat/windows/msvcm90.dll
wbfs2fat/windows/python27.dll
wbfs2fat/windows/QtCore4.dll
wbfs2fat/windows/Microsoft.VC90.MFC.manifest
wbfs2fat/windows/mfc90.dll
wbfs2fat/windows/mfc90u.dll
wbfs2fat/windows/mfcm90.dll
wbfs2fat/windows/mfcm90u.dll
wbfs2fat/windows/QtGui4.dll
wbfs2fat/windows/qt4_plugins/
wbfs2fat/windows/qt4_plugins/codecs/
wbfs2fat/windows/qt4_plugins/codecs/qcncodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qjpcodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qkrcodecs4.dll
wbfs2fat/windows/qt4_plugins/codecs/qtwcodecs4.dll
wbfs2fat/windows/qt4_plugins/imageformats/
wbfs2fat/windows/qt4_plugins/imageformats/qgif4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qico4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qjpeg4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qmng4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qsvg4.dll
wbfs2fat/windows/qt4_plugins/imageformats/qtiff4.dll
wbfs2fat/windows/qt4_plugins/iconengines/
wbfs2fat/windows/qt4_plugins/iconengines/qsvgicon4.dll
wbfs2fat/windows/support/
wbfs2fat/windows/support/gen_py/
wbfs2fat/windows/support/gen_py/__init__.py
wbfs2fat/windows/support/gen_py/dicts.dat
wbfs2fat/python/
wbfs2fat/python/__init__.py
wbfs2fat/python/cfg.py
wbfs2fat/python/cli.py
wbfs2fat/python/wbfs2fat.py
wbfs2fat/python/gui/
wbfs2fat/python/gui/Ui_guiconvert.py
wbfs2fat/python/gui/Ui_guirestore.py
wbfs2fat/python/gui/Ui_guiselect.py
wbfs2fat/python/gui/__init__.py
wbfs2fat/python/gui/gui.py
wbfs2fat/python/gui/guiconvert.py
wbfs2fat/python/gui/guirestore.py
wbfs2fat/python/gui/guiselect.py


Ok,,feeling pretty daft now. Just presumed that the 0.9.0 beta contained all the necessary files. Never even checked the 0.8.6!
Should be fine now I guess. Thanks a lot.
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Yes the update versions were meant to be copied over an older one.
While I did mention that in the post that anounced the beta I'm not sure if I actually did it somewhere else to.
I should better check the readme right now....
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Ok..I got this now :(

checking for WBFS
analysing WBFS
creating FAT filesystem
creating Files
creating Backup of overlap
WARNING: start of dangerous part
writing WBFS File Headers
ERROR: [Errno 22] Invalid argument
ERROR <type 'exceptions.AttributeError'>

Ran in windows compatibility mode but with same result.
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Upload one backup or debug file somewhere to and I will have a look.
They are in the folder from where you ran it.
Cheers. I'm just wondring if its coz I have multiple partitions on the drive, with my wbfs one being the second. The other partitions are formatted as 2xfat32 and1xntfs.
I've uploaded to Dropbox https://www.dropbox.com/s/dk5gbvek988no2x/windows.rar

Thanks for all your support - much appreciated.
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Other partitions should not matter.

I'm unable to recreate to problem.
Could you run it with a higher verbosity setting (-v for cli or "2" in gui) and post the output.
Make sure to run it as Administrator.

Some other info would also be helpfull
windows version and size of WBFS partition (from windows diskmanagement NOT a WBFS manager)
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Hi,

here we go.


checking for WBFS
analysing WBFSRZDP01RKDEEBRODE01RZTP01RTZE08R6BE78RYBE69RZJP69R9DP78RFBE01SOMP01R2UP8PSBLE5GRVYP52RJAP52RVDPLGR49E01RK5E01RDZP01RX3E01R6EE41RGLE7DR96EAFRO3P99RBHE08RZZE8PRWSP8PROLP8PRMCP01RMAP01RM3E01R3ME01SMNP01RNHE41ROWP08RQ3PGNR7PP01RB4E08SBDE08RBUP08RE4P08SX3P01R3BP8PR5WEA4RBKP69RSPP01RMGE01RSMP8PR8PP01RHOE8PSTKE08RUYE41SDNP41R3RP8PR4EE01RMHP08SB4E01R2VP01SL3ENRSJBE52SEMP4QSF8E01SMOP41RMKP01SX4P01SVTEXSSJDP41SOUE01SVMP01S7BP69SL2P01S2EP41SUKP01ST7E01SOJP41SLSP01S72E01
creating FAT filesystem
creating FilesSOMP01SF8E01R6BE78STKE08ST7E01R2VP01RQ3PGNSLSP01RMCP01ROLP8PS7BP69R7PP01RTZE08RX3E01SX4P01SJBE52RK5E01R96EAFRE4P08SUKP01RBKP69RUYE41SBLE5GRVDPLGRB4E08R2UP8PR3RP8PS2EP41SVMP01SMNP01RDZP01RZDP01RMGE01RZZE8PSVTEXSRMHP08RGLE7DR3BP8PR4EE01SEMP4QRZTP01R6EE41RMKP01RKDEEBRFBE01RBUP08R3ME01RODE01SOUE01SDNP41SX3P01SOJP41SJDP41RYBE69RSMP8PSMOP41R9DP78SB4E01RNHE41RM3E01RMAP01SL2P01R8PP01ROWP08RO3P99RSPP01SBDE08RBHE08S72E01SL3ENRRHOE8PRZJP69RVYP52R5WEA4R49E01RJAP52RWSP8P
creating Backup of overlap ./wbfs.E.1355065877.back
WARNING: start of dangerous part
writing WBFS File HeadersSOMP01
ERROR: [Errno 22] Invalid argument
ERROR <type 'exceptions.AttributeError'>

Partition size is 382gb on Windows 8 Pro

Thanks
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Here we go:-

c:\2fat>wbfs2fat.exe \\.\E: -m convert
Qt: Untested Windows version 6.2 detected!
wbfs2fat 0.9.0beta1 2012-08-15
checking for WBFS
analysing WBFS
creating FAT filesystem
creating Files
creating Backup of overlap
ready for conversion
Press Enter to continue or Control+C to cancel

WARNING: start of dangerous part
writing WBFS File Headers
ERROR: [Errno 22] Invalid argumentTraceback (most recent cal
File "<string>", line 12, in <module>
File "x:\build\pyi.win32\wbfs2fat\outPYZ1.pyz/wbfs2fat", l
File "x:\build\pyi.win32\wbfs2fat\outPYZ1.pyz/wbfs2fat", l
AttributeError: Device instance has no attribute 'options'
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
the part I need is cut off

the "l" of the second and third last line is the first letter of "line n" (see the line above it)
n is what I need
 

pin

Well-Known Member
Member
Joined
Apr 21, 2009
Messages
197
Trophies
0
XP
625
Country
Sorry,,damn windows cmd mark up - it's :-

Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd c:\2fat

c:\2fat>wbfs2fat.exe \\.\E: -m convert
Qt: Untested Windows version 6.2 detected!
wbfs2fat 0.9.0beta1 2012-08-15
checking for WBFS
analysing WBFS
creating FAT filesystem
creating Files
creating Backup of overlap
ready for conversion
Press Enter to continue or Control+C to cancel

WARNING: start of dangerous part
writing WBFS File Headers
ERROR: [Errno 22] Invalid argumentTraceback (most recent call last):
File "<string>", line 12, in <module>
File "x:\build\pyi.win32\wbfs2fat\outPYZ1.pyz/wbfs2fat", line 725, in main
File "x:\build\pyi.win32\wbfs2fat\outPYZ1.pyz/wbfs2fat", line 617, in convert
AttributeError: Device instance has no attribute 'options'

c:\2fat>
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I think the problem is win8

but for the moment this is going nowhere
I need to try running it on a win8 myself
might need some days till I can do that
I will pm you once I have progress

maybe try it on a pc with a different version of windows

last thing you could try is running the python version
I don't have much hope for that but since you already have python you can try if you want
there are some python extensions you need (see readme)
in cli go into the wbfs2fat\python folder
there run "c:\python\python.exe wbfs2fat.py \\.\E: -m convert"
(you migth need to change the path of python.exe to the real one)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Well start walking towards them +1