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
Wiiflow won't reconize the drive but CFG will. Need help making the drive NTFS with 32k.
No idea about Wiiflow. If your PC can read it fine too, I say it's their bug.

To convert to NTFS you can use convert.exe. Search in windows help(F1) or the web.
running "CONVERT X: /FS:NTFS" where X is your drive should do the trick.
But I'm not sure what cluster size it will use. Or why it would matter.
I don't get the whole crazyness about clustersize anyway.
As long as it stays in spec (64k is out of spec) I never had problems anywhere.
But otoh I don't use wiiflow.

I think I will include an option for NTFS in the next weeks.
 

DupsyMay

New Member
Newbie
Joined
Apr 1, 2009
Messages
3
Trophies
0
XP
55
Country
Gambia, The
Hi~

thanks so much for the great tool (have been looking for something like this!). But I got a strange error . Does anyone know what's up with that? It appears straight after "W2F: linking used Blocks to Files".

Thanks already!
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
Important things first: your data is save.
At that part not a single bit was written to the wbfs at that point.

Its most likely a bug in wbfs2fat.
I have no idea what exactly it could be. But if you are willing to help I think we can find out.

Which version are you using?
Can you check the wbfs with wiimms wwt?
Can you upload the backup file created by wbfs2fat?
Can you run it again with a higher verbosity setting and post the log?
 

DupsyMay

New Member
Newbie
Joined
Apr 1, 2009
Messages
3
Trophies
0
XP
55
Country
Gambia, The
Thank you so much for your fast answer!

"Which version are you using?"
wbfs2fat-0.8.2 windows

"Can you check the wbfs with wiimms wwt?"
I don't use cmd that often, so could you give me a hint how to check the drive? I downloaded wwt and opend it. My problem ist that I don't get the syntax right. "wwt CHECK G:\" is what I've been writing but well... doesn't work. I get error 25 (can't open file-> /cygdrive/g-> Permission denied) and error 17 (no wbfs found)


"Can you upload the backup file created by wbfs2fat?"
Where can I find it? It's not in the folder, that I chose for my backups.

"Can you run it again with a higher verbosity setting and post the log?"
Where can I change the setting and where do I find the log?

So sorry that I'm not much of a help....
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
wwt:
Afaik the syntac is right. Maybe you need to run it as admin? (run cmd as admin)
I will try running it (under windows) later.

backup:
You are right, there is no backup.
It is only created right before making the first changes and it never got that far for you.
Sorry 'bout that.

verbosity:
You can either run it with a commandline argument (-vvv) or increase the setting in the gui (2. window, right, directly above the text "window")
There is no logfile, simply cut 'n' paste the text output that is created.
 

DupsyMay

New Member
Newbie
Joined
Apr 1, 2009
Messages
3
Trophies
0
XP
55
Country
Gambia, The
weell, the wwt still doesn't work with me, even though I ran it as admin :(

I ran verbosity with "3":

W2F: checking for WBFS
W2F: analysing WBFS SXAP52 RFPE01 RMCP01 R9JP69 ROWE08 RWSP8P RO3P99 RWLP01 R49P01 RBKP69 RCPP18 RRBP41 RY2P41 RY3P41 RM8P01 RGHP52 RGVP52 R3BP8P RGWX41 R2UP8P SF5E41 ROUPAF SMNP01 SDNP41 REKE41 SRYPAF SEAP69 SXEP52 __CFG_ SB4P01 RPPP41 RFCPGD RUFP99 SISLIP SIS4OH SDRP3Q SISDOH SISCOH SIS80Q SANT3Q SBOD3Q R02PEA SISR3Q REKP41 DRP22Q SISHOH SBVG3Q SISBOH RTZP08 SISLOH SISPOH SIS5OH SIS3OH SIS7OH SIS1OH SEMP4Q SF8E01 SKGPA4 CSZP00 RK5E01 SD2P41 RNJE4F SUPP01 RDNEA4 SCWE41 SHHE69 SMOE41 SVMP01 SZ5E5G SXIE52 RPWZ41
W2F: creating FAT filesystem
W2F: creating placeholder Files
W2F: linking used Blocks to Files RDNEA4 0
ERROR

Thank you for your time!
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I created a special version the skips all the conversion stuff and only creates the backup.
http://www.unix-ag.u...-debug1.tar.bz2

