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

0 Members and 2 Guests are viewing this topic.

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 1939
  • 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: 1939
  • 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: 8321
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: 1258
  • 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: 5736
  • 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 »
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 5736
  • 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: 1939
  • 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: 2157
  • 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)
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 8020
  • 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 »
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 1939
  • 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 »
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 1939
  • 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: 1939
  • 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 »
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • 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: 1258
  • 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.
 

Online themadhippy

  • Super Contributor
  • ***
  • Posts: 2723
  • 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: 1939
  • 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: 2157
  • 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)
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #25 on: May 16, 2024, 10:12:47 am »
I tried the WinXP install disk trick but did not get anywhere. This is very frustrating. I remember with Win95/98 I had 4.3GB HDD and would clone them as backups easily and often. I could just plug in any of the HDD and it would work. I do not remember how I did the cloning or what software I used. I can't believe how complicated the same basic thing has become. I mean, I have cloned the partition and all the files are there but the partition will just not boot.

Each image/restore/clone, whatever, takes like 4 hours and I have done quite a few in the last few days only to discover at the end of each run that it did not work. This is a big waste of time.

gnome-disks reports the cloned HDD/partition is MBR, NTFS

It mounts and data is accessible. If it is connected the computer knows it is there and it is like it is trying to boot but the screen goes blank and stops there and just freezes.  It is not a case of not even knowing it is there.

Very, very frustrating.

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

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #26 on: May 16, 2024, 06:19:53 pm »
Get new disk more than double size of original boot partition and use its second partition as a thrdplace.

No need to try any fancy stuff, backup image can go back to primary partition with simple dd command.
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 golden_labels

  • Super Contributor
  • ***
  • Posts: 1258
  • Country: pl
Re: Failing Win XP HDD
« Reply #27 on: May 16, 2024, 10:33:32 pm »
soldar:
I wasn’t able to visit this thread often enough in recent days, so I didn’t read all posts in full. Perhaps this is why I’m a bit confused, but I have a feeling it’s not only that.

What are you trying to achieve, exactly? Because it seems that at one time you want to clone and boot (and it fails), at other you just want to have a backup copy (possibly with compression). Which one is your goal?

You were also suggested to use ddrescue. The use of a tool of this kind is critical here, because the disk reports unstable sectors. They aren’t going to be readable and must be skipped while cloning. I do understand you may be confused by its interface and there is nothing wrong with that. Quite opposite: since your data is at risk and a mistake can be catastrophic, doubts are highly advised! Ask 20 times to be sure! :) But there are people on the forum and we’ll happily clarify things and doubts. You may use a different program, but that gives a rise to two issues: whether they even deal correctly with such sectors and if you can find anybody knowing them well enough to help.

If there was no unstable sectors, the answer would be trivial:
Code: [Select]
cp /dev/old_hdd /dev/new_hdd… and cleanly reboot. One may issue that to ensure the entire write is complete before the reboot starts:
Code: [Select]
blockdev --flushbufs /dev/new_hddBut, as long as the reboot is clean, it’s only moving the write to an earlier time, speeding up the shutdown process itself.





« Last Edit: May 16, 2024, 10:44:14 pm by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1939
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #28 on: May 17, 2024, 07:54:17 am »
I remember with Win95/98 I had 4.3GB HDD and would clone them as backups easily [...] I can't believe how complicated the same basic thing has become. I mean, I have cloned the partition and all the files are there but the partition will just not boot.

You're talking about two separate things.

Cloning a whole disk is simple and reliable.  I recommend this method.  You will end up with a bootable Windows XP system.  This is what you describe as working from your Win95/98 experiences.

Cloning a partition will not give you a bootable system.  I do not recommend this method.  It sounds like this is what you are currently trying.


Quote
gnome-disks reports the cloned HDD/partition is MBR, NTFS

That doesn't mean you have the right MBR.  If you only clone the partition then you will have a blank/useless boot sector in your MBR.

