Failing Win XP HDD - Page 1
Forum section: electronics / general

author: soldar
author_rank: Super Contributor
timestamp: May 12, 2024, 09:48:39 pm
content: 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?

author: Whales
author_rank: Super Contributor
timestamp: May 12, 2024, 11:47:21 pm
content: > 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 (likeSystem 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.

author: Whales
author_rank: Super Contributor
timestamp: May 12, 2024, 11:50:31 pm
content: 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.

author: amyk
author_rank: Super Contributor
timestamp: May 13, 2024, 02:42:24 am
content: 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.

author: golden_labels
author_rank: Super Contributor
timestamp: May 13, 2024, 03:10:54 am
content: 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.

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: May 13, 2024, 07:19:24 am
content: 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.

author: Halcyon
author_rank: Unknown
timestamp: May 13, 2024, 08:15:46 am
content: Quote from: colorburst on May 12, 2024, 11:09:35 pmGood 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.htmlI'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.Quote from: amyk on May 13, 2024, 02:42:24 amYou'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.

author: soldar
author_rank: Super Contributor
timestamp: May 13, 2024, 12:21:37 pm
content: 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 freeD: 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?

author: Halcyon
author_rank: Unknown
timestamp: May 13, 2024, 01:21:41 pm
content: Quote from: soldar on May 13, 2024, 12:21:37 pmWhilst 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.aspxThis 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

author: Whales
author_rank: Super Contributor
timestamp: May 14, 2024, 04:14:23 am
content: QuoteDon'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.QuoteIf you're not afraid of the commandline: ddrescue

author: m k
author_rank: Super Contributor
timestamp: May 14, 2024, 06:17:35 pm
content: Buy an external HDD yesterday and do ddrescue, don't forget the log file.

author: soldar
author_rank: Super Contributor
timestamp: May 15, 2024, 08:37:18 am
content: 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

author: QOTF-Alexi
author_rank: Newbie
timestamp: May 15, 2024, 09:03:42 am
content: You can try (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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 15, 2024, 06:19:32 pm
content: Quote from: soldar on May 15, 2024, 08:37:18 amCode:ddrescue source destination mapfileThat'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).

author: soldar
author_rank: Super Contributor
timestamp: May 15, 2024, 08:02:04 pm
content: Quote from: Monkeh on May 15, 2024, 06:19:32 pmI assume "source destination mapfile" are the three full paths so it would look something likeCode:ddrescue /media/user/source /media/user/destination /home/user/desktop/mapfileSource partition is 336GB, 85 GB used, 251 GB freeCan I clone it to a partition with a size of, say, 150GB. Or does the new partition have to be bigger than 336GB?

author: Whales
author_rank: Super Contributor
timestamp: May 15, 2024, 11:55:30 pm
content: 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 freeThis 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.Youcannotjust 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.ddrescuelogThis 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.

author: soldar
author_rank: Super Contributor
timestamp: May 16, 2024, 12:18:16 am
content: 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.

author: Whales
author_rank: Super Contributor
timestamp: May 16, 2024, 12:24:37 am
content: EDIT: Got ninja'd, see my next reply firstPerhaps I should take a different tac.If you have anyspecificirreplaceable files on that computer (like unobtanium softwareinstallers) 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.

author: Whales
author_rank: Super Contributor
timestamp: May 16, 2024, 12:25:50 am
content: Quote from: soldar on May 16, 2024, 12:18:16 amYes 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.

author: soldar
author_rank: Super Contributor
timestamp: May 16, 2024, 01:07:56 am
content: 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 but1- 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:QuoteI do not know how to interpret the heads/cylinder mismatches and if that is important or not.Very frustrating.

author: soldar
author_rank: Super Contributor
timestamp: May 16, 2024, 01:09:21 am
content: Quote from: Whales on May 16, 2024, 12:25:50 amGood idea! I will try that. Thanks.

author: golden_labels
author_rank: Super Contributor
timestamp: May 16, 2024, 02:59:00 am
content: 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:cp --sparse=always /dev/sourcedevice image.img…or compressed:Code: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.

author: themadhippy
author_rank: Super Contributor
timestamp: May 16, 2024, 03:13:16 am
content: is xp too modern for xcopy to play nicely?

author: Whales
author_rank: Super Contributor
timestamp: May 16, 2024, 04:31:08 am
content: Quote from: golden_labels on May 16, 2024, 02:59:00 amI 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)QuoteIt'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).

author: m k
author_rank: Super Contributor
timestamp: May 16, 2024, 08:00:55 am
content: Quote from: soldar on May 16, 2024, 12:18:16 amAre you saving data or something else?The thing is finally partition based anyway, so forget secondary stuff.First youcd thirdplaceddrescue /dev/sdaX dest.img dest.mapDestination 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.

author: soldar
author_rank: Super Contributor
timestamp: May 16, 2024, 10:12:47 am
content: 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, NTFSIt 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.

author: m k
author_rank: Super Contributor
timestamp: May 16, 2024, 06:19:53 pm
content: 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.

author: golden_labels
author_rank: Super Contributor
timestamp: May 16, 2024, 10:33:32 pm
content: 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:cp /dev/old_hdd /dev/new_hdd… andcleanlyreboot. One may issue that to ensure the entire write is complete before the reboot starts:Code: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.

author: Whales
author_rank: Super Contributor
timestamp: May 17, 2024, 07:54:17 am
content: Quote from: soldar on May 16, 2024, 10:12:47 amYou're talking about two separate things.Cloning a whole diskis 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 partitionwill not give you a bootable system. I do not recommend this method. It sounds like this is what you are currently trying.QuoteThat 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.

author: soldar
author_rank: Super Contributor
timestamp: May 17, 2024, 09:22:23 am
content: Quote from: Whales on May 17, 2024, 07:54:17 amThanks. I think you might have found the cause.So you think the best course of action is to buy an identical HDD and clone?

author: Whales
author_rank: Super Contributor
timestamp: May 17, 2024, 12:38:53 pm
content: 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 onmight) 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.