Please run it and upload the backup somewhere

edit:
try running "wwt check -A" to check all wbfs partitions.
I can't figure out how to select one in windows too.
Might be another bug.
 

lost_loven

Well-Known Member
Member
Joined
Mar 8, 2010
Messages
115
Trophies
0
XP
156
Country
Canada
Great lil tool you have here just one problem for me...

woop, any idea whats going on here

W2F: checking for WBFS
W2F: analysing WBFS
W2F: creating FAT filesystem
W2F: creating placeholder Files
W2F: linking used Blocks to Files
W2F: creating Backup of overlap
WARNING: start of dangerous part
W2F: creating WBFS File Headers
W2F: relocating overlaping Blocks
W2F: writing FAT to Disk
W2F: end of dangerous part
W2F: moving Files to destination
ERROR

EDIT

Checked the drive contents and this is what it looks like, like the last few posts the files dont seam to get renamed

capturenyk.png



EDIT

Managed to rename and fix all the game names using "Advanced Renamer" by changing "*.0" extentions with ".wbfs" and ".1" extentions with ".wbf1", then copying the files to the wbfs folder, opened the HDD up in WBM and updated the "Storage Convention".

The whole process to about 30-40 seconds just incase anyone else had the same problems.

Thanks for the great tool saved me alot of time updating from WBFS to FAT32.

k this has happened to me too, so everything renamed and put into the wbfs folder.. whats the wbm? and i take it the storage convention is there?

lost
 

pepxl

GFX W!Z4RD
Member
Joined
Jun 19, 2009
Messages
3,263
Trophies
1
XP
328
Country
Great lil tool you have here just one problem for me...

woop, any idea whats going on here

W2F: checking for WBFS
W2F: analysing WBFS
W2F: creating FAT filesystem
W2F: creating placeholder Files
W2F: linking used Blocks to Files
W2F: creating Backup of overlap
WARNING: start of dangerous part
W2F: creating WBFS File Headers
W2F: relocating overlaping Blocks
W2F: writing FAT to Disk
W2F: end of dangerous part
W2F: moving Files to destination
ERROR

EDIT

Checked the drive contents and this is what it looks like, like the last few posts the files dont seam to get renamed

capturenyk.png



EDIT

Managed to rename and fix all the game names using "Advanced Renamer" by changing "*.0" extentions with ".wbfs" and ".1" extentions with ".wbf1", then copying the files to the wbfs folder, opened the HDD up in WBM and updated the "Storage Convention".

The whole process to about 30-40 seconds just incase anyone else had the same problems.

Thanks for the great tool saved me alot of time updating from WBFS to FAT32.

k this has happened to me too, so everything renamed and put into the wbfs folder.. whats the wbm? and i take it the storage convention is there?

lost

its Wii Backup Manager, it will automatically make and name folders for the corresponding games and place the .wbfs files with in the correctg game folder when you use the update storage convention, This depends on what naming style you use, i personally use the method of each game in its seperate folder under the wbfs folder, which would be "Game Title [GameID]"

Load your HDD in the "Drive 1" tab, your game should be regognised(if youve already done the renaming of .0 to .wbfs and so on)
Go to "Options" then "Settings", select "FAT32/NTFS"
Choose your prefered "Folder Layout" and "Naming Style"
Close the "Setting" window, select "Drive 1" tab then "Tools"
Select "FAT32/NTFS" then finally "Update Storage Convention"

Heres Wii Backup Manager if you cant find it
http://gbatemp.net/topic/188295-wii-backup-manager-for-windows/
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
k this has happened to me too, so everything renamed and put into the wbfs folder.. whats the wbm? and i take it the storage convention is there?
v0.8.2 should not leave any .0 or .1 files and should instead fall back to /wbfs/ID6.wbfs
which works with all loaders/tools too.

Can you tell me which game failed?
Or upload the backup file?

I would like to fix this bug so that others don't run into it too.
 

DimitriPilot3

New Member
Newbie
Joined
Feb 17, 2012
Messages
2
Trophies
0
XP
244
Country
France
I just ran the Windows build of wbfs2fat (version 0.8.2 - 2012-01-23) with a WBFS HDD drive (G:) that contained a small amount of games (about 10 games?). I don't think I've spotted any errors in the log (with the verbosity set to 2 IIRC), and just as the conversion finished, a window about the converted FAT32 drive popped up. Which looked like good news.

