[Wylug-help] Disaster recovered: Thanks to Shaun Laughey,
testdisk and partimage
Dave Fisher
wylug-help at davefisher.co.uk
Sun Feb 25 16:17:27 GMT 2007
Hi All,
I doubt whether anyone is particularly interested in the fact that I've
managed a complete recovery from stupidly deleting a hard disk partition
table.
This post is, therefore, really to give thanks to Shaun+testdisk and to
provide some pointers for less experienced Linux users who find
themselves in a similar situation:
1. testdisk is a fantastic little tool for diagnosing and fixing disk
partion problems. It's documentation is not perfect, but it is
well above average in both quality and quantity.
My case didn't exactly fit any of the admirable worked examples, so
I wasted an hour or so trying to figure out why I couldn't create
an extended partition, or toggle any existing partition to be
'extended'.
It turns out that all I needed to do was toggle the default disk
geometry (changing the number of disk heads from 16 to 255) in
order for testdisk's analyser to correctly recognise the entire
disk layout. (N.B. I never got the documented symptoms of geometry
problems). Having got a correct analysis, the only thing that I
had to do was write testdisk's suggested partition table to disk
... brilliant!
2. Never reboot a running system that you've just screwed-up - if you
still have a shell open and you have rootly powers, the screw-up
can often be fixed ... sometimes, even without root privileges.
Following this rule, I didn't reboot using the new partition table
written by testdisk until after I had confirmed its details in
fdisk, parted and gpart (belt and braces, I know).
3. If you haven't yet reached wizard (super-guru) status, the main
problem with Linux troubleshooting is the needle-in-a-haystack
search for simple solutions that you could have applied imediately,
if only you had known of their existence.
Actually, I think a prince and frog kissing metaphor is more
accurate here, because there's never a shortage of needles in the
Linux haystack.
So, until hell freezes over and quality Linux documentation is
instantly findable, I recommend that people ask questions on lists
like this, and keep asking (after properly analysing/testing
initial responses).
One amazing side effect of restoring my partition table was a 'dead'
Windows XP installation suddenly springing to life. That installation
had 'died' months ago after I'd 'restored' it from a partimage backup,
so I'm guessing that partimage's restoration had also been screwed by
the disk geometry.
I mention that because its relevance to another frog-kissing exercise:
backing up and restoring Windows installations in Linux. I often hear
people recommending Symantec's proprietary Ghost application. Having
used partimage for some time now, I'd thoroughly recommend it as a free
and easier alternative ... especially in combination with g4l ('*host for
Linux').
Dave
More information about the Wylug-help
mailing list