Paul Crowley (
ciphergoth) wrote2008-12-30 01:01 pm
Entry tags:
Advice sought: replacing a dying hard drive under Windows
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

no subject
Boot to BartsPE,
chkdsk /f drive:
Use diskpart to partiton new drive.
format new drive
use robocopy to copy files with the /w:0 /R:0 - otherwiae it retries for EVAR!!.
Else
gnu Rescue dd, old drive to new from rescue linux disc.
Then bartsPe to chskdsk /f
and diskpart to expand the partition to fill the space.
If BartsPE isn't available a Vista Install disc will work, but and XP really won't sorry.
You should find BartsPE builder downloadable of the intertubes as well as the incredibly useful robocopy.exe, which is in most of the microsoft resource kits.
no subject
no subject
http://www.petri.co.il/quickly_retrieve_windows_cd_key.htm
You'll need a copy of the right version of XP to install with it though (can't use a Pro key with Home and vice-versa). Can't help you with that.
If you don't mind having a knock-off version then google TinyXP - which is a cut-down version that works a treat. Rev9 is the one I've used.
I do recommend starting from scratch. Once an OS ceases to work well a reinstall is your best bet.
no subject
Gparted
have both disks plugged in - assume that is possible?
But it will work if you have one in a USB caddy too...
Then just remember to tag the new disk volume with the boot label...
Download the Live CD ISO
http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=271779
(or http://gparted.sourceforge.net/ and follow links )
Just run with the defaults on bootup (rarely a need to change) -
then just use the GUI to copy from a to b :-)
Good luck.
Additionally...
(Or tbh, if you have the key, you can just download a torrent of the OEM disk).
Re: Additionally...
How do I find out exactly what to download? How closely does it have to match the old version for the key to work?
Re: Additionally...
Although using different disc versions is supposed to trip WGA warnings - I just normally use an upto date Sp2 (now sp3) disk on all repair installs and haven't seen it cause them (over many attempts).
If you filecopy and/or rescue dd the disk you may not have to reinstall/repair install first anyway - depending on how badly damaged the fs is.
Re: Additionally...
You may not even need it if the data will copy... but I suppose its "fingers crossed" on that one...
no subject
no subject
The re-use of the existing windows license is legally dubious, and practically difficult; both are deliberate.
Is there a NYE party of which you know?
no subject
no subject
no subject
pmfji
If it is an OEM license - its effectively licensed to the tin box - provided the motherboard doesn't change the license is still legal.
You may have to phone Microsoft for activation rather than automatically, but it's ok to do so.
no subject
Edit both boot.inis to include the all possible bootable partition, with or without the old disk installed. Reboot and hopefully the number of things that go wrong is managable at this point. Usually drive letter assignments need to be tweaked. Yank the old disk and remove unused boot.ini entries when all seems well.
Keeping a useful number of choices in boot.ini is key - recovery console can fix MBR and bootsector issues, copy files and disable services, but it doesn't (bah!) have a text editor or general registry editor so you need a bootable OS to edit boot.ini.
If other hardware has changed, the situation gets interesting (60 hours so far and counting, but mostly there now, and the latter half has mostly been showing off.)
This does require install media though, preferably slipstreamed up to whatever level you were already running. And it being XP you're probably at some point going to have to beg Microsoft's permission to carry on using the product you already bought.
no subject
xcopy good., Robocopy better. It guarantees copy the ntfs security attributes with the /copyall switch. I've never needed to do a parallel install as long as the COM+ catalog is not corrupt. And just don't ask about that one.
I'm assuming there is no hardware changes that, as you say can get interesting - I normally find you need to rename the intelppm.sys driver to prevent it loading (because as you say - the recovery console cant do it) if you are moving off an intel chipset board. Other than that it works pretty well. Of course changing your motherboard is technically only allowed with OEM (not microsoft interestingly!) permission. ALthough you may need to beg microsoft's permission if it has a OEM key for activation.
Having said that, if the windows image is so badly damaged that none of the above works - your instruction are pretty much what I'd do.
no subject
The way to start a complete hardware migration is to go into Device Manager and Uninstall all the drivers for the current motherboard (without rebooting until you've got all of them!). The recovery console *can* actually do this bit, since it can disable services/drivers, (and move/rename files) but it's easier in Device Manager, and fixing errors is easier in a parallel install. Then pray that something didn't blat over ntdll.dll with a pre-Win2K RTM version. Bastards.
(I have a boxed retail version, so can move it completely between hardware at will as long as I only keep one instance.)
no subject
Me too, TBH that's why outside of work I only use Unix. Simple tools....
OTOH robocopy has acted pretty predictable for me. I can't recall what the problem with xcopy was - but there was a reason I changed to using robocopy.
The parallel installation is so that Windows doesn't have any of the source files open for exclusive access
Ahh. I solve this problem by working from a Live windows or Linux CD such as bartsPE or Knoppix.
In my case this is a serious win becuase I often have to repair PCs I've never seen before and the quicker I can do it the more I earn.
I thought you were suggesting doing a parallel install and migrating the setup to that, rather than using it as rescue environment.
the way to start a complete hardware migration is to go into Device Manager
It's quite hard to blat all the drivers in device manager before changing the hardware if the motherboard has gone titsup though!. I've seen machine's even fail to start in safemode hence the preventive rename. And disabling the drivers in recovery console doesn't work -I've tried it. Even though they have service names.
I also seem to recall this sort of thing is a little harder in Xp than win2k as well. But it's been a while since I hand to do much recovery for win2k.
no subject
http://www.labnol.org/software/rebuild-computer-and-reinstall-windows/6130/
Probably too late to be useful, but...
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.)