LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-28-2009, 08:58 AM   #1
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Best way to simulate data loss, corruption, partition wiping, etc & then "rescue" it?


OK,
What I'm trying to do is learn how to "rescue" a system that has been corrupted, formatted, or data overwritten, etc. in Qemu
and then try to save it with partimage, testdisk, photorec, etc.

My idea was to use Qemu to create a whatever size qemu-img, partition it and install a few distro's to it, then somehow destroy stuff, wreck the partition table or whatever, and then try to use various tools to
Rescue the system, and I would be able to learn system rescue, etc
"hands-on", but in virtuality, so no harm done.

So, if that's not a good idea, then how would I practice with recovery tools, etc without risking my own systems?

thanks
 
Old 06-28-2009, 12:15 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
Well, I like the idea. As to how you "wreck" your filesystem, you can destroy your partition table by writting garbage to the MBR, for example.
dd if=/dev/urandom of=/dev/sda skip=446 bs=64 count=1
 
Old 06-28-2009, 01:23 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK, I'm gonna try that

Now, what TYPES of corruption/damage can data recovery tools
really help with?
Like, if I dd'd the mbr, as in Uncle's post, that type of damage is easily fixed or no?

Does anyone know different ways of screwing up the OS, but still have the ability
to recover some/all?

like formatting
bad partitioning
what else?
 
Old 06-28-2009, 01:35 PM   #4
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
I don't know the answers, but it does sound like an interesting experiment.
 
Old 06-28-2009, 01:39 PM   #5
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK, well, I guess I'm gonna try different things, huh?

One question though, as I stated at first, Doing this in "virtual" land
will still be an almost exact recreation of a event happening in a real-time system-yes? Or no?

Quote:
My idea was to use Qemu to create a whatever size qemu-img, partition it and install a few distro's to it, then somehow destroy stuff, wreck the partition table or whatever, and then try to use various tools to Rescue the system, and I would be able to learn system rescue, etc
"hands-on", but in virtuality, so no harm done.
I can't really think of a better/safer way than doing it in an emulator
as otherwise I would have to use an old lappy, which is what will be used eventually, once I know what's what
 
Old 06-28-2009, 01:46 PM   #6
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Mmm, I should think it would near enough the same as doing it to a "real" system. And with Qemu, you can create those qcow files, that allow you to leave your originals untouched. That's one advantage.
 
Old 06-28-2009, 01:50 PM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Original Poster
Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
OK, so this is my plan so far...
create qemu-img, partition and install like 5 distro's(various)

thenn...somehow destroy the partition table...I think I did that once when Playing with CFDISK, I did a partition scheme, wrote it to disk, then, instead of re-booting, I re-arranged the partition table like 2 more times, then tried to format it.
At reboot it was all screwy!

But, that's just 1 way....how would I find out the different ways a system can be destroyed, but recoverable?
I guess I'm off to see Mr. Google, so I'll go get a stiff drink, some indian smoke and
burn down qemu!
 
Old 06-28-2009, 01:59 PM   #8
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Good luck.
 
Old 06-28-2009, 06:26 PM   #9
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
At work today I thought about doing the exact same thing. That is.. scary :P

The reason is that I am (As most nerds) the free computer technician in the family/community. My dads colleague lost two harddrives in a thunderstorm, and as usual he didn't have any backup. I got called in to "rescue" them free of charge (As always. Got to buy the hardware I needed tho, so now I got a cool adapter for IDE (3.5" and 2.5") and sata with including powersupply I got to keep the harddrives as well, but I don't trust them, so I don't know what to use them for. Except experimenting with rescuing data). The drives them selfs showed up and seemed to be alright, but the MBR was corrupt. Easy, I thought. Well, long story short, I couldn't fix it. And that was annoying. So basically now I have to learn how.

Last edited by Dinithion; 06-29-2009 at 04:17 AM.
 
  


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
How to get the "data type" of an "unknown variable" in "C Language" ? Affair Programming 8 06-20-2009 12:30 PM
fdisk reports odd "Start "and "End" sectors on single partition eponymous Linux - Software 3 10-01-2007 03:41 PM
"NIM thread blocked" & "Deadman Switch (DMS) close to trigger" errors sosborne Linux - Networking 1 06-28-2006 02:07 PM
Simulate a "Ctrl+D" in a script? kinetik Linux - General 8 06-14-2006 02:10 PM
FC3 rescue disc won't mount "Linux LVM" partition anymore. coolingtower Linux - General 0 01-23-2005 03:43 AM

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

All times are GMT -5. The time now is 12:21 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