ciphergoth: (computer)
[personal profile] ciphergoth
Help! [livejournal.com profile] 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 [livejournal.com profile] 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.

Date: 2008-12-30 01:39 pm (UTC)
From: [identity profile] pengshui-master.livejournal.com
My tricks for recovering windows partitions fall into to categories for mildly damaaged discs I do:-
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.

Date: 2008-12-30 01:41 pm (UTC)
From: [identity profile] pengshui-master.livejournal.com
Oh, I forgot you if you use method 1, You'll need to use the recovery console to fixboot/fixmbr to restore the bootstrap.

Date: 2008-12-30 01:43 pm (UTC)
andrewducker: (Default)
From: [personal profile] andrewducker
This will retrieve your existing license key:
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.

Date: 2008-12-30 02:10 pm (UTC)
From: [identity profile] emarkienna.livejournal.com
I don't have any idea I'm afraid, but if you haven't done so it might be worth seeing if the manufacturer/retailer will send out the discs - my laptop didn't come with one either, but they sent me one when I asked (they're usually customised "recovery" discs that overwrite the drive with the initial setup rather than general Windows install discs, but I presume it should work just as well).

Gparted

Date: 2008-12-30 02:26 pm (UTC)
From: [identity profile] kingginger.livejournal.com
Use that - And it may be able to copy the whole disk to the new disk - including expanding the partitions etc.
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...

Date: 2008-12-30 02:29 pm (UTC)
From: [identity profile] kingginger.livejournal.com
assume you have the Windows XP Pro Certificate of authenticity on the side of the case I can send an ISO of an XP Pro installation ?(Probably use Yousendit or something)

(Or tbh, if you have the key, you can just download a torrent of the OEM disk).

Re: Additionally...

Date: 2008-12-30 05:57 pm (UTC)
From: [identity profile] ciphergoth.livejournal.com
surprisingly, the key is still readable even though everything else on the back is rubbed off!

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...

Date: 2008-12-30 07:12 pm (UTC)
From: [identity profile] pengshui-master.livejournal.com
Not at all AFAICT. But it does need to match the Home/Pro/Media Center edition part of XP.

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...

Date: 2008-12-31 06:12 am (UTC)
From: [identity profile] kingginger.livejournal.com
Just to reiterate - any XP Pro OEM image will suffice.

You may not even need it if the data will copy... but I suppose its "fingers crossed" on that one...

Date: 2008-12-30 04:15 pm (UTC)
From: [identity profile] adq.livejournal.com
I have a copy of BartPE bootable from USB stick, gimme a shout if you need an image of it.

Date: 2008-12-30 06:35 pm (UTC)
From: [identity profile] shevek.livejournal.com
You want ddrescue, not dd. Strictly. I mean it.

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?

Date: 2008-12-30 07:14 pm (UTC)
From: [identity profile] deliberateblank.livejournal.com
The re-use of the existing windows license is legally dubious
Not really. It's the same machine, just with a replacement for a broken part. Whatever MS would like you to believe, this is legally and morally an entirely reasonable thing to do.

Date: 2008-12-30 08:40 pm (UTC)
From: [identity profile] shevek.livejournal.com
Unfortunately, morally isn't important, legally is the only thing that matters, and I understand it to be legally dubious.

Date: 2008-12-30 09:00 pm (UTC)
From: [identity profile] deliberateblank.livejournal.com
That's why I mentioned both. I understand it to be legally fine.

pmfji

Date: 2008-12-31 06:17 am (UTC)
From: [identity profile] kingginger.livejournal.com
It is legally sound.

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.

Date: 2008-12-30 07:11 pm (UTC)
From: [identity profile] deliberateblank.livejournal.com
The way I do this (on 2000, though they will be much the same) is to do a parallel install onto a separate partition on the new disk, boot into it, then use xcopy with appropriate options ("/E /C /F /H /K /O" I believe) to copy the original boot partition over to its final resting place on the new disk. (Leaving the new disk with three partitions: system, boot, and the parallel install boot.)

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.

Date: 2008-12-30 07:23 pm (UTC)
From: [identity profile] pengshui-master.livejournal.com
Blah.
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.

Date: 2008-12-30 07:40 pm (UTC)
From: [identity profile] deliberateblank.livejournal.com
I like using simple tools whose behaviour I can predict. Windows is unpredictable enough. Keeping permissions is what the /O switch is for. The parallel installation is so that Windows doesn't have any of the source files open for exclusive access - the main problems being the registry hives, which you can't really do without. Having a parallel install lying around is sometimes a useful thing in itself - I've had all sorts of random software that should know better decide that making my system unbootable is the way forward. It doesn't survive long.

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.)

Date: 2008-12-30 08:18 pm (UTC)
From: [identity profile] pengshui-master.livejournal.com
I like using simple tools whose behaviour I can predict.
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.

Probably too late to be useful, but...

Date: 2009-01-02 11:54 pm (UTC)
From: [identity profile] elsmi.livejournal.com
I don't know anything about reinstalling windows, but when it comes to saving as much data as possible off a decaying hard drive...

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.)

Profile

ciphergoth: (Default)
Paul Crowley

January 2025

S M T W T F S
   1234
5678 91011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 19th, 2026 07:16 am
Powered by Dreamwidth Studios