[TriLUG] saving extended partition info
Joseph Mack NA3T
jmack at wm7d.net
Sun Apr 22 12:33:16 EDT 2007
On Sun, 22 Apr 2007, Alan Porter wrote:
>
>> I save the first 512bytes of a disk (the mbr) with dd
>
> I would feel a lot more comfortable with something like
>
> fdisk -l > fdisk.out
>
> Recovery is a little harder, because I'd have to type in some
> numbers. But copying raw bytes from the hard disk is just
> not transparent enough for me. I prefer a method where I can
> use "vi" to view and edit the information in human-readable
> format.
that's what I'm looking for too.
As for recovery: yesterday I dd'ed a windows disk image onto
/dev/hda (my main disk) instead of /dev/sda (my usb backup
disk). It took me about a minute to realise that the light
wasn't going to come on on the usb backup disk, to figure
what I'd done and kill the dd. fdisk showed I now had a
partition table for a windows disk on my linux machine. The
machine was still happily running and so I dd'ed my copy of
the original mbr back onto the linux disk, to find that
everything (including the extended partitions) was still
available except /dev (all garbage) and I'd lost a few files
in /root. /etc and all other directories in / were fine.
Presumably the files in /dev were closet to the start of the
disk, followed by /root.
I let all my other jobs complete, shut the machine down and
moved the disk to a new machine were I found only the /
partition to have problems. I should have fsck'ed using one
of the alternate superblocks, but I used the standard one
and wound up with a hosed partition, which I restored from
the previous night's backup.
I'm now trying to figure out how to recover disks if I
deliberately `dd if=/dev/zero` to the start of the disk.
Joe
--
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!
More information about the TriLUG
mailing list