Hi. I accidentally formated my Haiku partition, using Gparted. There are some way to recover my files? (I guess no, but just in case… )
What kind of files are you trying to recover? Most data recovery tools work by searching for patterns, but it will probably be hard to find one that supports BeFS on-disk structures.
Try “BFS-tools”, if they work on Haiku.
http://www.pinc-software.de/docs/BFS-tools.html#intro
http://www.pinc-software.de/en_frames.html (ver. 0.7.6)
On BeShare or in some torrents you can find ver. 0.7.8
If nothing else helps …i would try tesdisk… i kind of supports BFS (also i only tried with recovering partitinon maps).
It also supports scanning for files… wich are deleted…
There is a newer version of the BFS tools in Haiku sources. You need to compile it yourself, but it has 64-bit support, and that makes it work better with large disks (last time I needed it, the 32bit version woudl run out of memory for me).
That’s great news.
But why it not in repository, is there some problems with it?
I was (to my knowledge) the only one to test the 64bit version, and no one made a package for it yet.
Actually formatted? If you’ve only deleted the partition you might well be able to recreate the partition in the same place it was previously and all will be well… this has worked for me in the past (not sure if that was bfs though).
How would one go about making a package of something that’s in the Haiku trunk?
Or would that only work when outsourcing it? Maybe @axeld would like to move it into his own github, or put it into HaikuArchives.
Are there hints as to reasons for the “running-out-of-memory” issue with the 32-bit version of BFS tools in your case?
Just wondering if this may be related to the size of the targeted disk or some pre-defined sizes for key data structures?
Regarding packages: we can do it from inside Haiku tree (look at WebPositive for example).
Regarding the out of memory problem: the problem is that the bfs recover tool needs to build an index of various things to keep track for recovery. It builds that index in RAM, and in my case it couldn’t fit in 2GB because this was a disk with ridiculously high amount of small files (WebKit sources + testsuite, Haiku sources, many other sourcecodes).
It would be possible to save this index in a temporary file instead, but I don’t think it is worth the effort, and it would make the tool a lot slower. Maybe axel has some other ideas on how to fix the problem.
Jam will always be mysterious to me… Is all that’s needed a jammy file like /Source-Haiku/haiku/build/jam/packages/BFStools
:
local architecture = $(TARGET_PACKAGING_ARCH) ;
local BFStoolsPackage = bfs_tools.hpkg ;
HaikuPackage $(BFStoolsPackage) ;
# libs
local BFStoolsLib = libbfs_tools.a ;
AddLibrariesToPackage lib : $(BFStoolsLib) ;
# bin
AddFilesToPackage bin : bfsinfo ;
AddFilesToPackage bin : bfswhich ;
AddFilesToPackage bin : chkindex ;
AddFilesToPackage bin : recover ;
BuildHaikuPackage $(BFStoolsPackage) : bfs_tools ;
I bet there’s a dozen errors in that… How can I test it?
Thanks to everyone for your help. I’m trying to recover the files with the ‘recover’ app from the BFS-tools.
I will update the results when finish. Cross your fingers
Bad luck. I tried with the recover app, but didn’t found anything:
~/Desktop/BFS-tools> recover -r /unnamed\ volume/
Copyright © 2001-2004 pinc Software.
Disk size 41232105472 bytes, 38.40 GB
Scanning Disk from 0 to 41232105472
41231974400, 38.40 GB
Couldn’t find any BFS super blocks!
Could not open device or file: Initialization failed
~/Desktop/BFS-tools>
It seems you need to add it to build/jam/HaikuPackages.
Then, just build it like any other target: “jam -q BFStools” ?
Maybe adding it to the HaikuPackages isn’t enough. I get a:
don’t know how to make BFStools
…patience…
…found 1 target(s)…
…can’t find 1 target(s)…
Also possible that the BFStools definition I cobbled together is totally bogus…