Re: misuse command dd, how to recover

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 06 February 2011 15:20:53 cheng chen wrote:
> I just input a wrong output device file of the dd command
> 
> it should be "dd if=xxx.iso of=/dev/sdc"
> 
> but I input "dd if=xxx.iso of=/dev/sdb",
> 
> so my hard disk partition is ruined. The xxx.iso is just 3GB, but I have
> 400GB data in the disk which means other data are still there.
> Is there anything I can do to get the files back to me. It's partition type
> is NTFS.

I'm afraid that doing the above overwrote the partition table on /dev/sdb, and 
I know no way of accessing the data on the drive if there is no partition 
information available. The fact that the filesystem is NTFS only makes matters 
worse.

If you have an additional empty hard disk which is *identical* (in size, 
geometry, type, etc) to /dev/sdb disk, and if you know the exact sizes of 
partitions which were present on /dev/sdb, you might try recreating the 
identical partition layout on that spare drive (say, /dev/sdd), and then do 
something like:

dd if=/dev/sdd of=/dev/sdb bs=512 count=1

That will (hopefully) restore at least the partition information on the 
/dev/sdb drive. After that, you might consider accessing the data that were 
not corrupted somehow (though I'm not sure how --- some file recovery utility, 
preferably Windows-centric since the filesystem is NTFS, or something similar). 
Someone else might give you some useful suggestions on that part.

But all that is a longshot at best. The only other course of action you can 
take now is to start swearing and cursing for not making regular backups of 
that drive when you had the chance... ;-)

Btw, I know how you feel, I also had a few slips of a finger when using dd, 
before I learned to double- and triple-check the syntax of every dd command I 
type as root. And I also don't do it so often these days anymore... :-)

HTH, :-)
Marko

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux