Help with a little dd damage!

Morgan Read mstuff at read.org.nz
Thu Feb 28 10:23:22 UTC 2008


I'll start at top if that's ok; no need for anyone to re-read what I 
already wrote.

I do love gnu/linux - the reason being all the very helpful people 
interested in offering a hand, thanks; in particular Ian and Mikkel.

Oh, and there is a God:)  Now rebooted a couple of times, and although 
there was a bit of clean up on /dev/sda1 (yes it's /boot) first time, 
everything seems to come up smelling of roses.  A good nights sleep is 
able to remedy all manner of woe.

Here's the output and some comments from dmesg fyi:
[root at morgansmachine DiskBUImagesEtc]# umount /dev/sda1
[root at morgansmachine DiskBUImagesEtc]# mount -r /dev/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
        missing codepage or helper program, or other error
        In some cases useful info is found in syslog - try
        dmesg | tail  or so
...
Output of dmesg here was:
Feb 28 06:52:25 morgansmachine kernel: EXT3-fs error (device sda1): 
ext3_check_descriptors: Block bitmap for group 0 not in group (block 
4056547683)!
Feb 28 06:52:25 morgansmachine kernel: EXT3-fs: group descriptors corrupted!
...
[root at morgansmachine DiskBUImagesEtc]# fdisk -l 2ndstage.rescue.270208
You must set cylinders.
You can do this from the extra functions menu.

Disk 2ndstage.rescue.270208: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe219e219

                   Device Boot      Start         End      Blocks   Id 
System
2ndstage.rescue.270208p1   *           1          13      104391   83  Linux
2ndstage.rescue.270208p2              14        4733    37913400   8e 
Linux LVM
Partition 2 has different physical/logical endings:
      phys=(1023, 254, 63) logical=(4732, 254, 63)
2ndstage.rescue.270208p3            4734        4864     1052257+  82 
Linux swap / Solaris
Partition 3 has different physical/logical beginnings (non-Linux?):
      phys=(1023, 254, 63) logical=(4733, 0, 1)
Partition 3 has different physical/logical endings:
      phys=(1023, 254, 63) logical=(4863, 254, 63)
[root at morgansmachine DiskBUImagesEtc]# dd if=2ndstage.rescue.270208 
of=/dev/sda bs=1K count=1174
1174+0 records in
1174+0 records out
1202176 bytes (1.2 MB) copied, 0.38523 s, 3.1 MB/s
[root at morgansmachine DiskBUImagesEtc]# mount -r /dev/sda1
...
Output of dmesg here was:
Feb 28 20:20:57 morgansmachine kernel: EXT3-fs: INFO: recovery required 
on readonly filesystem.
Feb 28 20:20:57 morgansmachine kernel: EXT3-fs: write access will be 
enabled during recovery.
Feb 28 20:20:57 morgansmachine kernel: kjournald starting.  Commit 
interval 5 seconds
Feb 28 20:20:57 morgansmachine kernel: EXT3-fs: recovery complete.
...
[root at morgansmachine DiskBUImagesEtc]#

Many more thanks,
M.

Morgan Read wrote:
> Hi Folks
> 
> This post could equally be titled - is there a God?
> 
> Yesterday I ran this command:
> [root at morgansmachine DiskBUImagesEtc]# dd if=/dev/sda of=pocketpc.rescue 
> bs=1M count=33
> (No output, just bash history.)
> 
> Today I ran these commands:
> [root at 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 at morgansmachine DiskBUImagesEtc]# chown morgan: ./2ndstage.rescue
> [root at 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
> [root at 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.
> 
> 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.


-- 
Getting errors: "There are problems with the signature" (or similar)?
Update your system by installing certificates from CAcert Inc, see here:
http://wiki.cacert.org/wiki/BrowserClients?#head-259758ec5ba51c5205cfb179cf60e0b54d9e378b
Or, if Internet Explorer is your default browser, simply click this link:
http://www.cacert.org/index.php?id=17

Morgan Read
NEW ZEALAND
<mailto:mstuffATreadDOTorgDOTnz>

fedora: Freedom Forever!
http://fedoraproject.org/wiki/Overview

"By choosing not to ship any proprietary or binary drivers, Fedora does
differ from other distributions. ..."
Quote: Max Spevik
        http://interviews.slashdot.org/article.pl?sid=06/08/17/177220

RMS on fedora:
        http://fedoraproject.org/wiki/FreeSoftwareAnalysis/FSF




More information about the fedora-list mailing list