PDA

View Full Version : wbfs to fat32 or ntfs



ck-ok
27th September, 2011, 10:53 PM
this program and tutorial was written by psyblade from gbatemp.net all thanks should go to him http://gbatemp.net/t291320-wbfs2fat.py

How to convert from WBFS to FAT32 or NTFS
This tutorial will show you how to convert a partition:
***8226;without losing your games
***8226;without copying somewhere else and back
***8226;without ripping them again
***8226;do in a few minutes (with good PC experience)
***8226;do it without much experience


1. Introduction
WBFS partitions have been around for a long time. They were the earliest way to run Backups from USB and SD.
But they have some drawbacks. For example you can not store homebrew programs, movies or any other types of files on them.
To do that you would need to partition the drive. But in that case you have to know beforehand how much space you will need for which purpose.
Another Problem with WBFS is that windows permanently asks to format it. One incautious click by a friend and everything is gone.

This was overcome by the ability to use FAT and later even NTFS and EXT2,3,4. FAT support is included in most Loaders nowadays and has no drawbacks compared to WBFS.

One of the problems of WBFS that persists is its lack of proper filesystem utilities.
If you still have a legacy WBFS drive it is hard to convert to something else and can't be grown or shrunk in size.

This tutorial will try to make it as easy and fast as possible to convert to FAT32. There these problems do not exist.

You could of course rerip all you discs or use a WBFS Manager to copy all games to another drive and back again.
But this will need a LOT of patience in the first case or free space on your PC and still a lot of time in the second.

Instead we will convert the drive directly, without copying all of its data, yet still retaining all games.
This is also known as "in place" conversion, and common in other filesystems (see eg. "Partition Magic")
The fact that most data remains untouched makes this process ridiculously fast, compared to other methods.
I converted a full 50GiB drive in 4.2 seconds. Thats over 10GiB/s!

While this tutorial will convert WBFS to FAT32, other filesystems are available from there.
Windows for example can already do FAT to NTFS without losing data (search for "convert" in Windows Help (F1))


2. Tutorial
I suggest you first read this tutorial completely, then ask any questions and only then go ahead and do it.

2.1 The Requirements
First you will need some programs:
The converter itself is called "wbfs2fat" and available here http://gbatemp.net/t291320-wbfs2fat.py
It will run under Windows and Linux (and possibly more).

For Windows there is a pre packaged wbfs2fat.exe with everything you need.

On Linux you are probably already good too. The only things needed are "python 2.x" and "sudo". Both are installed by default in many distributions.
To run the GUI you will need "pyqt4" too. If you miss one of them, open you package manager and search for them. They will be in there. Ask around if you don***8217;t find them.

Alternative the the .exe you can run the .py file on Windows too. Both native Python and Cygwin's are supported.
But I think that's only interesting if you want to dig into the code. Additional requirements for doing this are listed in the "readme.txt".

While not strictly a requirement I strongly suggest you get wiimms wwt+wit.
Its used for most of the optional parts of this tutorial.

I suggest you now use "wwt" to check the drive for any filesystem errors (option "CHECK" and if you have time "VERIFY" too).
I prefer using it but other WBFS Managers might offer that too.
Additionally you might want to copy "that game the dog ate" on you PC just to be absolutely sure.


2.2 GUI
Simply run wbfs2fat without any parameters or with "--mode gui". The other parameters are supported too (see CLI if you want)

You get a window which lists all detected partitions.

Depending on system setup you might need to do it as administrator/root. Access denied errors here on are a sign of this.
To do this e.g.. right click the icon and select "run as administrator" or use "sudo" on Linux.

If the partition you want to convert is missing you can type its path into the "device" line and click "scan"

Select the one you want to convert by clicking on it and click the "convert to Fat32" button.

Now you can adjust some options. The defaults should do fine but feel free to change them.

Click OK when you are done.

Wait a few seconds for it to complete. It will report its progress and any anomalies as it goes.
Check its output carefully for any errors.

Once you see "W2F: Conversion completed" its done. Click "Close".


2.3 CLI
Alternative to the graphical one there is a command line interface too.

Run "./wbfs2fat.py --mode scan" to get a list of all WBFS partitions.
If you only get "permission denied" try running it as administrator, or on Linux run "sudo ./wbfs2fat.py --mode scan" instead.
It will give you a line for each WBFS partition, consisting of a device identifier, its size and the number of games on it.
Find the device name for the partition you want. For example "/dev/sdc2".
If your partition is listed twice, once without number, and once with a "1", just use the one without. That's a slight oddity in cygwin.

To see what additional options are available run "./wbfs2fat.py --help"
Under cygwin and linux you will want to use the respective renaming option. Under non-cygwin windows that***8217;s not neccessary.
Normally the backup if created in the current directory but there's an option to select another dir.

To convert the partition run "./wbfs2fat.py --mode convert <dev> " along with any other options you want.
<dev> is the device name for the WBFS partition in question. For example running "./wbfs2fat.py --mode convert /dev/sdc1 -b /cygdrive/d/ -l e" will
***8226;convert the partition /dev/sdc1
***8226;make a backup in /cygdrive/d/ (which is D:\)
***8226;rename the files using the drive letter e (as in E:\)

Wait a few seconds for it to complete. It will report its progress and any anomalies as it goes.
Check its output carefully for any errors.


2.4 Finishing Touches
Once it is run through the partition is FAT32 and can be accessed normally.
Before you go ahead I suggest running all checks you like against it NOW.
That is because using the drive normally can overwrite parts anywhere on the drive. Including parts not in the backup.
That is just normal operation and not a problem per se, but it will make the backup invalid.
Some suggestions are chkdsk, fsck.vfat, the windows filesystem check (in the rightclick menu of the drive letter),...
You can check the games too, for example using "wit"s "VERIFY" function.

I advise against letting these tools "repair" anything, instead it is better to restore the backup.
Excepted from this rule is the uninitialized free cluster summary.
It is expected and can be fixed without repercussions, it's not really an error in the first place.

The games will be stored as .wbfs files splitted by ~4GiB.
They are inside a folder named wbfs in the root of the drive and are named ID6.wbfs (e.g. "E:\wbfs\RSPDS.wbfs").
Well if you enable the automatic renaming that is. If not you will have to do it manually.
Create the folder, move them, and rename *.0 to*.wbfs, *.1 to wbf1, *.2 to *.wbf2 and so on.

That's it, you are done. Close cygwin/the console and try it on your wii. Don't forget to unmount/eject it normally.


3. The Backup
During execution a line will be printed saying "WARNING: start of dangerous part"
This line only means that the first write has occurred. Any crash, abort or whatever before that did not change the drive AT ALL.
While they cause no further harm they might indicate a larger problem. I suggest you ask for advice (e.g. here on GBAtemp).

To recover from a crash during the dangerous part a backup is created.
It contains everything that was overwritten in the process (only some megabytes anyway).

But it does not contain what eg your later deleting/creating of files did change.
It is only intended in case wbfs2fat fails, not for later. There is simply no way to foresee which games you might delete manually.
Restoring a backup later will cause massive data loss. Especially after things that move data around like defrag.
But when used before writing to the partition with other tools it carries no risk.

The backup function is the most tested part of the program. That's because it allows rapid resets too.
Copying its 6MiB back is A LOT faster than creating and filling a new 50GiB WBFS partition for each test.

To restore the Backup simply use the "restore Backup" button in the GUI or the "--restore=BACKUP" CLI option.
By default the Backups are located in the folder from where you ran wbfs2fat and named "wbfs.DEVICE.TIMESTAMP.back".

The backup is a complete image of the first N blocks of the drive, where N is whatever was needed to contain the FAT metadata.
Thus it can be restored easily using the image tool of your choice too.
For example using "dd if=<backup_file> of=<device>" (dd is available in cygwin and most Linux Distributions by default)


4. Space
The conversion requires some free space (it's checked automatically).
It will need approximatively 0.02% (2MiB per 10GiB) of the partition size plus one WBFS Block per game.
Once the partition is converted you can gain space back by scrubbing the games again (should net a gain on big partitions)
My suggestion is to use e.g. "wit CONVERT -Bz E:\wbfs\" but maybe other manager can do that to.
You can of course skip or postpone this step. In fact I suggest waiting, because it of course writes data (see "The Backup).


5. Where to go from here
Now that your drive is FAT32 you can manipulate it by a variety of tools.
These Tools include Partition Magic, Parted Magic, "convert" and others.
Using the internet you should find everything you need.

Functions seen in better partitioning tools include:
***8226;resizing of partitions without losing data
***8226;joining/merging of two partitions into one that contains the files and space of both
***8226;splitting of one partition into two while dividing the files and space between them as you like
***8226;changing the filesystem again (e.g. NTFS) without losing data.

If you only want to go on to NTFS, Windows has everything you need.
It can already change a partition from FAT to NTFS without losing data.
The tool is named "convert" and runs from the Windows Command console("cmd").
Search Windows Help (F1) for a detailed explanation of "convert".

psy42
29th September, 2011, 09:01 PM
please note that someone posted this app & tutorial without permission
if permission were asked it would probably granted with minor things required (proper attribution, link for updates,...)
it is explicitly stated that no one is allowed to host this without permission
he not only gave no attribution at all but instead simply changed the links to hide its origin

see
wbfs2fat.py - GBAtemp.net (http://gbatemp.net/t291320-wbfs2fat.py)
How to convert from WBFS to FAT32 or NTFS - GBAtemp.net (http://gbatemp.net/t292391-how-to-convert-from-wbfs-to-fat32-or-ntfs)

happy_highlander
29th September, 2011, 09:18 PM
please note that some idiotic stealing asshole posted this app & tutorial without permission
i
diotic because if permission were asked it would probably granted with minor things required (proper attribution, link for updates,...)
stealing because it is explicitly stated that no one is allowed to host this without permission
asshole because he not only gave no attribution at all but instead simply changed the links to hide its origin

see
wbfs2fat.py - GBAtemp.net (http://gbatemp.net/t291320-wbfs2fat.py)
How to convert from WBFS to FAT32 or NTFS - GBAtemp.net (http://gbatemp.net/t292391-how-to-convert-from-wbfs-to-fat32-or-ntfs)

I understand that you may be a bit upset but if you didn't want to share the info why did you post it on the internet in the first place

psy42
29th September, 2011, 09:40 PM
I understand that you may be a bit upset but if you didn't want to share the info why did you post it on the internet in the first place

I am totally OK with sharing it.
That's why I wrote it in the first place.
I am not OK with someone plagiarising it.

If he mentioned who wrote this and included a link to the occasionally updated original it would have been OK with me.

I simply can't let everything pass uncommented even if it will probably change nothing.

andy91
29th September, 2011, 09:51 PM
I am totally OK with sharing it.
That's why I wrote it in the first place.
I am not OK with assholes plagiarising it.

If he mentioned who wrote this and included a link to the occasionally updated original it would have been OK with me.

I simply can't let everything pass uncommented even if it will probably change nothing.

Calling someone an arsehole is going a bit far in my book.
Did you actually find this yourself or did you rape it off the web?
Not all of us are trend setters and most info on the web comes from the one author so chill out mate,if you posted something people will find it.simples:)

Andy.

happy_highlander
29th September, 2011, 10:00 PM
I am totally OK with sharing it.
That's why I wrote it in the first place.
I am not OK with assholes plagiarising it.

If he mentioned who wrote this and included a link to the occasionally updated original it would have been OK with me.

I simply can't let everything pass uncommented even if it will probably change nothing.

If you are upset because someone copied a tutorial that you took the time to write you are more than welcome to copy one of mine in return......The more people that see it the more people it will have helped, makes no difference who wrote it as long it gets out there and stops unnecessary headaches and endless hours of searching

ck-ok
29th September, 2011, 10:29 PM
please note that some idiotic stealing asshole posted this app & tutorial without permission
i
diotic because if permission were asked it would probably granted with minor things required (proper attribution, link for updates,...)
stealing because it is explicitly stated that no one is allowed to host this without permission
asshole because he not only gave no attribution at all but instead simply changed the links to hide its origin

see
wbfs2fat.py - GBAtemp.net (http://gbatemp.net/t291320-wbfs2fat.py)
How to convert from WBFS to FAT32 or NTFS - GBAtemp.net (http://gbatemp.net/t292391-how-to-convert-from-wbfs-to-fat32-or-ntfs)

very sorry psy42 i wasn't trying to steal your thunder i just used this program and thought it was something other members on this forum would like.i didn't read the section for the mentally challenged so didn't see the part about not hosting your program on other forums.
iv'e deleted the program from dk's download section and credited you as the author in the thread.
i belatedly would like to have your permission to keep your hard work on this forum and link your download.

psy42
29th September, 2011, 11:13 PM
permission granted with some exceptions (basically the stuff mentions in the previous posts)
will update original thread (gbatemp) with details
but it seems ok now

ck-ok
29th September, 2011, 11:16 PM
permission granted with some exceptions (basically the stuff mentions in the previous posts)
will update original thread (gbatemp) with details
but it seems ok now

thanks keep up the hard work.

ck-ok
1st May, 2012, 08:38 PM
just used this to convert my friends 1tb hard drive from wbfs to fat32 worked a treat dead easy and took about 3-4 mins