LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-26-2009, 06:16 PM   #1
mr_mandrill
Member
 
Registered: Aug 2002
Location: UK
Distribution: Slackware 8.1
Posts: 74

Rep: Reputation: 15
Help I killed partition


I really hope someone can help me.

I was trying to make a usb stick for booting slack installation from my Ubuntu system. I used the following command

dd if=usbboot.img of=/dev/sda bs=512

I wasn't entirly awake when I did this and entered the wrong device name ie a near full 200GB disk of media/wine/backups.

I'm looking into testdisk/photorec as potential solutions, but testdisk doesn't seem to find previous partition and photorec loses any filenames / structures. Is there anything I can do to recover some or all this data retaining some structure / filenames.

P.S. I have a 200gb disk to hand to recover to.
 
Old 07-26-2009, 06:43 PM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo (all servers at work are openSUSE)
Posts: 6,938

Rep: Reputation: 128Reputation: 128
Maybe try working with ddrescue from Alien Bob's repo.

Check out Linux LEO and download The Beginner's Guide for usage tips.
 
Old 07-26-2009, 06:52 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,382

Rep: Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043Reputation: 3043
I doubt ddrescue or its ilk will help - they're for recovery from read errors.
Testdisk is the usually recommended tool, but relies on being able to find "hints" for the start and end of partitions. You just stomped on the start of the disk - for some unknown count of sectors. That wipes out all the metadata for the filesystem as well - not much chance of retrieving filenames unless they are embedded in the file itself I'd reckon.

Edit: Seems like just one partition on the disk - if so you can just use fdisk to create one to cover the entire disk. Doesn't matter that it may be bigger than the filesystem - so long as there was only one previously. Doesn't help recover the data though ...

Last edited by syg00; 07-26-2009 at 06:55 PM.
 
Old 07-26-2009, 09:10 PM   #4
the3dfxdude
Member
 
Registered: May 2007
Posts: 567

Rep: Reputation: 247Reputation: 247Reputation: 247
If you are really serious about trying to recover the partition beyond just recreating the partition, then I would make a mirror backup of the entire drive first before doing anything to it.

The second thing I would definitely try doing would be to recreate the partition with the original parameters. If you are really lucky, I would guess you might at worst just need a fsck (if some data was actually lost). But it is totally possible you damaged part of the file structure to make it normally unreadable, and then in that case you probably might want to look for some forensic utility that might know the filesystem and how to regenerate the missing parts. (could mkfs do this?) Perhaps you could also find a program to read the fragments of the filesystem that is still intact, and I suppose you are currently thinking that.

It might take trial and error to figure all this out, so that is I suggest a backup before anything, because you could actually make the problem worse.

Last edited by the3dfxdude; 07-26-2009 at 09:13 PM.
 
Old 07-27-2009, 12:03 AM   #5
cartoon
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
I think your disk's partition-table is likely been destroyed, and I have met similar case. you can recover it by testdisk. However it's a good idea to read a guide of testdisk before you move on.
Here are some references

http://en.wikipedia.org/wiki/TestDisk
http://www.howtoforge.com/data_recovery_with_testdisk
http://blog.sina.com.cn/s/blog_574d0...la_prevarticle

The last link is wonderful, however it is a Chinese site. I'm sorry for it and my poor English.
Goodluck!
 
  


Reply


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
Help, Windoze killed my partition table! mngmd General 3 11-13-2005 08:06 AM
Partition Magic killed my boot Cyber Maid Linux - Software 3 05-01-2005 11:59 AM
I killed my partition auau Linux - Newbie 3 11-27-2004 07:12 PM
Killed my partition table Alinuxnoob Slackware - Installation 2 09-22-2004 03:18 AM
I think I killed my old partition... help! sbert Linux - Newbie 2 07-15-2004 04:09 PM

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

All times are GMT -5. The time now is 08:50 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration