Re: Recover from unintended dd

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

 



On 11/20/2016 11:52 PM, Kalpa Welivitigoda wrote:
Hi all,

I wanted to create a live install media from by flash drive using dd.
Following is the command I used,

sudo dd bs=4M if=Fedora-Live-Desktop-x86_64-19-1.iso of=/dev/sdc1

The sad part is /dev/sdc1 happened to be my external hard disk (I wanted
to write the image to my flash disk), this was by mistake.

Now I cannot access files in my external hard disk. My hard disk is 1TB
and had only one partition. With this dd now it has two partitions (sdc1
and sdc2), following are the outputs of trying to mount them,

First, why are you doing _anything_ with a badly out-of-date and unsupported Fedora 19?

Second, I think you must have written to /dev/sdc and not /dev/sdc1,
since writing to the _partition_ /dev/sdc1 should not have affected the partition table on /dev/sdc.

Whatever was on the first ~1 GB (997 MB) of your disk is gone forever. Much of the rest should be recoverable, but that depends on what filesystem was used. You should start by running testdisk to recover the original partitioning. You can download SystedRescueCD from <http://www.system-rescue-cd.org/SystemRescueCd_Homepage>, which includes testdisk and a host of other useful recovery tools. Hopefully, testdisk can discover the remains of your original filesystem. Once the partition table is restored, a filesystem-specific fsck (e.g., fsck.ext4) should restore sanity to the filesystem, though much of the content will likely end up in lost+found. That should include intact subdirectories with file names, but some content will end up as anonymous files.

--
Bob Nichols     "NOSPAM" is really part of my email address.
                Do NOT delete it.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[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