author: radiolistener
author_rank: Super Contributor
timestamp: May 17, 2024, 12:47:36 pm
content: 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.

author: coromonadalix
author_rank: Super Contributor
timestamp: May 17, 2024, 01:03:31 pm
content: simplest solution is: buy a drive XP will accept in size a redo a full installxp sp3 pack is available and post sp3 updates too .... i'll never clone a drive who may have growing problems, if its the caseand 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 driversthat 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 ...

author: soldar
author_rank: Super Contributor
timestamp: May 17, 2024, 05:42:19 pm
content: Quote from: radiolistener on May 17, 2024, 12:47:36 pmJust 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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 17, 2024, 05:47:36 pm
content: Quote from: soldar on May 17, 2024, 05:42:19 pmNo, 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.

author: soldar
author_rank: Super Contributor
timestamp: May 17, 2024, 06:05:00 pm
content: Quote from: Monkeh on May 17, 2024, 05:47:36 pmOh, 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.

author: soldar
author_rank: Super Contributor
timestamp: May 18, 2024, 12:18:18 am
content: 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.

author: Halcyon
author_rank: Unknown
timestamp: May 18, 2024, 02:18:40 am
content: 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 18, 2024, 07:59:12 am
content: Quote from: soldar on May 16, 2024, 12:18:16 amProblem 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.

author: m k
author_rank: Super Contributor
timestamp: May 18, 2024, 08:45:25 am
content: 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 limits1024 * 16 * 63 => 1M * 512 bytes/sector1024 * 255 * 63 => 16M * 512 bytes/sectorFirst is 0/0/1 and 255 is a bughttps://en.wikipedia.org/wiki/Cylinder-head-sector

author: soldar
author_rank: Super Contributor
timestamp: May 18, 2024, 03:27:47 pm
content: 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?

author: golden_labels
author_rank: Super Contributor
timestamp: May 18, 2024, 06:17:44 pm
content: Quote from: Postal2 on May 18, 2024, 07:59:12 amExactly why we insist on cloning it using ddrescue. Or anything, where the right behavior can be guaranteed.Quote from: soldar on May 18, 2024, 03:27:47 pmNothing 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.

author: soldar
author_rank: Super Contributor
timestamp: May 18, 2024, 09:23:09 pm
content: 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.

author: PlainName
author_rank: Super Contributor
timestamp: May 18, 2024, 10:12:04 pm
content: 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

author: m k
author_rank: Super Contributor
timestamp: May 19, 2024, 11:19:20 am
content: 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.

author: soldar
author_rank: Super Contributor
timestamp: May 19, 2024, 09:57:55 pm
content: 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.

author: PlainName
author_rank: Super Contributor
timestamp: May 19, 2024, 10:15:33 pm
content: 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'sthenthat 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.

author: golden_labels
author_rank: Super Contributor
timestamp: May 20, 2024, 02:30:30 am
content: 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 07:42:25 am
content: Quote from: soldar on May 19, 2024, 09:57:55 pmNo. It is cloning program switches to 512 buffer size and no try back.Quote from: PlainName on May 19, 2024, 10:15:33 pmNo. You can use "Format" or create partitions outside of errors (mechanical HDD, SSD uses imitation of error).Quote from: golden_labels on May 20, 2024, 02:30:30 amNo. 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.

author: soldar
author_rank: Super Contributor
timestamp: May 20, 2024, 07:55:42 am
content: 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 GBI 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 08:15:10 am
content: Quote from: soldar on May 20, 2024, 07:55:42 am20914/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.

author: PlainName
author_rank: Super Contributor
timestamp: May 20, 2024, 11:44:46 am
content: Quote from: golden_labels on May 20, 2024, 02:30:30 amI 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.

author: m k
author_rank: Super Contributor
timestamp: May 20, 2024, 12:21:59 pm
content: Quote from: soldar on May 20, 2024, 07:55:42 amIf 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.

author: soldar
author_rank: Super Contributor
timestamp: May 20, 2024, 02:49:12 pm
content: Quote from: m k on May 20, 2024, 12:21:59 pmI 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 02:58:02 pm
content: Quote from: m k on May 20, 2024, 12:21:59 pmError size is a chunk protected by ECC, it's easy to guess about it size by personal experience.

author: soldar
author_rank: Super Contributor
timestamp: May 20, 2024, 06:11:12 pm
content: It's been going for 25 hours now. I just finishedPass 1 (forward)and now it has startedPass 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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 20, 2024, 06:26:09 pm
content: Quote from: Postal2 on May 20, 2024, 08:15:10 amProgram 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.

author: soldar
author_rank: Super Contributor
timestamp: May 20, 2024, 07:06:22 pm
content: 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:QuoteThanks 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 08:02:16 pm
content: Quote from: Monkeh on May 20, 2024, 06:26:09 pmI can do that work with modified win32diskimager in 4 hour or less for 1 TB.

author: PlainName
author_rank: Super Contributor
timestamp: May 20, 2024, 08:04:34 pm
content: QuoteWell done. I bet that's a reliefQuoteYou 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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 20, 2024, 08:06:32 pm
content: Quote from: Postal2 on May 20, 2024, 08:02:16 pmNot 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 08:19:07 pm
content: Quote from: Monkeh on May 20, 2024, 08:06:32 pmI have experience with Samsung HD250HJ in one hour. Fully equal work.

author: Monkeh
author_rank: Super Contributor
timestamp: May 20, 2024, 08:23:51 pm
content: Quote from: Postal2 on May 20, 2024, 08:19:07 pmAnd 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 20, 2024, 08:34:51 pm
content: Quote from: Monkeh on May 20, 2024, 08:23:51 pmNo, 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.

author: Whales
author_rank: Super Contributor
timestamp: May 21, 2024, 12:21:12 am
content: Congrats soldarGlad you got a working clone.

author: Monkeh
author_rank: Super Contributor
timestamp: May 21, 2024, 12:59:56 am
content: Quote from: Postal2 on May 20, 2024, 08:34:51 pmAnd 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?

author: soldar
author_rank: Super Contributor
timestamp: May 21, 2024, 07:06:22 am
content: Quote from: Whales on May 21, 2024, 12:21:12 amIt took many tries and a lot of time but I am glad I persevered.Thanks for your help.

author: m k
author_rank: Super Contributor
timestamp: May 21, 2024, 07:38:54 am
content: Being stubborn is sometimes a virtue.For the side track,smartctl sctercWD TLER

author: Postal2
author_rank: Frequent Contributor
timestamp: May 21, 2024, 09:32:32 am
content: Quote from: Monkeh on May 21, 2024, 12:59:56 amOf 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 seesoldarsucceded, I assume first variant with retry by dumb command.About ATA-commands - I did modify win32diskimager, nothing added, works good. See source.

author: golden_labels
author_rank: Super Contributor
timestamp: May 21, 2024, 05:41:27 pm
content: Quote from: soldar on May 21, 2024, 07:06:22 amCongrats!I’m also glad we persevered in insisting on you using ddrescue.

