Author Topic: Failing Win XP HDD  (Read 5981 times)

0 Members and 1 Guest are viewing this topic.

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Failing Win XP HDD
« on: May 12, 2024, 09:48:39 pm »
My Win XP HDD crashed and died in November 2016 and I did a new install of Win XP.

Now, 7.5 years later, the HDD is failing. See the attached SMART report. 31157 hours. Health : bad.

Questions:

How serious is this and how fast do I need to replace the HDD?

Can I easily clone the existing install to a new hdd or ssd?

What should I do at this point? 
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #1 on: May 12, 2024, 11:47:21 pm »
> How serious is this and how fast do I need to replace the HDD?

Clone that disk immediately.  Don't wait, you'll only find out how serious this is when it's too late


> WinXP doesn't play nicely with an SSD, I'd suggest replacing the drive with another HDD.

XP works fine on SSDs.  It doesn't support TRIM, but I don't think that's the end of the world.  Have you seen other problems?

If you're really worried about it: partition the drive so Windows only ever uses (writes to) 50% of the disk.  Even a 60GB partition on a 120GB disk is overkill for many XP jobs.  This way the drive will always have half of its sectors free to play with.


> Can I easily clone the existing install to a new hdd or ssd?

Yes.  Just make sure they're both the same interface type (IDE and IDE or SATA and SATA) otherwise you have to modify XP in fun ways (or reinstall it).  It will bluescreen on boot if the disk interface type changes, it can't handle that on its own.

If you're not scared of the command-line then I recommend booting a Linux distro (like System rescue) off a USB stick and use "ddrescue".  It copies a disk, keeping track of unreadable sectors and only retrying them later after it has finished reading everything else.  This way you don't risk getting stuck at a bad point of the disk forever AND you get given a report of how many unreadable sectors there were.
 
The following users thanked this post: amyk, SeanB

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #2 on: May 12, 2024, 11:50:31 pm »
Whilst I'm here:

* Keep a backup of the disk image on something else too, just in case  How big is the bad disk?  If it's mostly empty space then zipping it will help dramatically.
* Buy a name-brand SSD.  I've had some lesser name ones fail and it has caused me pain. 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8331
Re: Failing Win XP HDD
« Reply #3 on: May 13, 2024, 02:42:24 am »
Any reallocated sectors showing up in SMART is a sign to replace the drive ASAP.

Embedded systems have been running off CF card "SSDs" with MS-DOS and Win9x for over 2 decades now. XP is absolutely fine on an SSD.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1286
  • Country: pl
Re: Failing Win XP HDD
« Reply #4 on: May 13, 2024, 03:10:54 am »
The disk has almost 2000 sectors, which had to be reallocated, and another hundred likely to join them, when written.

If this is a progressing increase, soon you are going to run out of backup sectors. At which point the HDDs should be considered unsuitable for storing data reliably.

If this was a sudden, one-event increase, it might be due to a physical damage to the platter. This itself isn’t indication of the HDD failing and the drive may as well work reliably for many more years. However, the damage often leads to debris on the platters. And that will cause more and more damage.

The conclusion is: I agree with the above, replace the drive ASAP.
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline nigelwright7557

  • Frequent Contributor
  • **
  • Posts: 697
  • Country: gb
    • Electronic controls
Re: Failing Win XP HDD
« Reply #5 on: May 13, 2024, 07:19:24 am »
In 2006 I reinstalled Windows on my pc.
To my horror it formatted both disc drives.
While i had a lot on DVD backup I still lost some valuable data.

Since then I use DVD's and flash drives to backup everything.
I even have flash drives in my car in case of fire.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5766
  • Country: au
Re: Failing Win XP HDD
« Reply #6 on: May 13, 2024, 08:15:46 am »
In my experience once the pending sector count starts going up, the drive is on its last legs and will fail soon.

Doing a full clone might push it over the edge, so back up the most important data first.

WinXP doesn't play nicely with an SSD, I'd suggest replacing the drive with another HDD.

Good advice, although you can still use SSDs with Windows XP (even though XP doesn't natively support TRIM). If you install an Intel SSD, the "Intel SSD Toolbox" software allows you to schedule TRIM commands (no longer being actively maintained however you may still be able to find some old download links, if not, let me know I can upload a known-good copy).

You can also update firmware using their Firmware Update Tool: https://www.intel.com/content/www/us/en/download/17903/intel-ssd-firmware-update-tool.html

I've used SSDs in older Windows XP machines for many years without issues. Other drive manufacturers may have similar software tools, but I've never used them.

Embedded systems have been running off CF card "SSDs" with MS-DOS and Win9x for over 2 decades now. XP is absolutely fine on an SSD.

You're right, however while CF cards are a form of solid state drive, they operate entirely differently to the SSDs most people refer to today.

"Modern" SSDs rely on mechanisms like TRIM to ensure that garbage collection and wear levelling work effectively.
« Last Edit: May 13, 2024, 08:43:51 am by Halcyon »
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #7 on: May 13, 2024, 12:21:37 pm »
The data is not in serious danger as I have backups of everything that I might want. My main interest is in restoring the OS. When it failed last time, in 2016, I did a clean reinstall of Win XP and was quite surprised that I could still download and install all the updates and patches. That is no longer the case though so I want to try to save the OS by imaging to another disk. I am not in a hurry and I will go as slow as necessary.

In the worst of cases it would not be a disaster. I have a couple of laptops with XP still running well. And I have a virtual Win XP with VMware running with Linux. But I dislike change and would like to continue to use that computer as it is... or rather, as it was.

So, the failing HDD is 1 TB divided in two partitions:

C: 336GB, 85 GB used, 251 GB free
D: 663GB, holds movies and other not important stuff.

The options are:

- Buy a brand new HDD. I will have to check prices.
- Use some laptop size (2.5") HDD of which I have several available, pulled from systems. This is probably not advisable.
- Use a brand new Crucial BX500 480GB which I have available. This is probably the easiest but I do not know anything about this TRIM business. It sounds like I can install some software that would do it?

I guess I would still do two partitions, say C for the OS with 150 GB and the rest, D, for movies or whatever. Or is there some advantage to having just one single partition?

And the main question is what is the best, most reliable software to do the imaging?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5766
  • Country: au
Re: Failing Win XP HDD
« Reply #8 on: May 13, 2024, 01:21:41 pm »
The data is not in serious danger as I have backups of everything that I might want. My main interest is in restoring the OS. When it failed last time, in 2016, I did a clean reinstall of Win XP and was quite surprised that I could still download and install all the updates and patches. That is no longer the case though so I want to try to save the OS by imaging to another disk. I am not in a hurry and I will go as slow as necessary.

Whilst Windows Update support for XP has ended, you can still download updates and service packs manually through the Windows Update Catalog: https://www.catalog.update.microsoft.com/Home.aspx

This is due to Microsoft dropping support for the SHA-1 hashing algorithm: https://support.microsoft.com/en-gb/topic/windows-update-sha-1-based-endpoints-discontinued-for-older-windows-devices-10b58bd9-5ba2-b23d-498b-139ce5c709af
« Last Edit: May 13, 2024, 01:30:31 pm by Halcyon »
 
The following users thanked this post: core

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #9 on: May 14, 2024, 04:14:23 am »
Quote
- Use a brand new Crucial BX500 480GB which I have available. This is probably the easiest but I do not know anything about this TRIM business. It sounds like I can install some software that would do it?

Don't panic about TRIM.  Worry about it later if you ever notice the disk being slower than it used to be for writes.  For your purposes it's an optional optimisation.

Quote
And the main question is what is the best, most reliable software to do the imaging?

If you're not afraid of the commandline: ddrescue

Offline m k

  • Super Contributor
  • ***
  • Posts: 2235
  • Country: fi
Re: Failing Win XP HDD
« Reply #10 on: May 14, 2024, 06:17:35 pm »
Buy an external HDD yesterday and do ddrescue, don't forget the log file.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-YFE
(plus lesser brands from the work shop of the world)
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #11 on: May 15, 2024, 08:37:18 am »
I had a look at ddrescue (and ddpt) and it is way too complicated for a one time use. It would take me many hours to study it in detail even though probably I do not need 99% of the options.  I need something simpler. I need a simple solution that will run on Linux. I do not mind using the command line; I just don't want to use something so complicated.  I just want to try to clone a partition. That's all.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html



All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline QOTF-Alexi

  • Newbie
  • Posts: 6
  • Country: nl
    • Alexi's Random Stuff
Re: Failing Win XP HDD
« Reply #12 on: May 15, 2024, 09:03:42 am »
You can try [ODIN](https://sourceforge.net/projects/odin-win/) to get your data off one and onto another drive. It's easy enough to use, although you would need two extra drives, one to put the full disk image (Backup) onto and one to write it to (Restore) again. I have used this a few times for Windows XP machines and it works pretty well, so long your target disk is larger than the source disk.
Also make sure to select "\Device\Harddisk* (Entire Disk)" to get everything, including partition offsets etc.

And refer to [this Vogons thread](https://www.vogons.org/viewtopic.php?t=68421) if you wish to use an SSD with Windows XP. There are apparently a few tools that will send the TRIM command to your SSD. I also know some old SSDs (from around the 2010s) have their own SSD toolbox software that have the TRIM command built-in and it might be worth checking if those toolboxes work on newer SSDs, or get a used one of those old drives, they're probably indestructible.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8028
  • Country: gb
Re: Failing Win XP HDD
« Reply #13 on: May 15, 2024, 06:19:32 pm »
I had a look at ddrescue (and ddpt) and it is way too complicated for a one time use. It would take me many hours to study it in detail even though probably I do not need 99% of the options.  I need something simpler. I need a simple solution that will run on Linux. I do not mind using the command line; I just don't want to use something so complicated.  I just want to try to clone a partition. That's all.

https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html

Code: [Select]
ddrescue source destination mapfile
That's it. It really is that simple. It will do its best to read everything and tell you how much you lost. You can run some retry passes if you really must (but rarely will you get far because the drive will already have tried many times).
« Last Edit: May 15, 2024, 06:21:49 pm by Monkeh »
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #14 on: May 15, 2024, 08:02:04 pm »
ddrescue source destination mapfile

That's it. It really is that simple.


I assume "source destination mapfile" are the three full paths so it would look something like

Code: [Select]
ddrescue /media/user/source /media/user/destination /home/user/desktop/mapfile
Source partition is 336GB, 85 GB used, 251 GB free

Can I clone it to a partition with a size of, say, 150GB. Or does the new partition have to be bigger than 336GB?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #15 on: May 15, 2024, 11:55:30 pm »
You need a bit of Linux & Windows filesystem and block device knowledge here.  If you mix up the source and dest in some way then it's very easy to do more damage (including wiping the disk you want to image), you might want to consider the alternatives to ddrescue if you're not comfortable with all of this.


> Source partition is 336GB, 85 GB used, 251 GB free

This doesn't matter if you backup the whole block device.  It will create a backup file of the whole disk, including "unused" space.  This is required if you want your clone of Windows to be bootable.

You cannot just copy the files inside the Windows partition to another partition.  It will not boot.  Other people may suggest ways around this, you'll have to triage them for complexity and risk.  Some of the methods are quite complex or have hidden gotchas, whilst a full disk clone is relatively safe.

You want the source to be a disk block device like /dev/sda, not the files and folders inside that disk (like a mounted /media/mydisk/).  The former lets you access the raw bytes of the disk itself, the latter only looks at the files inside a partition on the disk.

The "lsblk" and "blkid" commands will help you find out what the name of the block device is.  You want the whole thing (eg /dev/sdc) not just one partition of it (eg /dev/sdc1).


If you have just bought a big new external backup HDD and want to store the backed up disk image as a file then you might do something like this.  I'm assuming that the new drive is mounted at /media/NewDrive/

    ddrescue   /dev/sdc   /media/NewDrive/myclone.image   /media/NewDrive/myclone.ddrescuelog
    (then once this is done: use 'dd' to write myclone.image to a replacement disk)


Alternatively you might want to make a clone of the disk immediately.  I'm assuming here that the new disk is at /dev/sdd:
 
   ddrescue  /dev/sdc  /dev/sdd  somewheresafe.ddrescuelog

This is dangerous -- if you choose the wrong destination then you will wipe something.  ddrescue may or may not warn you.  But it might be required if you don't have enough disks to juggle.


I don't know how big your disk is (you mention a 330GB partition, but that's not all of it).  If it's a 1TB disk then your backup will probably not fit on another 1TB disk (they will be slightly different sizes). YMMV.  It might be possible to cheat by skipping your other (movies?) partition through the use of some arithmetic and clever strategies, but again that's much more complicated with more to go wrong.
« Last Edit: May 16, 2024, 12:08:59 am by Whales »
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #16 on: May 16, 2024, 12:18:16 am »
I have spent several, many, hours fiddling and got nowhere.

After many tries with Clonezilla I thought I had cloned a clone but it didn't work and I did another clone but it still does not work. This is extremely frustrating and a waste of time.

I plug in the disk with the clone copy but get the error "no such partition, entering rescue mode, grub rescue"

I am guessing I am doing something that makes the new disk have grub which it shouldn't. Linux has no place there.

Maybe the partition itself is OK but the boot record needs to be changed. How can I get rid of grub and make it bootable?

Very frustrating.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #17 on: May 16, 2024, 12:24:37 am »
EDIT: Got ninja'd, see my next reply first :P

Perhaps I should take a different tac.

If you have any specific irreplaceable files on that computer (like unobtanium software installers) then copy them off ASAP before doing any bigger rescue attempts. 


I should probably fully explain the different ways of doing your backup:

(1) Files to files.  Copy all of the files off your failing HDD to a new one.

This will not give you a working Windows install on the new system.  Windows has bootloaders (stored outside the partition) and immutable files (files that need to be at magic specific addresses on the disk) amongst other things.


(2) Partion to partition.  Copy the windows (330GB) partition on your failing disk to a new disk.

On its own again this won't boot.  You will need to setup the master boot record on the new disk identically, including the bootloader code, and place the partition at the exact same address. Then it will work. 


(3) Disk to disk.  Copy the failing disk's raw contents to a new disk.

This will work and be fully bootable.  It will take longer than the previous options AND the new disk will need to be bigger than the old disk.


(4) Disk to file.  Copy the failing disk's raw contents into and image file on another disk.

This is the most convenient option in the long term, as you get to keep a backup of the whole disk.  It has the same downsides as option 3 (takes many hours + you need a bigger disk).

This image file can then be:
 - written to a new disk (file to disk)
 - compressed (if it's mostly zeroes then it can be made much smaller)


It's also possible to do partition to file and mbr to file.  I'd probably do that for you in person if I were there (skipping your movies partition) to save some time but there is more to go wrong.
« Last Edit: May 16, 2024, 12:30:03 am by Whales »
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #18 on: May 16, 2024, 12:25:50 am »
I have spent several, many, hours fiddling and got nowhere.

After many tries with Clonezilla I thought I had cloned a clone but it didn't work and I did another clone but it still does not work. This is extremely frustrating and a waste of time.

I plug in the disk with the clone copy but get the error "no such partition, entering rescue mode, grub rescue"

I am guessing I am doing something that makes the new disk have grub which it shouldn't. Linux has no place there.

Maybe the partition itself is OK but the boot record needs to be changed. How can I get rid of grub and make it bootable?

Very frustrating.

Yes it sounds like clonezilla is writing GRUB to the new disk.  Definitely wrong.  I've used clonezilla to clone Windows disks before and it has worked fine; but I recall it having a bajillion options and confusing terminology too :|

Do you remember what options you chose in Clonezilla?  What does the new partition layout look like?

Try booting off a Windows XP install disk and see if it gives you the option of "repair" or "startup repair".  This might be able to fix the bootloader in the MBR.


« Last Edit: May 16, 2024, 12:28:04 am by Whales »
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #19 on: May 16, 2024, 01:07:56 am »
I tried using testdisk to repair/recreate the MBR. Now grub is gone but the disk still does not boot. I am giving up for today and will continue tomorrow but

1- the disk is readable in Linux and all the files are there so I have not lost any files. It is just that I would like to be able to boot.

2- I just realized I am using the disk with an external USB adapter and I do not know if that might make a difference. Maybe I need to plug it in direct to the mobo for clonezilla to be able to write the correct MBR. Maybe grub was there from before. This is something I should have considered earlier.

At this point, before I try to clone again with disk plugged into the mobo, I think I would want to try to recreate the MBR. I tried with testdisk and I get the error message:
Quote
TestDisk 7.1, Data Recovery Utility, July 2019
Christophe GRENIER <grenier@cgsecurity.org>
https://www.cgsecurity.org

Disk /dev/sdj - 480 GB / 447 GiB - CHS 58369 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

Warning: number of heads/cylinder mismatches 54 (NTFS) != 255 (HD)
Warning: number of sectors per track mismatches 28 (NTFS) != 63 (HD)
 1 P HPFS - NTFS              0  32 33 58369  53 52  937699328

Bad relative sector.
No partition is bootable
I do not know how to interpret the heads/cylinder mismatches and if that is important or not.

Very frustrating.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: es
Re: Failing Win XP HDD
« Reply #20 on: May 16, 2024, 01:09:21 am »
Try booting off a Windows XP install disk and see if it gives you the option of "repair" or "startup repair".  This might be able to fix the bootloader in the MBR.
Good idea!  I will try that. Thanks.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1286
  • Country: pl
Re: Failing Win XP HDD
« Reply #21 on: May 16, 2024, 02:59:00 am »
While restoring a device-level clone, mind sector size. Many newer storage devices use 4096 byte sectors, instead of 512 bytes. The copy will be stored properly, but booting from it or using it may be impossible.

Device clone stores all data, including logically unused areas. While this fragment may be of less importance to you, due to your drive being potentially unreadable or unreliable, it may be still worth knowing if other circumstances call for a similar solution. If unused areas are zeroed first, the image may be either efficiently compressed or use sparse files. Zeroing unused space may be done with Windows running: either using specialized tools or by just creating enough of gigantic, zero-filled files to (almost) fill the partition. Then the image may be either stored under Linux as a sparse file:
Code: [Select]
cp --sparse=always /dev/sourcedevice image.img…or compressed:
Code: [Select]
cat /dev/sourcedevice | bzip2 >image.imgbzip2 is my preference here, because it eats zeros better than Solar Roadways eats public money. The operation must of course be done on unencrypted source, since encrypted data doesn’t compress, even if plaintext were zeros. Doing this on a failing disk is also not advisable: zeroing unused space means writing, and both trivial commands rely on reading being always successful.

People imagine AI as T1000. What we got so far is glorified T9.
 

Offline themadhippy

  • Super Contributor
  • ***
  • Posts: 2784
  • Country: gb
Re: Failing Win XP HDD
« Reply #22 on: May 16, 2024, 03:13:16 am »
is xp too modern for xcopy to play nicely?
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1978
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #23 on: May 16, 2024, 04:31:08 am »
While restoring a device-level clone, mind sector size. Many newer storage devices use 4096 byte sectors, instead of 512 bytes.

I thought the same, but I found out recently this is untrue in the consumer sector.  Even when the device internally uses 4K sectors it will still (by default) pretend it uses a 512b sector size.  4k sector sizes are incompatible with some BIOS and the disk won't be bootable. 

(In practice some NVME drives let you change this option.  Internally however they use sectors much bigger than 4k anyway, so they can fit things like error correction codes)

Quote
2- I just realized I am using the disk with an external USB adapter and I do not know if that might make a difference. Maybe I need to plug it in direct to the mobo for clonezilla to be able to write the correct MBR. Maybe grub was there from before. This is something I should have considered earlier.

It's fine.

Concepts like MBRs, partition tables and filesystems are all just patterns of data on the disk.  The external USB adaptor doesn't understand nor interfere with any of them.

The worst that might happen is your old board's BIOS can't boot off the external USB device (some pre-2010 motherboards/BIOS were like this or had buggy implementations).
« Last Edit: May 16, 2024, 04:34:20 am by Whales »
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2235
  • Country: fi
Re: Failing Win XP HDD
« Reply #24 on: May 16, 2024, 08:00:55 am »
I have spent several, many, hours fiddling and got nowhere.

Are you saving data or something else?
The thing is finally partition based anyway, so forget secondary stuff.

First you

cd thirdplace
ddrescue /dev/sdaX dest.img dest.map

Destination file must be there beforehand.
Map file means you can stop anytime and continue anytime.
(so not log file)

Now you have a backup and data is safe.

A replacement disk.
So you put in a new disk and create a bootable partition, sized like the original, or bigger.
After that you can write the image to new disk.
And then you have a bootable partition with original data.

If you want smaller partition you must rearrange files first.
After that you can resize the partition as you like.
Advance-Aneng-Appa-AVO-Beckman-Danbridge-Data Tech-Fluke-General Radio-H. W. Sullivan-Heathkit-HP-Kaise-Kyoritsu-Leeds & Northrup-Mastech-REO-Simpson-Sinclair-Tektronix-Tokyo Rikosha-Topward-Triplett-YFE
(plus lesser brands from the work shop of the world)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf