f3 icon indicating copy to clipboard operation
f3 copied to clipboard

Porting f3probe and f3fix to other platforms

Open tristan-k opened this issue 10 years ago • 20 comments

When will f3probe and f3fix be available for mac?

tristan-k avatar Jan 04 '15 13:01 tristan-k

Non-Linux developers, please step in.

I'm a Linux-only developer.

AltraMayor avatar Jan 04 '15 14:01 AltraMayor

While we're at it, I wonder if anyone could do something similar for android. Where I live, many people don't have access to desktop computers.

thedod avatar Jan 06 '15 09:01 thedod

Actually I had no problems compiling it for OS X Yosemite. I am using macports.

yozik04 avatar Jan 23 '15 10:01 yozik04

Hi @yozik04,

Could you document the steps you followed? It'll help other Mac users.

AltraMayor avatar Jan 23 '15 14:01 AltraMayor

Nothing specific:

  • git clone https://github.com/AltraMayor/f3.git
  • cd f3
  • make
  • ./f3read ...

Ahh. You were asking about experimental features. I got it wrong. No I do not have solution for that. Sorry...

I get error on make experimental

cc -std=c99 -Wall -Wextra -pedantic -MMD -ggdb   -c -o libdevs.o libdevs.c
libdevs.c:19:10: fatal error: 'linux/fs.h' file not found
#include <linux/fs.h>

yozik04 avatar Jan 23 '15 14:01 yozik04

Looking at http://www.manpages.info/macosx/fs.5.html it seems there should be a ufs/fs.h but I doubt it's compatible.

Looks like one OS X application included linux/fs.h: https://github.com/sv99/dosfstools-osx/blob/master/include/linux/fs.h . Perhaps you can try doing the same.

qubodup avatar Feb 07 '15 01:02 qubodup

In last version of Fedora I can make extra without error but after make install I only have f3write and f3read, anybody can help me?

Casporro avatar Apr 16 '16 00:04 Casporro

make install only installs f3write and f3read. Use make install-extra for the extra applications.

AltraMayor avatar Apr 19 '16 12:04 AltraMayor

Just for information, I created a f3 port for MacPorts: for the standard f3 tools: https://trac.macports.org/browser/trunk/dports/sysutils/f3/Portfile

So if you have MacPorts, installing f3 is now as easy as calling "ports install f3".

I didn't look into the experimental and extra tools though.

ocroquette avatar Oct 28 '16 17:10 ocroquette

Hi @ocroquette,

Thank you for the contribution! If you want to issue a pull request to update the README file with the news, I'll quickly merge it.

AltraMayor avatar Oct 28 '16 17:10 AltraMayor

Sure, here you go: https://github.com/ocroquette/f3/pull/1

ocroquette avatar Oct 28 '16 18:10 ocroquette

Hi @ocroquette,

The changes you've made to the README file are great, but the pull request you issued is against your own repository, not mine. Could you reissue the pull request against my repository, so I can merge it?

AltraMayor avatar Oct 28 '16 19:10 AltraMayor

Ups, sorry, I hope I did it right this time: https://github.com/AltraMayor/f3/pull/54

ocroquette avatar Oct 28 '16 19:10 ocroquette

Merged. Thank you, @ocroquette!

AltraMayor avatar Oct 28 '16 19:10 AltraMayor

I've written a quick hack in Python that fills flash drive with data - https://github.com/techtonik/discovery/blob/master/disk/check/h2test.py - it is public domain, so maybe it will inspire somebody for alternative implementation.

techtonik avatar Aug 05 '17 06:08 techtonik

Forget it. I just realized that f3fix and f3probe is not f3write.

techtonik avatar Aug 05 '17 06:08 techtonik

forgive my ignorance, but isn't it as simple as writing to the /dev/disk device until you hit the end of file and then read and compare?

silicontrip avatar Jul 10 '18 03:07 silicontrip

If f3probe did that, it wouldn't be as fast as it is. The algorithm of f3probe isn't straightforward, but you can think of it as a game in which f3probe asks a lot of questions of the drive to see if the drive gives an answer that is inconsistent with the previous answers.

AltraMayor avatar Jul 10 '18 11:07 AltraMayor

Very bad it's not possible to install f3prob et f3fix on Mac OS X. I try to fix with f3write and fread keeping bad files and hiddening. But there is much space lost and it doesn't work very well. If somebody have solution, i'm very interested because i bought 20 stick USB 64 Go in FOREST USB and they have all errors with very bad chipset or memory. It's necessary to fix bad clusters. So when i want install extra i have : $ make install-extra cc -std=c99 -Wall -Wextra -pedantic -MMD -ggdb -I/usr/local/include -c -o libdevs.o libdevs.c libdevs.c:19:10: fatal error: 'linux/fs.h' file not found #include <linux/fs.h> ^ 1 error generated. make: *** [libdevs.o] Error 1

So how is it possible to have missing fs.h and where is that file waited ? Thank you for help.

Pierre29200 avatar Feb 05 '20 05:02 Pierre29200

Not a fix, but you can always install Debian or some other supported OS in a VM on Mac. That's what I ended up doing, and it worked well.

adriel avatar Feb 05 '20 05:02 adriel