But I wanted to verify the HDD with Chkdsk. I first did it through Windows' GUI (drive properties > Tools > Check disk) without leaving any boxes ticked (as I was aware that it is reasonable to leave the FS intact for the backup). The Chkdsk report said something like "The \wbfs directory is completely unreadable. Directory entry deleted."
I thought I told Windows not to touch the file system?... but in the end, I don't think it did. Indeed, I browsed to the G: disk, and whenever I interact with the "wbfs" folder (the only visible element in the root), the Explorer.exe seems to act weirdly enough for me to feel like terminating the process (taking a lot of time to respond, and after a lot of time of trying to open the directory a CRC error message appears) As I said, Chkdsk spotted errors but I told it not to fix them. Just to be sure, I ran Chkdsk a 2nd time (from the command line), and this is the output (translated from French):
Code:
> chkdsk G:
The file system type is FAT32.
Volume wbfs2fat was created on 2012-02-17 14:42 CET (about a hour ago)
Windows is verifying files and directories...
Windows found errors on the drive, but won't fix them because the /F parameter wasn't passed.
The \wbfs directory is completely unreadable.
Directory entry deleted.
Verification of files and directories done.
Convert broken "links" into recovered/lost files (Y/N) ? n
35.5 GB of disk space will be freed.  // I don't think this happened, the /F parameter wasn't passed (and I managed to find several "RSBP" strings on the drive)
Windows detected errors on the file system.  Re-run CHKDSK with the /F parameter to fix them.
488,314,624 KB total disk space
452,760,800 KB free disk space
64 KB in 2 hidden files
32 KB in defective sectors
(32KB per allocation unit)

I have thought about restoring the backup that wbfs2fat does, but for some reason, wbfs2fat apparently attempted to include the ":" character in the backup file name, resulting in a backup of 0 byte which is named "wbfs.G" (stored in the same folder as wbfs2fat which is on a NTFS hard disk). Therefore, in a nutshell, there is (basically) no turning back, and I have to make a quick decision:

Should I let Chkdsk fix the errors (and prey that the files are in their appropriate folder and naming, or at least that the files are safe)? Should I make some sort of backup first? Has anyone else gotten the same "problems" (bugged backup file name, and this kind of file system error) as I do?

Thanks in advance. (Not sure if I'm going to be patient enough though...)
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
I suggest you do NOT use that function
I am almost certain that you will lose your games if you do

unfortunatly without the backup there is not much I can do
in your place I would try other filesystem checkers (in readonly mode first)
I would use fsck.vfat but there are other ones for windows besides chkdsk

I would like you to give me a backup of the first part of the drive (~1-2% I guess, I would need to calculate that) e.g. using "dd"
I mainly would like it to analyse what went wrong
its possible I find a way to fix your fs, but that would take time and I can't garantee anything
If you are willing to do that I can look into the details

you could try wwt to fix the filesystem
afaik it has a readonly mode too, called testing iirc

if none of the other checkers (including wwt) sound better
I would (as a last resort kind of thing) try the chkdsk fix
unless you want to wait of course

what makes this even more strange is that if the fat created was corrupt
wbfs2fat would have been unable to rename/move the files
causing them to still be in the root of the drive instead of the wbfs folder
(and would have printed errors to the log)

was there some other program accessing the drive at the same time?
like a wbfs manager?

I am terribly sorry

edit:
I found the problem with the backup, and its a really nasty one
it in fact seem to be the inclusion of the ":"
I did not notice that problem because when I tested it it worked
turns out it worked because I ran wbfs2fat from a network share
that was imported from a linux filesystem - which likes ":" just fine

even more edit:
no wonder that wbfs2fat did not abort at failing to create the backup
the backup DOES contain the backuped data
geting it out of there is a bit tricky but perfectly possible
just leave the file alone for now, I can show you how to do it tomorrow
(google alternate data streams if you want to look for youself)

and DO NOT modify the filesystem if you want to restore the backup
 

PsyBlade

Snake Charmer
OP
Member
Joined
Jul 30, 2009
Messages
2,204
Trophies
0
Location
Sol III
XP
458
Country
Gambia, The
v0.8.3 released
quick fix for backup creation on windows
previous backups are working but difficult to use (alternate data stream)
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: hmm