Additionally you might run into problems such as VBR preservation (I can't recall if WinXP uses a VBR) or having critical/immutable files at the right addresses.
 
The following users thanked this post: soldar

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #29 on: May 17, 2024, 09:22:23 am »
I remember with Win95/98 I had 4.3GB HDD and would clone them as backups easily [...] I can't believe how complicated the same basic thing has become. I mean, I have cloned the partition and all the files are there but the partition will just not boot.

You're talking about two separate things.

Cloning a whole disk is simple and reliable.  I recommend this method.  You will end up with a bootable Windows XP system.  This is what you describe as working from your Win95/98 experiences.

Cloning a partition will not give you a bootable system.  I do not recommend this method.  It sounds like this is what you are currently trying.


Quote
gnome-disks reports the cloned HDD/partition is MBR, NTFS

That doesn't mean you have the right MBR.  If you only clone the partition then you will have a blank/useless boot sector in your MBR.

Additionally you might run into problems such as VBR preservation (I can't recall if WinXP uses a VBR) or having critical/immutable files at the right addresses.


Thanks. I think you might have found the cause.

So you think the best course of action is to buy an identical HDD and clone?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1939
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #30 on: May 17, 2024, 12:38:53 pm »
That's the simplest solution.  But make it a bigger disk (there is seldom such thing as identical size between models and brands) and I would always recommend an SSD.

If your existing disk is rather large (eg 1TB) then this will probably be costly (2TB!).  If an SSD is too expensive then perhaps buy a HDD.  You can always try a migration to a smaller SSD another day.

It might (emphasis on might) be possible to get the same sized disk (or maybe a smaller one) if you don't mind the last (non-Windows-system) partitions getting truncated and corrupt.  I vaguelly believe that your windows partition is only 300GB and the rest of the space is a movies partition, or something similar?  You may have to manually fix the partition table on the clone (eg delete the truncated partition in gparted) to make Windows stop complaining or crashing from the strangeness.
« Last Edit: May 17, 2024, 12:52:43 pm by Whales »
 
The following users thanked this post: soldar

Offline radiolistener

  • Super Contributor
  • ***
  • Posts: 3505
  • Country: ua
Re: Failing Win XP HDD
« Reply #31 on: May 17, 2024, 12:47:36 pm »
if reallocated sector count don't grows with time it can work for a long time. But if it grows, the disc will become almost unusable pretty soon.

I have one Hitachi HDD which has some minor reallocated sector count within first year of using. But it didn't grow. This hdd still works after about 15 years of almost every day usage.
« Last Edit: May 17, 2024, 12:50:29 pm by radiolistener »
 

Online coromonadalix

  • Super Contributor
  • ***
  • Posts: 6101
  • Country: ca
Re: Failing Win XP HDD
« Reply #32 on: May 17, 2024, 01:03:31 pm »
simplest solution is:   buy a drive  XP will accept in size a redo a full install

xp sp3 pack is available and post sp3 updates too    ....  i'll never clone a drive who may have growing problems, if its the case

and if it was in a instrument or a machine,  put the drive in an external dock, copy windows folder elsewhere,  and other folders who could contain drivers

that way you may be able to recover special drivers ...


if you clone a drive in RAW  mode  you may end up with some problems   even if you think the mbr could be repaired in some ways ... or else ...
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #33 on: May 17, 2024, 05:42:19 pm »
if reallocated sector count don't grows with time it can work for a long time. But if it grows, the disc will become almost unusable pretty soon.

I have one Hitachi HDD which has some minor reallocated sector count within first year of using. But it didn't grow. This hdd still works after about 15 years of almost every day usage.
Just this morning I was having a friendly chat with my neighborhood corner computer store guy and he said the same thing. He said he has a system he uses just for entertainment and has some bad sectors but he decided to just wait until it fails and it's been working fine like that for over 8 years. So I guess my drive could totally fail tomorrow or it could continue to work for years.

For now the alarm message is about one (1) reallocated sector.

It is probably a good idea for me to watch that number and see how it evolves.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #34 on: May 17, 2024, 05:47:36 pm »
For now the alarm message is about one (1) reallocated sector.

No, it's for 0x7c8 reallocated sectors. That's 1,992 of them. And 0x68 (104) pending sectors it can't read (ie. data is gone) and will reallocate on write if it has any spares left.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #35 on: May 17, 2024, 06:05:00 pm »
For now the alarm message is about one (1) reallocated sector.

No, it's for 0x7c8 reallocated sectors. That's 1,992 of them. And 0x68 (104) pending sectors it can't read (ie. data is gone) and will reallocate on write if it has any spares left.


Oh, Ok, thank you for the heads up. I see it now. Oh, wow, that sounds pretty bad.

I am going to try to use that computer as little as possible and try to replace the disk as soon as possible.

Still, I have backups of all data files and I am just trying to save the OS install. If worse comes to worst I will just reinstall.

The prices of drives are much cheaper in the USA so I will have to wait until someone can bring me one.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #36 on: May 18, 2024, 12:18:18 am »
Ha! I just remembered I have an unused 3TB HDD.

My video security NVR recorder failed about a year ago and I thought it was the HDD so I bought another one. It turned out the HDD was fine and it was the wall wart PSU that had failed so I have the brand new, unused, 3TB HDD in a box.

I will be trying to clone in it and see how that goes.

Interestingly, the original NVR HDD has been going strong 24/7 for more than 12 years now.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Halcyon

  • Global Moderator
  • *****
  • Posts: 5736
  • Country: au
Re: Failing Win XP HDD
« Reply #37 on: May 18, 2024, 02:18:40 am »
For cloning on old machines, I typically just boot off a boot disk and use good old Norton Ghost 5.1c (one of the few good applications Norton actually developed). You can image either directly to another disk or to an image for use later. Does exactly what it says on the tin.
 
The following users thanked this post: DimitriP

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #38 on: May 18, 2024, 07:59:12 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.
Problem of disk-cloning is cutting of unusable sectors. I wrote for myself intelligent skipping, but actual loud programs for cloning too bad to do this as I see.

The problem looks like this: one sector of 512 bytes is error, but whole buffer is discarded from stupid program, lost data.
« Last Edit: May 18, 2024, 08:09:58 am by Postal2 »
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #39 on: May 18, 2024, 08:45:25 am »
For generic old machine it's also good to remember that disk access has evolved.

When cloning happens there is a "natural" CHS to LBA change.
But different type of CHS can't take that LBA back.
Or can, literally, but sectors are misplaced.

If first cylinder is big enough the bad disk can even boot, sort of.

Some CHS limits
1024 * 16 * 63 => 1M * 512 bytes/sector
1024 * 255 * 63 => 16M * 512 bytes/sector
First is 0/0/1 and 255 is a bug

https://en.wikipedia.org/wiki/Cylinder-head-sector
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)
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #40 on: May 18, 2024, 03:27:47 pm »
When it rains it pours.

I just now tried to start it up but before even finishing the self-test I got a message that it was overheating.

With all this messing with it I probably bumped the processor heat sink and it needs new thermal paste and reseating... which will have to wait because I do not have thermal paste. It is a good moment to give the heatsink a good cleaning. I remember the one that came with the Intel processor was not big enough and I replaced it with this one which is bigger.

I only need some thermal paste every few years and I end up throwing it away because I use a drop and have no use for the rest.

Is there anything I could use as thermal paste as a temporary thing?  Ketchup maybe?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1258
  • Country: pl
Re: Failing Win XP HDD
« Reply #41 on: May 18, 2024, 06:17:44 pm »
The problem looks like this: one sector of 512 bytes is error, but whole buffer is discarded from stupid program, lost data.
Exactly why we insist on cloning it using ddrescue. Or anything, where the right behavior can be guaranteed.

Is there anything I could use as thermal paste as a temporary thing?  Ketchup maybe?
Nothing works best, second to properly applied thermal paste. Just clean both surfaces, make sure they are dry, and mount the cooler. The CPU shouldn’t be overheating during normal operation just because there is no thermal paste.
People imagine AI as T1000. What we got so far is glorified T9.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #42 on: May 18, 2024, 09:23:09 pm »
I reseated the heat sink with what thermal paste it had and after monitoring the temperature of the processor it seems fine.

I booted with Linux and tried to use clonezilla to clone the 1TB HDD to the 3TB HDD but It will not do it and gives me the error that MBR only supports up to 2GB.

I was hoping it could just clone the 1TB and pretend the rest of the (not needed) space does not exist. That the destination HDD is just 1 TB. How can I get around this?

It also insists on installing grub which I do not want or need.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: va
Re: Failing Win XP HDD
« Reply #43 on: May 18, 2024, 10:12:04 pm »
An alternative means would be to use DriveSnapshot:

http://www.drivesnapshot.de/en/

This is what I used to use for disaster recovery, and it saved my bacon more then a couple of times. I would be tempted not to clone the entire disk but make images of each partition. DriveSnapshot will offer to restore the MBR even if you're restoring a single partition so you end up with a good clone but without having to do it all in one shot (a problem if you get disk errors partway through).

An important point, though, and one that you may have tripped over earlier: after doing a restore, if the system doesn't boot just check that the relevant partition is set active and bootable. A restore operation normally doesn't make the partition active even if it was your boot partition on the old system. Typically, if you get into that state you'll need a partition management tool.

Minitool do a decent GUI partition utility, but on XP now you'll probably need to use diskpart from DOS. A Minitool quick guide to that is here:

https://www.minitool.com/lib/hard-disk-active-partition.html
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #44 on: May 19, 2024, 11:19:20 am »
There is a difference between a format of floppy and hard disk.
Floppy is always a partition.

Partition doesn't include an information of boot or not, it's earlier in a chain of startup operations.
So with hard disks fdisk is needed once before all formats, fdisk creates that extra info.

A device has a block zero, fdisk creates an information of position of another block zero, that is a dynamic position and the one from where a partition starts.
So when doing an image of a partition the operation doesn't touch the information of what kind of a partition, if the image creating software doesn't do something extra.

Don't use an image creating software that does something you can't control.
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)
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #45 on: May 19, 2024, 09:57:55 pm »
I have spent too many hours over several days and was ready to throw in the towel but I am giving it one last try.