author: nigelwright7557
author_rank: Frequent Contributor
timestamp: May 21, 2024, 08:27:18 pm
content: I would definitely go for an SSD.It made a huge difference in speed to my laptop.

author: soldar
author_rank: Super Contributor
timestamp: May 21, 2024, 09:44:58 pm
content: Quote from: nigelwright7557 on May 21, 2024, 08:27:18 pmWell, 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.

author: PlainName
author_rank: Super Contributor
timestamp: May 21, 2024, 10:01:13 pm
content: QuoteI'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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 22, 2024, 07:41:31 am
content: Quote from: soldar on May 21, 2024, 09:44:58 pmNo 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).

author: m k
author_rank: Super Contributor
timestamp: May 22, 2024, 08:14:37 am
content: Quote from: soldar on May 21, 2024, 09:44:58 pmIf 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 -shortlsblk -t

author: Postal2
author_rank: Frequent Contributor
timestamp: May 22, 2024, 08:27:49 am
content: soldar, if your OS is Windows, I can provide my tool for cloning with instructions. You will finish your work in 30 minutes.

author: soldar
author_rank: Super Contributor
timestamp: May 22, 2024, 09:20:27 am
content: Quote from: m k on May 22, 2024, 08:14:37 amProbably 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 TBDestination:sdb : 500 GB, empty, SSDSo I can trysudo ddrescue --size 350GB /dev/sda /dev/sdb /home/user/Desktop/mapfile.txtAnd 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?

author: Postal2
author_rank: Frequent Contributor
timestamp: May 22, 2024, 09:28:13 am
content: Quote from: soldar on May 22, 2024, 09:20:27 amYou can boot clone and make all needed from there.

author: m k
author_rank: Super Contributor
timestamp: May 22, 2024, 02:20:55 pm
content: Quote from: soldar on May 22, 2024, 09:20:27 amYes.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.imgsudo ddrescue -s 512 /dev/sdb /home/user/Desktop/1st_blk.imgsudo hexdump --canonical /home/user/Desktop/1st_blk.img > /home/user/Desktop/1st_blk.txtThere's your new MBR, it may have many copies.sudo touch /home/user/Desktop/some_blocks.imgsudo ddrescue -s 4096 /dev/sdb /home/user/Desktop/some_blocks.imgThen the fancy part.sudo ddrescue -o 462 --size=16 /dev/zero /dev/sdbNow 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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 22, 2024, 06:29:57 pm
content: Quote from: Postal2 on May 22, 2024, 08:27:49 amJust like with any other tool once you're done dealing with drive firmware.Quote from: soldar on May 22, 2024, 09:20:27 amDon't enlarge the partition from outside Windows. Windows is not smart, and will break.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 22, 2024, 07:14:26 pm
content: Quote from: Monkeh on May 22, 2024, 06:29:57 pmI told you, it's natively win32diskimager.https://github.com/joshg253/win32diskimager/blob/master/src/disk.cppAdded:Enumerating all disks via setupapi;Enhanced checking/skipping of errors;Variable buffer size.

author: Monkeh
author_rank: Super Contributor
timestamp: May 22, 2024, 07:32:15 pm
content: Quote from: Postal2 on May 22, 2024, 07:14:26 pmAnd? 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).

author: Postal2
author_rank: Frequent Contributor
timestamp: May 22, 2024, 07:42:02 pm
content: Quote from: Monkeh on May 22, 2024, 07:32:15 pmYou right. It's not magically faster. Simply your tool is magically slower.Quote from: Monkeh on May 22, 2024, 07:32:15 pmOkay, 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.

author: Monkeh
author_rank: Super Contributor
timestamp: May 23, 2024, 12:36:22 am
content: Quote from: Postal2 on May 22, 2024, 07:42:02 pmThe 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.

author: m k
author_rank: Super Contributor
timestamp: May 23, 2024, 07:43:33 am
content: Quote from: Monkeh on May 22, 2024, 06:29:57 pmYes, 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.

author: Postal2
author_rank: Frequent Contributor
timestamp: May 23, 2024, 08:01:41 am
content: Quote from: Monkeh on May 23, 2024, 12:36:22 amI know program "Calibrate" from Norton which behavior exactly same and so old too.Quote from: Monkeh on May 23, 2024, 12:36:22 amYes I encountered in the last century.I told you, disk retries himself when lose track, but in this casesoldarcannot clone without errors.