Hacking WBFUSE (WBFS for FUSE)

  • Thread starter Thread starter torito21
  • Start date Start date
  • Views Views 69,598
  • Replies Replies 91
Tried it out, but don't get it to mount my partition properly. This is what I get:

./wbfuse /dev/sdc1 testwbfs
Initializing WBFS Partition...
ERROR: Invalid WBFS partition.

./wbfuse /dev/sdc testwbfs
Initializing WBFS Partition...
hd num sector doesn't match: Success

Also tried it with sudo (just for the case), but that didn't help me either. The wbfs-tool as well as the Wii itself find the HDD without any problems:

wbfs -p /dev/sdc1 ls
using /dev/sdc
RM3P01 Metroid Prime 3: Corruption 4.09G
ROBPPL Obscure 2 3.58G
[...]

Any idea?
 
Cypherdias said:
Tried it out, but don't get it to mount my partition properly. This is what I get:

./wbfuse /dev/sdc1 testwbfs
Initializing WBFS Partition...
ERROR: Invalid WBFS partition.
Any idea?

You need root privileges. Try "sudo adduser username disk", then reboot and mount it normally without sudo.
 
Looks great. I'm a GNU/Linux user so I can take advantage of this. It's a real shame about the limitation concerning file sizes though, as madhutter says, it heavily decreases the number of games that can be stored using it.
 
Version 0.7 released.

Changelog:
* Several bugs fixed.
* 64 bits support.

Includes the original wbfs app ported to 64 bits.

Download links on the first post.
 
At least this can get the png images onto the drive - id like to see all PNG images stored next to the ISO so that the loaders can read the images from the drives instead of the SD cards - this is a start
 
torito21 said:
Version 0.7 released.

Thank for your development. Now I can easy manage my wbfs. This program is very great. If this program can execute in window, I think it will be wonderful!!

I can't compile the version 0.7 in my linux (SLAMD64). I get some error message show as below:

Code:
gcc -Wall -W -Ilibwbfs -I. -DLARGE_FILES -D_FILE_OFFSET_BITS=64 -c wbfuse.c -o wbfuse.o 
wbfuse.c:235: warning: unused parameter 'data'
wbfuse.c:250: warning: unused parameter 'path'
wbfuse.c:309: warning: unused parameter 'offset'
wbfuse.c:309: warning: unused parameter 'fi'
wbfuse.c:335: warning: unused parameter 'fi'
wbfuse.c:360: warning: unused parameter 'mode'
wbfuse.c:360: warning: unused parameter 'dev'
wbfuse.c:400: warning: unused parameter 'fi'
wbfuse.c:428: warning: unused parameter 'fi'
wbfuse.c:497: warning: unused parameter 'path'
wbfuse.c:497: warning: unused parameter 'd'
wbfuse.c:497: warning: unused parameter 'fi'
wbfuse.c:505: warning: unused parameter 'fi'
wbfuse.c: In function 'main':
wbfuse.c:697: error: 'struct fuse_operations_compat2' has no member named 'readdir'
wbfuse.c:698: warning: assignment from incompatible pointer type
wbfuse.c:699: warning: assignment from incompatible pointer type
wbfuse.c:700: warning: assignment from incompatible pointer type
wbfuse.c:701: warning: assignment from incompatible pointer type
wbfuse.c:702: error: 'struct fuse_operations_compat2' has no member named 'destroy'
wbfuse.c:704: warning: assignment from incompatible pointer type
wbfuse.c:705: warning: assignment from incompatible pointer type
wbfuse.c:725: error: too many arguments to function 'fuse_main_compat2'
wbfuse.c:666: warning: unused variable 'usr_options'
wbfuse.c:665: warning: unused variable 'opt'
make: *** [wbfuse.o] Error 1

First I add "#define FUSE_USE_VERSION 26" into the "wbfuse.c". I will get other error message show as below:

CODEgcc -Wall -W -Ilibwbfs -I. -static wbfuse.o tools.o bn.o ec.o disc_usage_table.o libwbfs.o libwbfs_linux.o wiidisc.o rijndael.o -lcrypto -lfuse -lpthread -ldl -lrt -o wbfuse
/usr/lib64/gcc/x86_64-slamd64-linux/4.2.4/../../../../lib64/libfuse.a(fuse.o): In function `fuse_load_so_name':
/mnt/data/Download/Linux/myLinux/Base/file_system/fuse-2.7.4/lib/fuse.c:165: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/lib64/gcc/x86_64-slamd64-linux/4.2.4/../../../../lib64/libpthread.a(pthread_cond_timedwait.o): In function `pthread_cond_timedwait':
(.text+0xa7): undefined reference to `__vdso_clock_gettime'
collect2: ld returned 1 exit status
make: *** [wbfuse] Error 1

Second I remove "LDFLAGS = -static" in the makefile. Then I can compile it and execute it.

Could I remove "LDFLAGS = -static" in the makefile?
 
proms said:
Second I remove "LDFLAGS = -static" in the makefile. Then I can compile it and execute it.

Could I remove "LDFLAGS = -static" in the makefile?

Your problem can be fixed changing #define FUSE_USE_VERSION 21 to #define FUSE_USE_VERSION 26 in /usr/include/fuse/fuse.h .
I don't know why fuse uses the old api by default. :S

But, don't worry, the dynamic compilation (-static flag removed) should work ok too.
 
torito21 said:
Your problem can be fixed changing #define FUSE_USE_VERSION 21 to #define FUSE_USE_VERSION 26 in /usr/include/fuse/fuse.h .
I don't know why fuse uses the old api by default. :S

But, don't worry, the dynamic compilation (-static flag removed) should work ok too.

Thank for your reply!

When I don't give any parameter to wbfuse, I will get a error message.

Code:
bash-3.1# ./wbfuse
Initializing WBFS Partition...
????????? (segmentation fault)

Would you please change below source code in wbfuse.c?
CODEÂÂÂÂprintf("Initializing WBFS Partition...\n");
ÂÂÂÂint back = initFuseWbfs(argv[1]);
ÂÂÂÂif (back) {
ÂÂÂÂÂÂÂÂprintf("ERROR: Invalid WBFS partition.\n");
ÂÂÂÂÂÂÂÂreturn -1;
ÂÂÂÂ}
ÂÂÂÂprintf("OK\n");
ÂÂÂÂ/*ÂÂÂÂOptionsÂÂÂÂ */
ÂÂÂÂ
ÂÂÂÂif (argc
 
When I terminate to copy a image, I will get some strange file in the target partition.

QUOTE said:
bash-3.1# ls -al
?? 4
drw-rw-rw- 2 root root 0 2006-12-08 08:00 .
drwxr-xr-x 16 root root 4096 2009-04-12 03:03 ..
-rw-rw-rw- 1 root root 524288000 2006-12-08 08:00 Let'sTAP [R2UJ8P].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
-rw-rw-rw- 1 root root 2122317824 2006-12-08 08:00 SpongeBob06 [RQ4E78].iso
 
Version 0.8 released.

Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).

Thanks for the bug reports.

About the mac port... I don't have a Mac xD
 
torito21 said:
Version 0.8 released.

Changelog:
* Minor bug fixes.
* Added an option to scrub images (-s option)
* Added an option to scrub previously written to the partition (rename to "scrub"(without quotes)).

Thanks for the bug reports.

About the mac port... I don't have a Mac xD

Please add the delete corruption issue fix:

http://gbatemp.net/index.php?showtopic=147969&st=0
 
Thank you for the hard work and Linux support, this makes me happy
wink.gif
 
Hello!
Tried out your nice tool.
After setting the FUSE_USE_VERSION flag it compiled great on Jaunty 9.04
smile.gif

Just added a little udev rule and it gets mounted on the fly when I plugin the drive.

Thanks a lot !
 
Hi,

Firstly, thanks for your great work, it is very useful and so more intuitive than any "GUI" or command line tool (even if, as a Linux user, command line is not a problem
wink.gif
).

But (sorry, there is a "but"), I found a bug.

I explain you all I made and the context :

Distribution : Fedora Core 9.
WBFuse version used : "wbfuse_0_8_2b_i386"
Installation :
- All binaries are owned by root.
- I set the SUID on the binaries (root #> chmod u+s *)
-----------------------------------------------------------------------
Mount command used : ./wbfuse /dev/sdb1 $HOME/wbfs_part
Initializing WBFS Partition...
Number of files found: 2
OK
Image scrubbing enabled (all partitions).
Wii ISO found: Call of Duty (Wii) UK/FR [RVYP52].iso
Wii ISO found: Okami [ROWP08].iso
-----------------------------------------------------------------------

But when I make :

-----------------------------------------------------------------------
ls -l ~/wbfs_part
ls: ne peut accéder /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: Aucun fichier ou dossier de ce type
total 0
-????????? ? ? ? ? ? Call of Duty (Wii) UK/FR [RVYP52].iso
-rw-rw-rw- 1 me me 4699979776 déc 8 2006 Okami [ROWP08].iso
-----------------------------------------------------------------------

The error message could be translated as :
ls: cannot access /home/me/wbfs_part/Call of Duty (Wii) UK/FR [RVYP52].iso: No such file or directory
The file does not appear in nautilus.

Is it due to the game name ?
I use my external hdd on my Wii with USB Loader v1.1 and this game is found and can be launched without problems.

I will try to have a look at your code but if you can try to fix this, would be great
wink.gif


One more time, thanks a lot for your work.

derek.mf
 

Site & Scene News

Popular threads in this forum