Using ddrescue I am cloning the entire 1 TB drive to a 3 TB drive and it seems to be going along. The first 600 GB went reasonably well but then it slowed down to a crawl so I will leave it overnight and see what I find in the morning. At this rate it could take days. I assume it has slowed down because it is were the errors are and it is reading over and over. Still, the error count reads 0 so I want to think it is finally successfully reading everything. I know I shouldn't sell the bear before it hatches but a couple questions while I wait for this to happen:

The slowdown started at about 600 GB and the main OS partition is 336 GB. Does this mean the bad sectors are in the second, data partition and not in the first, OS, partition?

If this is the case, would it be relatively safe to use the disk using only the lower half?

In any case, if I manage to recover the entire disk, I would not want to leave it on the 3 TB drive. In fact I would prefer to separate the OS on to a separate, smaller drive. But I guess we'll cross that bridge if and when we get to it.
« Last Edit: May 19, 2024, 09:59:35 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: va
Re: Failing Win XP HDD
« Reply #46 on: May 19, 2024, 10:15:33 pm »
IMO if you're seeing errors it's a dead disk turning already. The error recovery stuff on modern drives (that is, more recent than MFM) is pretty damn good and pretends all is well until it can't cope anymore, and then it gives up. It's then that it lets on there's some trouble ahead.

