LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2020, 04:03 AM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
foremost not finding anything


I'm running centos 6 on a vps and I deleted a very important folder containing a website. So I tried foremost but the program isn't finding a single thing. From what I gather I need to specify the partition to search on. If I run cat /proc/partitions I get nothing. so I did df-h and that shows:
Quote:
Filesystem Size Used Avail Use% Mounted on
/dev/simfs 15G 9.1G 6.0G 61% /
none 384M 4.0K 384M 1% /dev
none 384M 164K 384M 1% /dev/shm
I know the partition I need is is /dev/simfs. I managed to install foremost-1.5.7-1.el6.rf.x86_64 and ran it but this is the output I get:
Quote:
[root@vps ~]# foremost -a -t jpg,html -i /dev/simfs -v
Foremost version 1.5.7 by Jesse Kornblum, Kris Kendall, and Nick Mikus
Audit File

Foremost started at Fri Nov 6 09:28:56 2020
Invocation: foremost -a -t jpg,html -i /dev/simfs -v
Output directory: /root/output
Configuration file: /usr/local/etc/foremost.conf
Processing: stdin
|------------------------------------------------------------------
File: stdin
Start: Fri Nov 6 09:28:56 2020
Length: Unknown

Num Name (bs=512) Size File Offset Comment
the program just sits there doing nothing. there's a ton of stuff i just deleted (along with the folder I shouldn't have deleted) so it should be finding lots of things. thanks for any help.
 
Old 11-07-2020, 02:55 PM   #2
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
bump
anyone?
please?
 
Old 11-07-2020, 08:29 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
You could download the source from sourceforge and compile it with the DEBUG flag to get more output.

You could also use strace to see what system calls the program issues.

I don't know if you can download a copy of this root disk. If it's possible, run foremost on that copy to avoid loss of data.

Last edited by berndbausch; 11-07-2020 at 08:31 PM.
 
Old 11-07-2020, 11:59 PM   #4
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
Quote:
Originally Posted by https://linux.die.net/man/1/foremost
-i file
The file is used as the input file. If no input file is specified or the input file cannot be read then stdin is used.
You should use code tags for output, not quote.
 
Old 11-08-2020, 12:55 AM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
thanks but I can't make a disk copy, this is a vps.
I don't see how compiling from source would help, if I have the program I have the program.
is my command wrong in some way?
I don't get this. why does the program just sit there and not do anything?
 
Old 11-08-2020, 01:16 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by tonj View Post
thanks but I can't make a disk copy, this is a vps.
I don't see how compiling from source would help, if I have the program I have the program.
is my command wrong in some way?
I don't get this. why does the program just sit there and not do anything?
Compiling from source enables you to switch on debug output.
 
Old 11-08-2020, 01:22 AM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,796

Rep: Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201Reputation: 1201
Quote:
File: stdin
Means it runs on stdin.
It should say
Quote:
File: /dev/simfs
Ensure it can open it i.e. be root!
Check your invocation options!
What is -a and -v ?
Perhaps it is just
Code:
foremost -t jpg,htm -i /dev/simfs

Last edited by MadeInGermany; 11-08-2020 at 01:24 AM. Reason: html or htm?
 
Old 11-08-2020, 01:57 AM   #8
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
my command does say /dev/simfs
I am running as root
foremost -t jpg -i /dev/simfs doesn't do anything. the cursor just drops to the next line and sits there doing nothing.
thanks for your input here.
 
Old 11-08-2020, 08:09 AM   #9
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,602

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546
Quote:
Originally Posted by tonj View Post
the cursor just drops to the next line and sits there doing nothing.
It isn't doing nothing, it's waiting for input from stdin - as identified by the lines "Processing: stdin" and "File: stdin" in the output you posted in post #1.

In post #4 descendant_command quoted the relevant part of the manual to explain this behaviour:
Quote:
-i file
The file is used as the input file. If no input file is specified or the input file cannot be read then stdin is used.
Enabling debug mode may well tell you why Foremost cannot read the file.

 
Old 11-08-2020, 08:35 AM   #10
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
as I understand it foremost doesn't come with a debug option
 
Old 11-08-2020, 08:49 AM   #11
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,602

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546

As per post #3, if you compile with DEBUG flag, you will enable over a hundred "ifdef DEBUG" blocks in the Foremost source code, which will enable things like:
Code:
#ifdef DEBUG
			printf("\n	Invalid directory type\n");
			printf("type:=%c size:=%lu \n", dir->type, dir->size);
#endif
There may also be useful information gleaned with strace, again as noted in post #3.

 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Make problem with installing foremost me! Linux - Software 9 08-25-2006 10:38 AM
Make problem with installing foremost me! Linux - Software 5 07-24-2006 06:49 AM
Recovering Data Using Foremost and Knoppix Nuvious Linux - Security 1 05-17-2006 04:36 PM
Recoveing Data Using Foremost and Knoppix Nuvious Linux - Software 1 05-17-2006 08:54 AM
LXer: Foremost for Data Recovery LXer Syndicated Linux News 0 12-23-2005 12:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration