Help!
lovelybug's hard drive is dying; the logs are full of errors and her applications are falling apart.
I've bought a larger replacement. My first thought was to make a bit-for-bit copy of the old drive onto the new, but that fell over trying to copy sectors that seem to have become entirely unreadable.
The machine runs Windows XP Pro. I could install Windows on the new hard drive and copy over the files; this would have the advantage that the applications could all be reinstalled and might start working again. But where do I get a copy of Windows to install (the machines did not come with Windows install disks) and how do I re-use our existing Windows license?
NB
lovelybug wants to continue using Windows XP, though of course I'm more than happy to use Linux based tools for the low-level stuff.
I've bought a larger replacement. My first thought was to make a bit-for-bit copy of the old drive onto the new, but that fell over trying to copy sectors that seem to have become entirely unreadable.
The machine runs Windows XP Pro. I could install Windows on the new hard drive and copy over the files; this would have the advantage that the applications could all be reinstalled and might start working again. But where do I get a copy of Windows to install (the machines did not come with Windows install disks) and how do I re-use our existing Windows license?
NB
Probably too late to be useful, but...
Date: 2009-01-02 11:54 pm (UTC)The best way is to toss out the hard drive and restore from backup.
The second best way is to stick it in another box, and *not* boot from it or mount it or chkdsk/fsck it, or in any way touch it, since that just gives the corruption more chances to spread, and you're on borrowed time anyway. Then do a bit-for-bit copy using the little script I threw together the last time this happened to me. Then make a second copy of that bit-for-bit copy (with cp or whatever) and run fsck etc. on that to get the files out.
The third best way is the same as above, but using GNU ddrescue. (NB: there are multiple programs with essentially the same name. You want GNU ddrescue in particular.) ddrescue has lots of features, but is missing the ones that matter: a) my script keeps track of its state, so if something goes wrong during a multi-day disk copy, you can restart it and it will pick up where it left off, b) it goes faster, c) it uses Math to give a running tally of how much of the disk is actually recoverable given infinite time to run, so you can tell when to give up on getting more off, d) no other silly options to play with. I should probably write something up about it and post it somewhere, but eh, I'm lazy... Tools that any given person will only ever use once have a hard life in the FOSS world.
The fourth best way is to just mount it and use file-level copy tools, but that's risky, and if the filesystem has lost track of any files, they will just be gone, while if you get a bit-for-bit copy and realize there's some critical document you lost, you can often recover it by scrounging around in the original, un-fscked disk image by hand. (grep -ab is your friend.)