Re: Recover stupid mistake

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

 



On 05/27/2010 02:07 PM, Bruno Wolff III wrote:
> On Thu, May 27, 2010 at 13:32:51 +0100,
>   Mike Martin <redtux1@xxxxxxxxxxxxxx> wrote:
>> Hi when I was trying (and failing) to get a bootable pen-drive, with
>> the F13 live image I accidentally did the following
>>
>> dd if=/dev/zero of=/dev/sdb bs=512 count=1
>>
>> which returned nearly immediately and now I have no data on the disk.
>>
>> The disk is 750 gig , of which about 400 is used. I am hoping that
>> only the partition table is gone, if not is there any way to recover
>> from my disaster
> 
> I believe that command just changed the first 512 bytes. If you know how
> it was partitioned you can probably get things back by making a new
> partition table.

You should have the size information for the partitions still present in
/proc/partitions (as long as nobody rebooted after running the dd or
tried to reread the partition table).

You'll probably want to run fdisk with units of sectors ('u' from main
menu) and remember that the values reported in partitions are 1k blocks
(i.e. two sectors for most disks).

If you're having trouble finding the right starting offset then you can
also take a look at parted's rescue command which will scan storage
looking for things that look like partitions (e.g. fs superblocks) and
then offers to create partition table entries for them.

Regards,
Bryn.
-- 
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