Also, if there are disk errors I wouldn't clone a drive because it will stumble over the faulty sectors. Which may not actually be used for anything. And you spend a good proportion of the time copying sectors with no valid data on. That's why images are better: any decent imaging software will only image sectors that are used by the OS, so sectors without valid data don't waste time getting copied, nor do they take up space storing nothing at all.

Finally (probably) you can take an image and either browse it as if it were a virtual drive, or load it up as a virtual machine. Or both, if you're that way inclined. The image is also your backup so whatever happens after that doesn't really matter - original disk dies completely, you screw up a restore, PC blows up, whatever. Just do another restore from the image to a fresh disk. Once you screw up the original disk you're stuffed if you're relying on doing another clone.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1258
  • Country: pl
Re: Failing Win XP HDD
« Reply #47 on: May 20, 2024, 02:30:30 am »
soldar: ddrescue will by default not waste too much time on sectors reported as unreadable. But the disk itself will spend some time retrying reading. Disks are optimized for reading long data streams, not retrying a single sector. Multiply the slowdown by each unreadable sector ddrescue tries to read.

Also note that ddrescue may be interrupted and, if needed, resumed. That’s what the mapfile is for. So, if you are impatient but certain it cloned the partition you care about, you may try this route.

PlainName: except that the “smart” cloning software mentioned in this thread so far is failing. Since nobody here knows, what exactly it does and if it’s even capable of working with damaged media, it’s impossible to debug the situation either.
« Last Edit: May 20, 2024, 02:32:57 am by golden_labels »
People imagine AI as T1000. What we got so far is glorified T9.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #48 on: May 20, 2024, 07:42:25 am »
I assume it has slowed down because it is were the errors are and it is reading over and over.
No. It is cloning program switches to 512 buffer size and no try back.

Also, if there are disk errors I wouldn't clone a drive because it will stumble over the faulty sectors.
No. You can use "Format" or create partitions outside of errors (mechanical HDD, SSD uses imitation of error).

But the disk itself will spend some time retrying reading.
No. Cloning program meet error, set buffer to 512 and re-read from point of error to the end as I see. Data of unreadable sector is set all 0 on clone-receiver.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #49 on: May 20, 2024, 07:55:42 am »
It took like 11 hours to do the part between 600 and 660 GB and it reports 374 errors and errsize 20914 KB.

4 hours for the first 600 GB and 11 hrs for the next 70 GB

I am hoping this is in the second partition and would not affect the boot or the OS.

I know in theory I can stop and restart the process but I would rather not take risks. And I am doing it from a live session of Linux Mint so I would have to copy the logfile to a pendrive before I shut it down. Not worth the risk. It has now resumed normal speed so if it does not hit any more bad spots I am hoping  it will finish in the next 2 or 3 hours.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #50 on: May 20, 2024, 08:15:10 am »
374 errors and errsize 20914 KB.
20914/374~56kB, assumed buffer 64kB and not been decreased. Program is dumb. Data is lost.

This is the cause I wrote my own program for cloning. I used source of "win32diskimager", anybody can try. It's easy.
« Last Edit: May 20, 2024, 08:32:36 am by Postal2 »
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: va
Re: Failing Win XP HDD
« Reply #51 on: May 20, 2024, 11:44:46 am »
PlainName: except that the “smart” cloning software mentioned in this thread so far is failing. Since nobody here knows, what exactly it does and if it’s even capable of working with damaged media, it’s impossible to debug the situation either.

I explained why doing it by partition would likely fail: the boot partition probably wasn't being set active. It's easy to stumble over that because a normal restore to the original disk works because the partition is already set correctly, but to a new disk - which is the case here - the restored partition isn't marked active or bootable so fails.

And, contrary to your assertion, we know exactly what the things do. There are two modes: intelligent (which you presumably refer to as 'magic') and dumb. In the latter case every sector is copied regardless, but that's a waste of space and normally only used if the partition is an unknown format. The 'magic' case just copies sectors that the filesystem is using and is perfectly fine - even if you copied all the unused sectors, the filesystem wouldn't use them anyway so there is no point in doing so.

The only thing we don't know is the compression scheme used to make the copy smaller than the original, for storage purposes.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #52 on: May 20, 2024, 12:21:59 pm »
It has now resumed normal speed so if it does not hit any more bad spots I am hoping  it will finish in the next 2 or 3 hours.

If minimum size is smaller than error size/error count, like is an assumption, it goes back to that area.
If and when that happens be brave and stop it.
Save the map file and be ready to go back when needed.

For sector by sector, block by block or something else.
This is rescue, not backup, so least stress for most reads, that can be many things.

For backups 3-2-1 is better if just 3-2, 3 copies and 2 physical locations.
More is also not worse here.
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)
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #53 on: May 20, 2024, 02:49:12 pm »
If minimum size is smaller than error size/error count, like is an assumption, it goes back to that area.
If and when that happens be brave and stop it.
Save the map file and be ready to go back when needed.

For sector by sector, block by block or something else.
This is rescue, not backup, so least stress for most reads, that can be many things.
I have no idea what any of this means.

At this point it's been going for 22 hours and it has slowed down again. It done 954 GB and, since the drive is 1000GB, it has about 4.5% to go. But it has slowed down again so it could go on for hours. I will wait and see.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #54 on: May 20, 2024, 02:58:02 pm »
If minimum size is smaller than error size/error count, ....
Error size is a chunk protected by ECC, it's easy to guess about it size by personal experience.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #55 on: May 20, 2024, 06:11:12 pm »
It's been going for 25 hours now. I just finished Pass 1 (forward) and now it has started Pass 2 (backwards).

I have no idea how long this will take but as I see the count of "rescued" is increasing I will leave it and see how it goes.

I just hope it does not take another 25 hours.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #56 on: May 20, 2024, 06:26:09 pm »
374 errors and errsize 20914 KB.
20914/374~56kB, assumed buffer 64kB and not been decreased. Program is dumb. Data is lost.

Program hasn't finished, it has further passes to do which will reduce the loss to the sector level.

Don't run your mouth when you haven't done the work.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #57 on: May 20, 2024, 07:06:22 pm »
OK, program has finished after 26 hours and apparently everything was saved and nothing was lost.

I have booted from the clone and it boots fine. I hope everything works well. The report:
Quote
# Rescue Logfile. Created by GNU ddrescue version 1.19
# Command line: ddrescue --force /dev/sda /dev/sdb /home/mint/Desktop/logfile
# Start time:   2024-05-19 16:47:34
# Current time: 2024-05-20 18:35:44
# Finished
# current_pos  current_status
0xDE267BFE00     +
#      pos        size  status
0x00000000  0xE8E0DB6000  +

= = = = = = = = = = = = = =

mint@mint ~ $ sudo ddrescue --force /dev/sda /dev/sdb /home/mint/Desktop/logfile
GNU ddrescue 1.19
Press Ctrl-C to interrupt
rescued:     1000 GB,  errsize:       0 B,  current rate:    1031 kB/s
   ipos:   954128 MB,   errors:       0,    average rate:   10767 kB/s
   opos:   954128 MB, run time:    1.07 d,  successful read:       0 s ago
Finished                                     
Thanks to all for your help and encouragement.  If any further problem comes up with this I will post.

I now have a 3TB HDD with on 336 GB OS partition, a 663 storage partition and 2 TB free.

