LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-06-2006, 07:38 AM   #1
applewax
LQ Newbie
 
Registered: Dec 2004
Location: Delaware, USA
Distribution: CentOS (RHEL) 4.0
Posts: 25

Rep: Reputation: 15
Fatal mistake w/ dd -- can't see data. Pls. advise.


I just made a huge mistake with dd while trying to copy the data from a DVD archive to my hard drive. (I was getting read errors using cp, so I wanted to see if 'dd' would work.) Anyway, I did "sudo dd if=/dev/hdd of=/dev/hda9", and now I think I may have wiped out my hda9 partition.

'df' before my screw-up showed hda9 as:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda9              22G   13G  8.2G  61% /storage
'df' now shows:
Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda9              16T   16T     0 100% /storage
which I don't understand. (What does the 16T mean?) The DVD I was attempting to copy from was 4.4GB, and the hda9 partition was 22GB. Has the entire partition been overwritten? 'df' is saying that usage is 100%, but there doesn't appear to be anything there at all. ('ls' returns nothing.) BTW, dd completed with:

Code:
657340+0 records in
657340+0 records out
Could someone please help me understand what I've done, and if there's anyway to undo it? Thanks in advance...
 
Old 05-06-2006, 09:16 AM   #2
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
I did "sudo dd if=/dev/hdd of=/dev/hda9", and now I think I may have wiped out my hda9 partition.
Yes, you did. Tee hee. Ahem.

Quote:
(What does the 16T mean?)
The T stands for Terabytes (1024 Gigabytes). Since it's unlikely your partition is that big, it basically means your filesystem is screwed.

Unless you have a backup, there isn't much you can do except kiss goodbye to your data and remake the filesystem. Don't feel too bad, most of us have done something like this, it's a good learning experience. Well, it's a learning experience, I don't know about "good".

In future, you should copy the data to a file/directory, not to a raw partition.

Last edited by ioerror; 05-06-2006 at 09:20 AM.
 
Old 05-06-2006, 12:51 PM   #3
applewax
LQ Newbie
 
Registered: Dec 2004
Location: Delaware, USA
Distribution: CentOS (RHEL) 4.0
Posts: 25

Original Poster
Rep: Reputation: 15
I was afraid of that. Most of the data was backed up, but some was not. :-(

So I should just go ahead and re-format the partition? No chance of making nice again? (Also, I failed to mention in my query, the filesystem is ext3.)

Thanks for the reply...
 
Old 05-06-2006, 01:15 PM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Yeah, just remake the filesystem. When you write to a raw partition, the fs is toast, so that's about all you can do
(unless of course, you're restoring a previous backup of the exact same partition).

I've toasted a few filesystems myself (not to mention hard drives ), I've found that it's a good idea to re-read every root/su/sudo command (that is going to delete/overwrite something) several times before pressing return.
 
Old 05-06-2006, 04:25 PM   #5
Boow
Member
 
Registered: Feb 2004
Distribution: Slackware 10.2
Posts: 669

Rep: Reputation: 32
should of been dd if=/dev/dvd of=dvdimage.iso
 
  


Reply

Tags
data, recovery



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
fatal mistake ohcrap Linux - Software 1 04-25-2006 06:21 PM
help pls! deleted something by mistake marlor Slackware 2 02-05-2005 08:06 AM
Need advise regarding backing up data before resizing hi-clier Linux - Newbie 3 10-20-2004 01:48 PM
a few problem pls advise me jeppe Linux - Newbie 2 09-03-2003 02:42 AM
unable to get Xwindows to load..fatal error..pls help 1question Linux - Newbie 2 07-16-2003 04:19 PM

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

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