Score:0

carve bzip2 using foremost

us flag

i have a corrupted drive and need to recover the archive files from it. I already successfully used foremost to recover the pdf files.

foremost -t pdf -i /dev/sda -o /tmp/foremost/pdf

however i now want to recover .bz2 from the drive

foremost -t bz -i /dev/sda -o /tmp/foremost/arc

This is not working. I probably need a custom conf file to extract theses file types. How would I create such an conf file? Is there some documentation for it?

cn flag
Manual states `-c - set configuration file to use (defaults to foremost.conf)` so look for foremost.conf But I doubt the filetypes need a conf. Seems illogical to have a -t option for a fi;etype =and= a method in a conf.
hr flag
tar,bz,gz do not seem to be in the built-in signature set. The documentation for the config file is in `/usr/share/doc/foremost/README.gz`, the format appears to be shared with `scalpel` (a fork of `foremost`?) so you may get some hits for that - for example https://www.garykessler.net/software/index.html#filesigs which appears to contain a compatible `scalpel_GCK.conf` file. Good luck and please let us know if it works.
jan-seins avatar
us flag
thanks for the hint. i downloaded the scalpel conf from the provided link. However that did not work for bz2. which is the most important format for me. However, i created my own conf since bz2 alway has the same header b"BZh". The problem now is that i cannot add a footer, since the bz2 footer does not have a consistent byte representation for the footer but only a bit respresentation. So im still working on it and will post my answer as soon as it works consistently
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.