My next project will probably be to move the OS partition to a 500GB SSD, move the storage data to a separate HDD and free this 3TB HDD. But I will do that in the future, when I have recovered from this ordeal.
« Last Edit: May 20, 2024, 07:16:33 pm by soldar »
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 
The following users thanked this post: Whales

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #58 on: May 20, 2024, 08:02:16 pm »
it has further passes to do which will reduce the loss to the sector level.
I can do that work with modified win32diskimager in 4 hour or less for 1 TB.
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: va
Re: Failing Win XP HDD
« Reply #59 on: May 20, 2024, 08:04:34 pm »
Quote
I have booted from the clone and it boots fine.

Well done. I bet that's a relief :)

Quote
My next project will probably be to move the OS partition to a 500GB SSD

You would probably benefit by using that opportunity to test your backup regime. Usually, putting disaster recovery through its paces isn't too practical, but with a new drive you can do it as many times as it takes to succeed without breaking anything more than temporarily.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #60 on: May 20, 2024, 08:06:32 pm »
it has further passes to do which will reduce the loss to the sector level.
I can do that work with modified win32diskimager in 4 hour or less for 1 TB.

Not when the drive is holding you up, you can't. This is clearly an extremely distressed device.

And as you clearly missed it: The 'work' is informing yourself, rather than making guesses as to the function of a program which exists to perform this recovery task, and has done so for nearly 20 years.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #61 on: May 20, 2024, 08:19:07 pm »
Not when the drive is holding you up, you can't.
I have experience with Samsung HD250HJ in one hour. Fully equal work.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #62 on: May 20, 2024, 08:23:51 pm »
Not when the drive is holding you up, you can't.
I have experience with Samsung HD250HJ in one hour. Fully equal work.

And did that drive have as severe a set of surface defects causing it to retry reads for long periods of time? Is it running firmware with identical behaviour?

Your modified tool is surely very nice and capable of bypassing fundamental drive behaviours, but I'll stick with a proven one you apparently couldn't find.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #63 on: May 20, 2024, 08:34:51 pm »
And did that drive have as severe a set of surface defects causing it to retry reads for long periods of time?
No, disk did not retry because program is not so dumb to send such command. Disk retries himself when lose track, but errors was in data, discovered by ECC.
 

Offline Whales

  • Super Contributor
  • ***
  • Posts: 1939
  • Country: au
    • Halestrom
Re: Failing Win XP HDD
« Reply #64 on: May 21, 2024, 12:21:12 am »
Congrats soldar :)  Glad you got a working clone.
 
The following users thanked this post: soldar

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #65 on: May 21, 2024, 12:59:56 am »
And did that drive have as severe a set of surface defects causing it to retry reads for long periods of time?
No, disk did not retry because program is not so dumb to send such command. Disk retries himself when lose track, but errors was in data, discovered by ECC.

And how certain are you that the drive in this case actually supports any read without retry command and that they actually behave in the expected manner? They've all been obsolete since the year 2000.

Did you really go to the effort of hacking direct ATA access into a tool to do that?
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #66 on: May 21, 2024, 07:06:22 am »
Congrats soldar :)  Glad you got a working clone.

It took many tries and a lot of time but I am glad I persevered.

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

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #67 on: May 21, 2024, 07:38:54 am »
Being stubborn is sometimes a virtue.

For the side track,
smartctl scterc
WD TLER
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)
 
The following users thanked this post: soldar

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #68 on: May 21, 2024, 09:32:32 am »
And how certain are you that the drive in this case actually supports any read without retry command and that they actually behave in the expected manner? They've all been obsolete since the year 2000.
Did you really go to the effort of hacking direct ATA access into a tool to do that?
Of course, I did have a debug session with program and several disks. Disks slows down due intensive ECC calculation, but no sound of mechanical retry. And yes, I tried with shoked disks from notebooks who did retry, but no data has been retrieved from it (from regions with mechanical sound).
I see soldar succeded, I assume first variant with retry by dumb command.
About ATA-commands - I did modify win32diskimager, nothing added, works good. See source.
 

Offline golden_labels

  • Super Contributor
  • ***
  • Posts: 1258
  • Country: pl
Re: Failing Win XP HDD
« Reply #69 on: May 21, 2024, 05:41:27 pm »
It took many tries and a lot of time but I am glad I persevered.
Congrats!

I’m also glad we persevered in insisting on you using ddrescue. ;)
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 #70 on: May 21, 2024, 08:27:18 pm »
I would definitely go for an SSD.
It made a huge difference in speed to my laptop.

 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #71 on: May 21, 2024, 09:44:58 pm »
I would definitely go for an SSD.
It made a huge difference in speed to my laptop.

Well, that is what i was trying to do initially but it did not work. Finally I managed to clone the entire 1TB HDD to a 3 TB HDD.

Now the problem of sector errors is solved but I still want to do what I was trying to do in the beginning:

I have a 336GB bootable partition with the OS and a 663 GB partition for storage (plus, now, 2 TB free).

I have available a brand new Crucial BX500 480GB SSB. What I would like to do is clone the OS partition to that SSD but it has to be bootable and this is the rub, this is what I could not achieve. It seems for the drive to be bootable I have to clone the entire drive which is precisely what I do not want to do.  I want to have on the SSD only the OS partition. I have managed to copy the partition but then it will not boot.

Now that I have cloned the entire HDD the urgency is gone and I need a rest after this ordeal. I might open a new thread with this issue. Someone mentioned GParted. Maybe I'll have a look at that.

In summary, I want to clone the OS partition from the HDD to the SSD but also the MBR so it will boot.
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Online PlainName

  • Super Contributor
  • ***
  • Posts: 6974
  • Country: va
Re: Failing Win XP HDD
« Reply #72 on: May 21, 2024, 10:01:13 pm »
Quote
What I would like to do is clone the OS partition to that SSD but it has to be bootable and this is the rub, this is what I could not achieve. It seems for the drive to be bootable I have to clone the entire drive which is precisely what I do not want to do.  I want to have on the SSD only the OS partition. I have managed to copy the partition but then it will not boot.

I've spelled out a couple of times how to fix that, and it's expected. There's a simple DOS command which will fix it after copying the partition.

Also as I noted a short while ago, now you have a working system and will soon have a spare disk, why not use that to practice this stuff? You'll learn something useful and it won't break anything.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #73 on: May 22, 2024, 07:41:31 am »
.....I have a 336GB bootable partition with the OS and a 663 GB partition for storage (plus, now, 2 TB free).

I have available a brand new Crucial BX500 480GB SSB. What I would like to do is clone the OS partition to that SSD but it has to be bootable and this is the rub, this is what I could not achieve. ........

In summary, I want to clone the OS partition from the HDD to the SSD but also the MBR so it will boot.
No problem, simply start cloning to smaller disk and do to the end of his size. Clone will boot. I do that regularly.

It's taking about 30 min (480GB direct cloning).
« Last Edit: May 22, 2024, 08:00:00 am by Postal2 »
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #74 on: May 22, 2024, 08:14:37 am »
In summary, I want to clone the OS partition from the HDD to the SSD but also the MBR so it will boot.

If boot partition is from the beginning of the disk you have two possibilities.
One is to clone from the beginning so much that the whole partition is cloned and then clean the rest away.
Other is to first create an empty bootable partition and then clone its content.

ddrescue can do both, cloning from the beginning is probably the easier way.
--size is a self explaining option.

Linux limitations of mangling NTFS partition should be history, but maybe not.
Windows is also picky, but should start its fixes automatically.

Seems that I can't actually remember how XP drops to console mode.
That's possibly needed, being the last resort.

Doing ddrescue with partitions is also very simple, just add those numbers after device names.
Target partition can be bigger, LBA access mode is dynamic, absolute location of blocks is not relevant.
I guess all Linux desktops have some sort of a graphical device manager/viewer with a simple drive list.
You can also create that empty partition using Windows and then change the operating system for cloning.

lshw -class disk -short
lsblk -t
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 Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #75 on: May 22, 2024, 08:27:49 am »
soldar, if your OS is Windows, I can provide my tool for cloning with instructions. You will finish your work in 30 minutes.
 

Online soldarTopic starter

  • Super Contributor
  • ***
  • Posts: 3447
  • Country: es
Re: Failing Win XP HDD
« Reply #76 on: May 22, 2024, 09:20:27 am »
--size is a self explaining option.

Probably this option might have worked for me the first time around had I known it. Without it I just got an error that the destination was smaller than the original and the program terminated. 

I might try this next first but I want to wait a while because I have spent too much time on this already and I need to recover myself. And I want to make sure everything works OK in my new copy so I will be using it for a while before I do the new clone.

So, let us assume:

Origin:
sda = MBR, total 3TB, HDD
- sda1 : 336 GB NTFS
- sda2 : 663 GB NTFS
- Empty space : 2 TB

Destination:
sdb : 500 GB, empty, SSD

So I can try
sudo ddrescue --size 350GB /dev/sda /dev/sdb /home/user/Desktop/mapfile.txt

And that would copy the MBR, the first partition and just the beginning of the second partition. Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?
All my posts are made with 100% recycled electrons and bare traces of grey matter.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #77 on: May 22, 2024, 09:28:13 am »
........ Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?
You can boot clone and make all needed from there.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #78 on: May 22, 2024, 02:20:55 pm »
So I can try
sudo ddrescue --size 350GB /dev/sda /dev/sdb /home/user/Desktop/mapfile.txt

And that would copy the MBR, the first partition and just the beginning of the second partition. Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?

Yes.
But since there are no problems now you can drop the mapfile.
You can also try something fancy, since as you know, Linux is a nerd thing.

Generally syntax between options like -s and --size are different, but it's not stone carved.
Usually '--' and '=' are friends.

sudo touch /home/user/Desktop/1st_blk.img
sudo ddrescue -s 512 /dev/sdb /home/user/Desktop/1st_blk.img
sudo hexdump --canonical /home/user/Desktop/1st_blk.img > /home/user/Desktop/1st_blk.txt

There's your new MBR, it may have many copies.

sudo touch /home/user/Desktop/some_blocks.img
sudo ddrescue -s 4096 /dev/sdb /home/user/Desktop/some_blocks.img

Then the fancy part.

sudo ddrescue -o 462 --size=16 /dev/zero /dev/sdb

Now you have cleared the second partition table, or that's at least my impression.
Not very canonical way of ddrescue, but hey, it's a nerd thing.
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 Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #79 on: May 22, 2024, 06:29:57 pm »
soldar, if your OS is Windows, I can provide my tool for cloning with instructions. You will finish your work in 30 minutes.

Just like with any other tool once you're done dealing with drive firmware.

Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?

Don't enlarge the partition from outside Windows. Windows is not smart, and will break.
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #80 on: May 22, 2024, 07:14:26 pm »
Just like with any other tool once you're done dealing with drive firmware.
I told you, it's natively win32diskimager.
https://github.com/joshg253/win32diskimager/blob/master/src/disk.cpp

Added:
Enumerating all disks via setupapi;
Enhanced checking/skipping of errors;
Variable buffer size.
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #81 on: May 22, 2024, 07:32:15 pm »
Just like with any other tool once you're done dealing with drive firmware.
I told you, it's natively win32diskimager.
https://github.com/joshg253/win32diskimager/blob/master/src/disk.cpp

And? It's not magically faster than any other tool which relies on the OS to handle the disk. Now he has a clean copy there's no bottleneck (which was never the tool, always the drive).
 

Offline Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #82 on: May 22, 2024, 07:42:02 pm »
And? It's not magically faster than any other tool which relies on the OS to handle the disk.
You right. It's not magically faster. Simply your tool is magically slower.

(which was never the tool, always the drive).
Okay, dumb disk drive seats on the track, watch track signature, can re-read without moving, but so dumb to execute reset. Your tool nothing do with it.
« Last Edit: May 22, 2024, 08:00:57 pm by Postal2 »
 

Offline Monkeh

  • Super Contributor
  • ***
  • Posts: 8020
  • Country: gb
Re: Failing Win XP HDD
« Reply #83 on: May 23, 2024, 12:36:22 am »
And? It's not magically faster than any other tool which relies on the OS to handle the disk.
You right. It's not magically faster. Simply your tool is magically slower.

The tool you didn't even know existed, despite it being 20 years old, and that you've not used or done any research on.

Not my tool. And not my fault you haven't encountered drives which aggressively retry reads rather than return errors.

Seeing as the issue of cloning a failing drive successfully is now resolved with industry standard, openly available tooling, perhaps instead of confusing matters further you could just go learn about that.
 

Offline m k

  • Super Contributor
  • ***
  • Posts: 2157
  • Country: fi
Re: Failing Win XP HDD
« Reply #84 on: May 23, 2024, 07:43:33 am »
Then I could use something like gparted or similar tool to delete the part of the second partition and enlarge the first partition to fill the entire 500 GB of the SSD. Correct?

Don't enlarge the partition from outside Windows. Windows is not smart, and will break.

Yes, luckily nowadays Windows has a simple tool for that.
But it doesn't move files, or didn't when I used it, so defrag may be needed.
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 Postal2

  • Regular Contributor
  • *
  • Posts: 75
  • Country: ru
Re: Failing Win XP HDD
« Reply #85 on: May 23, 2024, 08:01:41 am »
The tool you didn't even know existed, despite it being 20 years old, and that you've not used or done any research on.
I know program "Calibrate" from Norton which behavior exactly same and so old too.

And not my fault you haven't encountered drives which aggressively retry reads rather than return errors.
Yes I encountered in the last century.

I told you, disk retries himself when lose track, but in this case soldar cannot clone without errors.
« Last Edit: May 23, 2024, 08:30:00 am by Postal2 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf