LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-27-2008, 08:40 PM   #1
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Semi-vague Forensics help, DD, FS Header/Footer and Some Comic Timing With HDD Death


Okay, as the subject suggests I'm struggling with some simple forensic type stuff. First, a little background.

So its christmas, and for a little extra cash I'm working on an old school friend's external hard drive, the usual data recovery and transfer. The people at either his company or University tech desk couldn't help him, but that meant nothing to me so I jump in.

Very simple problem, the disk has just started to die, essentially, the disk's SMART stuff is screaming at me, files taking too long to read, etc., so I use

Code:
# dd if=/dev/sdc of=/backup/hdd.dump
to make a dump. This is pretty standard stuff. The problem is that 130gig into about 200gig of data, the disk goes kersplunk. We're talking the full set of funny clicks, not showing up, funny smells etc.

So I do my best, tell the guy I could only recover 130gig, use
Code:
# dd if=/backup/hdd.dump of=/dev/sdd
to put it on the new one.

Only thing is, not recognised properly. So have I either tried to use dd in a context where something better should have been used? Have I lost valuable information I needed in the last part of the filesystem? And if so, where can I find this? Is there a tool similar to diff that will handle hex files? I'm trying to work out similarities at the start and end of the file systems, but of course with binary files, you get the ever so helpful
Code:
jc@jcbroom:~/systems$ diff fat32-1.log fat32-2.log
Binary files fat32-1.log and fat32-2.log differ

Thanks a lot, any help appreciated
 
Old 12-27-2008, 09:49 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
http://docs.freebsd.org/info/diff/diff.info.Binary.html
... diff on binary files, you can force diff to treat them as text, but the line-by-line comparison is usually meaningless.

http://ubuntuforums.org/archive/index.php/t-346238.html
... hex comparitors

But you may like this one better:
http://linuxappfinder.com/package/vbindiff

It sounds like you have an incomplete dd image there.
You really need to run forensics tools on the resulting file.
http://www.forensicswiki.org/wiki/Linux
 
Old 12-29-2008, 10:59 AM   #3
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Original Poster
Rep: Reputation: 70
Thats fantastic, off the top of your head, could you recommend any specific tool? I've only ever used foremost, but as I remember, it is limited to about 2 or 3 gig files. Would scalpel do the trick? Or is that limited too?

Cheers
 
Old 12-29-2008, 11:45 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by jamescondron View Post
Thats fantastic, off the top of your head, could you recommend any specific tool? I've only ever used foremost, but as I remember, it is limited to about 2 or 3 gig files. Would scalpel do the trick? Or is that limited too?

Cheers
From the head to the scaple.conf file:
Quote:
# Scalpel configuration file

# This configuration file controls the
# types and sizes of files that are carved by Scalpel. Currently,
# Scalpel can read Foremost 0.69 configuration files, but Scalpel
# configuration files may not be backwards-compatible with Foremost.
# In particular, maximum file carve size under Foremost 0.69 is 4GB,
# while in the current version of Scalpel, it's 16EB (16 exabytes).
Can you mount the image file you created rather than the disk to which you moved the image? (My thought is that the partition table in the image may not be compatible with the geometry of the HD to which you copied it.)
 
Old 12-29-2008, 01:12 PM   #5
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by jamescondron View Post
Thats fantastic, off the top of your head, could you recommend any specific tool? I've only ever used foremost, but as I remember, it is limited to about 2 or 3 gig files. Would scalpel do the trick? Or is that limited too?

Cheers
If you're using ext3 I highly recommend ext3grep. It's fairly new, far from perfect, but its quite impressive (if you're using ext3).

Also remember you don't need to actually dd the file out to a new drive, you can just mount the file itself as loopback.

I also recommend you make a backup of the actual dump to work with, nothing like having your image becoming corrupt while you're working on it.

Last edited by rweaver; 12-29-2008 at 01:13 PM.
 
Old 12-30-2008, 05:10 PM   #6
alexhwest
Member
 
Registered: Dec 2008
Location: Cleveland, OH
Distribution: Ubuntu
Posts: 30

Rep: Reputation: 15
As one of the above posters mentioned, I think the problem is that you are trying to replicate a failing drive. Not a good idea. First of all, I would have used dd_recover, and second, work with the dd file as a filesystem and do not try to write it onto a drive block for block. Pull out what is needed and write it somewhere, but I would not write every single block onto another drive. As they said, partition table, etc. is gonna be all borked. Just get your files out. x2 on the ext3grep if you know what you're doing somewhat.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting header and footer with transparent proxy Peter Zamorra Linux - Software 1 03-25-2008 07:55 PM
Header, footer of a file lawrence_lee_lee Linux - Software 1 10-23-2007 07:26 AM
Apache Header & Footer blueAlien Linux - Server 1 03-07-2007 08:55 PM
Mozilla fails to print header/footer skip_g33k Linux - Software 2 03-23-2006 12:44 PM
Header and footer of printed files (using Kwrite) Krappy Linux - Software 3 02-27-2004 08:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:37 AM.

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