LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 07-15-2007, 09:18 PM   #1
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Rep: Reputation: 30
recover partition + data


Hello,

I had mandriva 2006 installed and I wanted
to upgrade to mandriva spring 2007.1

I have 2 dardisks - sda for OS installation
and sdb for databackup.

I blew my data disk sdb. Now it is unformatted.
Is there is a way I can recover my data.

Is there a software like " getdataback for windows "
for linux that will allow me recover my data ?

Please help.

Thanks in advance

Varun
 
Old 07-15-2007, 10:22 PM   #2
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
Hi a quick search with the smart package installer gave this info...

dd_rescue

Does copy data from one file or block device to another

Like dd, dd_rescue does copy data from one file or block device to another.
You can specify file positions (called seek and Skip in dd). There are several
differences:
o dd_rescue does not provide character conversions.
o The command syntax is different. Call dd_rescue -h.
o dd_rescue does not abort on errors on the input file, unless you specify a
maximum error number. Then dd_rescue will abort when this number is reached
o dd_rescue does not truncate the output file, unless asked to.
o You can tell dd_rescue to start from the end of a file and move bcakwards.
o It uses two block sizes, a large (soft) block size and a small (hard) block
size. In case of errors, the size falls back to the small one and is
promoted again after a while without errors.

dd_rhelp

A hard disk rescue helper

dd_rhelp is a bash script that handles a very useful program written
in C by Kurt Garloff which is called dd_rescue, it roughly act as the
dd linux command with the caracteristic to NOT stop when it falls on
read/write errors.

Both available from contrib-release repos.

(edit) also check out ddrescue (end edit)

More can be found here...

http://en.wikipedia.org/wiki/Dd_(Unix)

Cheers, Glenn

Last edited by GlennsPref; 07-15-2007 at 10:25 PM.
 
Old 07-15-2007, 10:30 PM   #3
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
also, from LQ....

http://www.linuxquestions.org/questi...d.php?t=511969
saikee
Senior Member

If the partition (or partitions) has not be formatted or written to then I expect a 100% recovery by just restoring the orginal partition table. Done it at least half a dozen times losing the entire partition table of my hda and hdc (both 200Gb) with 60 and 58 partition inside. I could only remember losing 1 to 2 partitions in total after these advantures (caused by installing systems indiscriminately).

The complete alteration or destruction of the partition table, situated in the 447th to 510th bytes of the MBR, has no influence on the content of the partitions, except causing the data inaccessible temporarily.

If the partition has been written onto then it is another matter as it would be necessary to format it first (thereby destroying the filing tracking/indexing system and replacing it with the new system) and new data overwritten onto the old data. In that case it is a forensic laboratory job to get what is left behind.
 
Old 07-15-2007, 11:17 PM   #4
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
try testdisk

it should be able to recover most if not all that information.
 
Old 07-15-2007, 11:21 PM   #5
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
Hi GlennsPref,

The parition has not yet been reformatted or wrttien
yet.

So can you explain me how to proceed ?

Thanks

Varun
 
Old 07-15-2007, 11:23 PM   #6
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
Quote:
Originally Posted by varun_saa
Hi GlennsPref,

The parition has not yet been reformatted or wrttien
yet.

So can you explain me how to proceed ?

Thanks

Varun

testdisk is made for file recovery
 
Old 07-15-2007, 11:47 PM   #7
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
Hi, if you go to start/system/configure my computer (also called Mandriva Linux Control Center)

and select Mount Points, Create, delete Harddrive Partitions, select the drive to rescue, and click on "More"

You may be able to get the partition table back for that drive.

Most of the info in my previous post to this thread are quotes, and I have only done this once, quite a while ago(and it worked).

see how you go, this is the easiest and most straight forward way to begin.

There are more involved ways, but we'll try the fast and easy first, OK.

Regards, Glenn
 
Old 07-15-2007, 11:51 PM   #8
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
As indicated by slimm609, Test Disk should be able to do the job you need to do (restore your partition). Test Disk is one of the tools included with
System Rescue CD (a live CD image (iso file) you can download and burn to disk. Start your computer with the System Rescue CD in the CD-ROM drive (the CD-ROM drive must be set as the first boot device in the system BIOS). After the system boots to a command prompt, you can enter the following command to get to a GUI interface:
Code:
startx
I have not had the misfortune to need the services of Test Disk yet, but I use partimage in my system backup routine and Gparted to manage my partitions. In my opinion, System Rescue CD is a must have collection for my disaster recovery toolbox.

HTH,
 
Old 07-16-2007, 05:20 AM   #9
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
start/system/configure my computer (also called Mandriva Linux Control Center)

and select Mount Points, Create, delete Harddrive Partitions, select the drive to rescue, and click on "More"

You may be able to get the partition table back for that drive.

Well it restored a four small fat parition which I never
had.

I had one large 250GB sdb1 linux partition.

So what do I do next?

Varun
 
Old 07-16-2007, 07:15 AM   #10
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
Try clicking on "rescue partition table".

This should (?) get the partition table from the disk-drive.

Hopefully that will reinstate the partition table for the drive.

You may need to reboot to be able to mount it.

If so, then you may need to give it a mount point. Just use the name and address you used before, like

........ data and it's address... /data. It's full address will be /dev/sdb1, anyhow the program takes care of most of that, lucky you're not using LFS (Linux From Scratch).

You may even need to restore the partition table before it will work. Just don't save it till you have it working.

Good luck, (I did say it was a while ago, that I used this (about 3.5 years)),

regards Glenn

ps, this is really straight forward, but there are other ways to get your data back, but really messy.

Last edited by GlennsPref; 07-16-2007 at 07:18 AM.
 
Old 07-16-2007, 07:36 AM   #11
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
I found this.....http://wiki.mandriva.com/en/Docs/Support/Emergencies (last quartile of the page)

[quote] Diskdrake - works in both the GUI and CLI modes

(see http://linux.techteam.gr/docs/mandri...diskdrake.html)

In the CLI mode, you can move between icons with the Tab key. To select a menu item, use the arrow keys highlight it, then hit Tab until the Ok button is highlighted, and hit Enter.

To try and recover a lost partition table, try the following steps:

* Select the empty space entry.
* Select More.
* Highlight *Rescue partition table* and hit Enter.
* Cross your fingers and hope for the best.

I didn't have much luck with the Rescue partition table option in my tests, but you may have better luck. The other two options in the *More* menu work better. You can Save partition table to a file, and Restore partition table from a file. You might want to save the partition table to a floppy as a backup, in case something destroys it, or before trying to change things, so you can go back to your starting point.

One thing I do not like about diskdrake is that it is not consistant about how you navigate through the menus. For selecting things like the disk partition to work on, you highlight the entry, and then Tab to Ok, but in the More menu, you highlight the menu entry, and hit Enter. If you Tab to Ok first, you exit the menu. [end quote]

Try this before you try data recovery tools. All the best, Glenn

Last edited by GlennsPref; 07-16-2007 at 07:44 AM.
 
Old 07-20-2007, 02:50 AM   #12
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
Thanks All,

MCC - rescue partition, did not
work. Though it should have.

But Test Disk worked perfectly.
I downloaded testdisk rpm installed
it and ran. And it restored completely
my partition. And I had all my data
back and safe.

So cool.

Phew ! I had my home dir will all mails
in sdb1.

That was a very narrow shave.

Thanks ALL again for teaching me a few
vital tips.

Varun
 
Old 07-20-2007, 04:34 AM   #13
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
testdisk will recover almost everything.


that is one of my must have utils.
 
Old 07-20-2007, 07:22 PM   #14
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Currumbin Valley, Australia
Distribution: Devuan
Posts: 3,431
Blog Entries: 33

Rep: Reputation: 228Reputation: 228Reputation: 228
Thank you! I'm downloading testdisk too. To be sure, to be sure.

Regards, Glenn
 
Old 05-23-2008, 05:27 PM   #15
verdverm
LQ Newbie
 
Registered: Aug 2007
Posts: 4

Rep: Reputation: 0
Talking can I send testdisk money?

Praise the lord for testdisk!!!
Don't know how it works but it did

I hit too many keys during a Fedora 9 install and it went straight to default partition layout and started formatting my entire hard drive.
In a moment of panic I hard booted and lost my Logical Volume information with the partition table.

Tried fdisk, parted, gpart...

and to the rescue was testdisk

highly recommended
 
  


Reply

Tags
partition, recovery


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Recover Data after wrongly Re-create partition mongkokcactus Linux - General 7 12-19-2006 02:02 PM
Accidentally Formatted NTFS Partition... Looking to Recover Data Adam A Flynn Linux - Software 5 08-13-2006 11:59 AM
Software to help me recover 'Deleted' FAT32 Partition Data? flamesrock Linux - Software 8 07-26-2005 10:39 PM
Data Recover Help -> Incorrect Partition Table PhuckFonix Linux - General 8 05-30-2004 10:12 PM
Using Linux to recover data on a damaged Windows partition? Korff Linux - General 5 12-29-2003 11:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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