Re: Help with a little dd damage!

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

 



Morgan Read wrote:
Hi Folks

This post could equally be titled - is there a God?

Yesterday I ran this command:
[root@morgansmachine DiskBUImagesEtc]# dd if=/dev/sda of=pocketpc.rescue bs=1M count=33
(No output, just bash history.)

Today I ran these commands:
[root@morgansmachine DiskBUImagesEtc]# dd if=/dev/sda of=2ndstage.rescue bs=1K count=1280
1280+0 records in
1280+0 records out
1310720 bytes (1.3 MB) copied, 0.0535238 s, 24.5 MB/s
[root@morgansmachine DiskBUImagesEtc]# chown morgan: ./2ndstage.rescue
[root@morgansmachine DiskBUImagesEtc]# dd if=zImage-LAB-20060421.htc of=/dev/sda
2348+0 records in
2348+0 records out
1202176 bytes (1.2 MB) copied, 0.117155 s, 10.3 MB/s
if you copy that many bytes back from your rescue, and your rescue didn't get clobbered by the misadventure, you should be about okay, but you won't really know until you reboot.

A hot backup like that of an active drive is flaky, and a hot restore is flaky, so we're looking at flaky squared. Dithering around asking for advice probably gave time for the flakiness to byte.
[root@morgansmachine DiskBUImagesEtc]#

Both yesterday and today I should not have used /dev/sda, but should have used /dev/sdc... Ouch...

Now I seem to have an unallocated partition of some 37.26GB where once existed my carefully constructed laptop hard drive.

Everything seems to be running fine, but I expect if I reboot - I wont! I guess I've just wiped out my MBR or something close.

If you restore the first sector, you will have a good partition table. You might have filesystem problems, and they may be irrecoverable, you won't know until you try it. You can assess it by running fdisk against your backup file, a bit like this:
Disk /dev/hda: 40.0 GB, 40016019456 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   83  Linux
/dev/hda2              14        4865    38973690   8e  Linux LVM
09:46 [summer@numbat ~]$

On this drive I have 14 blocks before the start of the first partition. If you haven't clobbered the first partition, you will be in good shape of you resore the MBR, the first sector. The drive might not boot, but that's fixable by reinstalling grub.

If your first effort fails and you're about ready to reinstall and write off the disk, use Knoppix for your further recovery efforts, it has a more complete toolset than Fedora rescue CDs.

I don't know about Fedora Live media.

So, fingers firmly crossed, have I managed to copy enough of my hard drive with the first two commands to be able to patch back the catastrophic damage I seem to have done with the last command. Could someone more confident than I give me some instruction:)

Any help desperately welcome.

Regards,
Morgan.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux