Repairing / restoring Win XP based test equipment : hints and tricks - Page 1
Forum section: electronics / testgear

author: free_electron
author_rank: Super Contributor
timestamp: January 01, 2016, 08:39:39 pm
content: Right,After battiing for a few days with an 'unresponsive' piece of kit i thought it would be a good idea to post some things that are important.Problem 1) Security certificates (internet access)The problem with these old systems is that they frequently lose time and date. ALWAYS swap the coin cell first ,and set time and date correctly. I was strugglying for hours trying to download updates , all the while the browsers telling me security certificates were invalid. That whole website certificate crap (i call it crap, it is an annoyance. if everybody in the world would behave and play nice there would be no need for this) is time dependent. if your machines clock is set to jan 1 1999 you will be in helll... set the time right and it starts behaving.Problem 2)Browsers.Visiting websites with intenret explorer 5.0 very frequently gets you a screen that says 'your browser is no longer supported'. basically :fuck off with your insecure browser. so how do you get new browser on there, and what browser to use. my particular machine was a pentium III 670Mhz with Win XP pro on it.Chrome ? bombs out with a 'your hardware is not supported' because of some missign simd instructions. Thank you google-tards.Firefox ? bloated turd of a browserOpera ? ' your hardware is not supported'Internet explorer : Microsoft want to ram win 7 or 10 down your throat ...Seamonkey : very small, lightweight , works. They stripped all the 'fluff' and 'bloat'.3) Windows XP is dead and no longer supported. ... not quite :As we know Win XP is no longer supported by Microsoft... or so they claim. What is little know is that it is actually still supported and bugfixes are still rolling out until at least 2020... but ONLY if your windows installation has a 'special' tag on it. Your run of the mill win XP is no longer supported.But Two 'industrial' flavors are being supported : Windows XP embedded and Windows XP POS (no, not piece-of-sh.. , Point -of-sale : cash registers )You can turn any win XP PRO 32 bit ( not sure if this works on home editions ) into an embedded version by injecting a marker in the registry:[HKEY_LOCAL_MACHINE\SYSTEM\WPA\PosReady] "Installed"=dword:00000001when you run the windows update you will see that it does find updates for Mixrosoft windows XP embedded.4)aging drives and backupThe drives in these machines are typically small , but aging. How do you protect the firmware/operating system and make a snapshot?i have been using EaseUS Todo Backup for this. The base version is free, can ru from a WinPE boot volume and handles even difficult drive layouts (like machines that boot a different os first to upload fpga files, then boot windows )on computers that do not have the capabilty to boot from USB or an external cd drive ( to use the winPE system) i use a hardware drive clonerStarTech USB to IDE & SATA Standalone Hard Drive Duplicator Dockhttp://www.startech.com/HDD/Duplicators/USB-to-IDE-SATA-Standalone-HDD-Hard-Drive-Duplicator-Dock~UNIDUPDOCKthis thing can read/write any kind of drive IDE , SATA , desktop , laptop and can be hooked up using USB as well. it can translate to different drive sizes. And there is no software needed. plug in two drives , push the 'on' button and follow the menu. One channel is 'read only' so there is no risk of 'damage' to your 'golden drive'. this unit will not let you write to the 'source drive' so the drive is safe.

author: nctnico
author_rank: Super Contributor
timestamp: January 01, 2016, 08:47:17 pm
content: What works much better is to download files from your (hopefully) secure PC and transfer the files using a USB stick or network. Nowadays you can buy mSATA to PATA adapters so you can stick an mSATA SSD into an old machine.

author: free_electron
author_rank: Super Contributor
timestamp: January 01, 2016, 09:02:38 pm
content: That works for applicatins, not for OS updates. Also, some machines only have LS120 drives and no usb ports (many of the early infiniiums are win 95, no usb and floppy /ls120 only. Network does work.)But i do agree : for firmware: download using a modern machine then use a shared folder to copy it over.

author: nctnico
author_rank: Super Contributor
timestamp: January 01, 2016, 09:06:01 pm
content: AFAIK you can download the updates as a big off-line redistributable blob as well. Still I wouldn't bother doing the updates because they also can do a lot of damage; just make sure machine isn't used for anything else than measuring. So no PDF reading, document editing, surfing the internet, etc.

author: free_electron
author_rank: Super Contributor
timestamp: January 02, 2016, 12:38:24 am
content: While you can get SP3 as a large blob, there are post SP3 updates that are not a blob. I dont know all of em. That is why you set that 'embadded' flag. Then you get those.I never install anything else apart from the machine software. No pdf readers. But i want the network holes plugged so i can do data exchange between the machines. That's what microsoft still fixes for embedded.the browser i dont\'t care about. I'm not surfing the web with my logic analyser. But the machine is on a network . The scopes can exchange data with the logic analyser to do combined views.

author: timb
author_rank: Super Contributor
timestamp: January 02, 2016, 06:45:49 am
content: Quote from: free_electron on January 02, 2016, 12:38:24 amThere's software, such as UDC (http://xdot.tk) that will automatically download *all* post-SP3 updates from MS and save them for you. This allows you to run them on an offline machine, or better yet, slipstream them into an install ISO with nLite.Ultimately, it might be cool to make a custom install ISO with SP3, all updates, device drivers and any any relevant software for easy reinstallation. nLite makes this super easy to do, by the way. Just point to the folder of updates, point it to the setup or inf files for drivers, etc. and it'll spit out a custom Windows XP ISO ready to go.As for the registry trick... Unless you're using your scope as a PoS terminal or something, the updates that are being pushed as part of XP Embedded's support are of questionable use, so... What's the point?

author: Howardlong
author_rank: Super Contributor
timestamp: January 02, 2016, 07:19:34 am
content: The almost designed-in obsolescence by using an off the shelf OS in these instruments is indeed an annoyance.For the Infiniium I have in the lab, thankfully it came with XP and not 95, but ISTR it was a bare manufacturer image with only SP2 and some pretty old instrument software version.Before I did anything, I took an image of the disk. I used Acronis TrueImage on a bootable CD, and needed a special setting to force it to use vanilla VGA. I also installed a PCI USB 2.0 card as the USB 1.x ports would be far too slow for imaging purposes. I also purchased a PATA SSD to replace the HDD and used TrueImage to duplicate the HDD: this improved boot up times and responsiveness, but it's not quite the kind of huge increase you can see when upgrading to SSDs on today's hardware. I keep the original HDD, a disk image, and the copy of a bootable Acronis disk that made the image in the probe pouch with the scope. I am aware that there are some concerns over the use of SSD with XP to do with TRIM and speed degradation over time, but I haven't encountered that myself.Once the SSD was installed, I set tp with all the updates.I did also try upgrading the RAM and CPU, but there appear to be very limited options in this regard. The motherboard is in a form factor that's not widely supported nowadays either.

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 02, 2016, 11:12:01 am
content: Quote from: free_electron on January 01, 2016, 08:39:39 pmI agree, the coin cell battery is one thing that should always be swapped (unless it's known to have been replaced recently). I do this with all 2nd hand PC-based instruments I get (together with replacing the hard drive with an SSD).QuoteYou might see it as crap, but certificate security also relies on them expiring after a set time, and for that to work the correct time and date is essential.QuoteI think your anger is pretty misguided. Aside from the fact that it's pretty naive to think that these days browsing the web on a XP machine is anything else than a stupid idea, it should not come as a surprise that in the 17+ years that have passed since a Pentium3 was a common processor a lot of things have changed and that modern software will very likely not run at all on such an old system.Then of course there's the question if you need a modern web browser on a test instrument anyways, especially when the processor is so slow (I have Google Chrome on my XP based scope as a pdf viewer but that scope comes with a 3+Ghz P4 CPU and 3GB RAM). If you want to surf the 'net you should do that on a somewhat capable PC running a modern supported OS that contains the latest security updates.QuoteYeah, really great, aside from the fact that this does*not*make your XP into a secure operating system! The Embedded versions are meant (as the name says) for embedded/industrial devices and POS systems, which are generally not connected to the open internet (networking usually runs through a VPN or closed environment). Fixes and updates focus for these platforms therefore focus on functional issues and security problems within that specific environment only. In addition, updates may break other stuff (Embedded/POS systems are generally only updated when required and even then only for a specific issue instead of regularly installing all available updates).Even after being "modded" it's still a pretty bad idea to connect XP to the open internet (unless you have a sophisticated enterprise firewall that can filter out any threats related to XP, and even then it's a gamble).QuoteI mostly use an older version of Acronis Trueimage (8.x/9.x) to create hard drive backups of PC-based instruments. I do that outside the bx (i.e. I remove the hard disk from the device) and then just go ahead and put that image on a new industrial SSD which then goes into the instrument. If it's running XP then a device is reasonably old, and that means that the hard disk will very likely be at the end of its useful life anyways (most of the time I can already see a drive approaching its end in its SMART data).

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 02, 2016, 11:23:47 am
content: Quote from: Howardlong on January 02, 2016, 07:19:34 amIs it? Why? What makes that different from the obsolete VxWorks version or the antique Linux variant in other instruments?The thing is that you should never ever connect any networked test instrument to the open internet, no matter what OS/firmware it runs. Networked instruments belong on a LAN only (and a VPN if it has to go over the internet).On the other side, even Windows 95 based instruments haven't stopped working just because the OS support was ended, and today there's still a lot of test gear that runs Windows XP or 2000 which continues to run just fine.QuoteYes, but again, does it matter? For using the scope as a scope, it's pretty irrelevant what patch level the OS has.QuoteWith modern SSDs (which do garbage collection in their firmware) the lack of TRIM isn't much of a problem any more. Just make sure that there's a small part of the SSD left empty (i.e. I usually leave at least 5% free) so that its GC can work, and disable the automatic defragmentation in XP itself, and you're set.QuoteFor these old Infiniiums there's also not much point, as more RAM or a faster CPU won't increase the scope's performance (which is limited by its ASICs, Windows is pretty much just the UI).

author: cs.dk
author_rank: Unknown
timestamp: January 02, 2016, 11:24:51 am
content: Quote from: free_electron on January 02, 2016, 12:38:24 amThat should be possible - Deny the device LAN IP from internet access in your router/firewall. And remove the gateway and DNS IP from the device it self.I know it's not 100% bulletproof, cause a PC on your lan could get some nasty stuff, but chances are minimal, if the scope/whatever is denied access to the internet.

author: G0HZU
author_rank: Super Contributor
timestamp: January 02, 2016, 03:37:55 pm
content: My Agilent VNA runs Win2000 and I just make sure I don't connect to any networks with it. eg LAN or WiFi.I do use a dedicated memory stick with it but I virus check it to minimise risk here. I'm prepared to take this risk.The manual for the VNA is quite clear in that it states that you shouldn't attempt to install any mainstream updates or install other SW on it because it isn't designed for this and it can upset the running of the VNA SW.Quote

author: HighVoltage
author_rank: Super Contributor
timestamp: January 02, 2016, 04:13:25 pm
content: I was always under the impression to leave a running OS in an industrial instrument alone and do not install any updates. Usually it makes the instrument slower and less responsive.

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 02, 2016, 04:39:20 pm
content: Quote from: HighVoltage on January 02, 2016, 04:13:25 pmGenerally that is the best way, however there are exceptions (i.e. retrofitting exFAT support in Windows XP via updates can be pretty handy, especially with modern large capacity USB storage).But yes, in general there's no need to keep your test instrument software current, unless you have a problem that is fixed by the update.

author: Chris Jones
author_rank: Regular Contributor
timestamp: January 04, 2016, 02:32:31 pm
content: I wonder if it is maybe not automatically better to replace the hard drive with a SSD:http://www.zdnet.com/article/solid-state-disks-lose-data-if-left-without-power-for-just-a-few-days/I know that sometimes I don't power up some of my equipment for maybe a year or more e.g. when I'm too busy to do any playing for a while, or when I was working overseas. If possible I try to run them every so often just to keep the electrolytics formed. All of several mechanical drives that I have left alone for a decade have booted up just fine. I wonder if that will happen with multi-level cell flash chips, which I don't know much about yet.I guess that if the instrument originally had a 1GB drive and it's replaced with a 160GB SSD, even if the drive has an error it is unlikely to be in the region that you're using, unless the whole drive becomes unreadable at once. Also if the drive were smart enough to know which parts were not used (but I don't think they can be without help from the OS), then they could use massive redundency when only a tiny fraction of the drive is used. I doubt they do this though as most customers wouldn't care about it and the old OS in most instruments would not use the SSD specific commands to tell the drive which sectors are unused "don't cares" that can be re-purposed for redundency or wear levelling.I think my main priority would be to make a backup of every sector on the original drive (even using the linux command dd would do). Then I guess it doesn't matter much.

author: nctnico
author_rank: Super Contributor
timestamp: January 04, 2016, 03:18:50 pm
content: Quote from: Chris Jones on January 04, 2016, 02:32:31 pmIf you read the article carefully you'll see that such an event is highly unlikely to happen. A hard drive can also fail within that period!

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 04, 2016, 05:23:12 pm
content: Quote from: Chris Jones on January 04, 2016, 02:32:31 pmAs nctnico said, even the article states this is unlikely to happen (it's more a problem for SLC based SSDs, but most consumer and even many industrial SSDs use MLC memory).QuoteYou may as well have been lucky, because that an old hard drive still works after an extended period of storage is not really a given. Even less so with newer drives which use fluid bearings instead of the ball bearings found in really old drives (which were a bit more forgiving to long storage).And in any case, no matter what the medium is you should always have a backup anyways, as any mass storage medium is prone to fail (even though SSDs are less likely to fail than mechanical drives, they can still fail).QuoteNot all drives from the era where 1GB was a common size had automatic defect management (which works independent from the OS btw). But even if it has, if the error is in region that is used then the data in it is gone. Some sector losses can be mitigated by ECC error recovery, often enough the data is simply lost. And to make matters worse, sector defects are much more likely to develop in the regions of the disk that are used often (i.e. where your OS/software is located).Furthermore, defective sectors are not the only failure mode for a hard disk drive. There's controller failure, plus a wide range of mechanical issues that hard disks regularly fail from, including falling off read-write heads and fracturing of the magnetic discs (which in some hard drives were made from glass).QuoteThat's not really redundancy as a single drive failure would still take out your mass storage, plus it would require special disk firmware/software and would make an already slow drive even slower.If you want redundancy in a mass storage setup then you use RAID, period.QuoteWear Leveling in modern SSDs is OS-agnostic (it's done by the drive's firmware). "Dead" sectors aren't really a problem for an SSD as Wear Leveling will balance out any defects before any data loss occurs as long as spare memory cells are available (which there are enough of in modern SSDs, aside maybe those made by some B-brands like Kingspec).QuoteMaking a (working!) backup should always be the first thing to do.

author: Chris Jones
author_rank: Regular Contributor
timestamp: January 08, 2016, 08:20:23 am
content: Quote from: Wuerstchenhund on January 04, 2016, 05:23:12 pmSLC flash should be more reliable than MLC flash for any given process node.Quote from: Wuerstchenhund on January 04, 2016, 05:23:12 pmI think I could have explained what I was saying more clearly: I was referring to the possibility that the new SSD might "fail", but that just looking at the probability ofanyerror in a 160GB SSD might be pessimistic if you only care about errors that happen in the (used) 1GB portion of that 160GB SSD. So the published error rates for a SSD might be pessimistic for the case where you replaced a small drive with a bigger one.Quote from: Wuerstchenhund on January 04, 2016, 05:23:12 pmNo, telling the SSD that some sectors are not used is not in itself redundency, but it enables the drive to not expend any effort to preserve the contents of those sectors, and if the SSD knows that it has more free space then it can use it to store redundent copies of the wanted data. This does not need to make the drive (SSD) slower because it can be done when the drive is idle.Quote from: Wuerstchenhund on January 04, 2016, 05:23:12 pmThe Wear Levelling, and the degree of redundency possible, is not OS agnostic. Modern OSs can tell the drive that some of the sectors have contents that is not wanted, and thereby save the drive from creating extra wear in preserving that data. Older OSs did not use those commands as AFAIK they did not used to exist prior to SSDs. The FLASH chips used within SSDs cannot usually write a single byte, they must write a large page, and before that they must erase an even larger block including the large page to be written. Yet, if you change a single byte, the SSD must read the block containing the byte to be changed, then copy that block to a newly-erased block elsewhere in the flash, but with the single byte changed as requested by the OS. If you previously had told the SSD that most of the block contained just garbage, then the SSD would be able to save on write operations, and often save the erase too. Since the SSD now knows which part of the FLASH does not contain wanted user data, then the SSD firmware can also use that part of the FLASH for extra redundency, as well as wear levelling. This might not even slow down the SSD, if the redundent copies of the information are only written during idle periods.Here is an article explaining why OS support is needed:https://en.wikipedia.org/wiki/Trim_%28computing%29That article does not suggest that the SSDs ever make any use of the FLASH space that has been marked as unused by the OS, but I would be surprised if the SSD manufacturers have not thought of using it for error correction in some cases.

author: cdev
author_rank: Super Contributor
timestamp: January 10, 2016, 04:55:29 am
content: The reason Win XP based web browsers are showing that error message is in part due to the discovery of a great many vulnerabilities in the old now deprecated SSL protocol as well as hashing functions, etc. that are still in common use. One after another.So many vulnerabilities in old "secure" protocols have been turning up that the web community is basically in a state of shock and webmasters are doing their best to move away from them ASAP- because they are now quite demonstrably insecure.

author: Karel
author_rank: Super Contributor
timestamp: January 10, 2016, 09:22:34 am
content: Quote from: Howardlong on January 02, 2016, 07:19:34 amThis is actually the rootcause of the problem.

author: HighVoltage
author_rank: Super Contributor
timestamp: January 10, 2016, 09:57:00 am
content: We still have a large production / testing machine running on Win 98 SE and keep our fingers crossed every day that nothing happens to it. We have image backups of the drive and an extra drive laying around, just in case. An upgrade to a more modern OS is not possible, unless all controllers and actuators are exchanged as well and then the upgrade cost more than a new machine. May be this is built in obsolescence even in expensive machines.

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 10, 2016, 07:01:25 pm
content: Quote from: Chris Jones on January 08, 2016, 08:20:23 amRight, but this is not about reliability, it's about data retension.QuoteI'm not sure I can follow you. If you replace say a 40GB hard drive with an 160GB SSD, then the probability of failure of the 40GB area where the data is is exactly the same as for the remaining (empty) 120GB. Simply because there is no real difference between used and non-used area, as Wear Leveling will shift the data around the physical memory segments so that all memory cells will have pretty much see the same usage.This aside, if you look at reliability figures it's generally recommended to use a pessimistic approach.QuoteThat's not how SSDs work, and for good reason. Using free space for redundant copies of the same data would merely limit the efficiency of the built-in Wear Leveling.QuoteThe Wear Levelling, and the degree of redundency possible, is not OS agnostic. It most certainly is. Pretty much every SSD on the market does Wear Leveling in its firmware. It has to, because the OS has absolutely no knowledge about the physical layout of the SSD (as it doesn't know anything about the physical layout of a modern hard drive). The OS merely sees a logical disk layout which on modern storage devices is usually completely different than the physical layout (plus the fact that SSDs don't even have physical tracks).QuoteNot quite. TRIM is merely a mechanism to increase the efficiency of the drive's Garbage Collection, and has nothing to do with Wear Leveling.Garbage Collection is something completely different and has nothing to do with reliability. It's merely a mechanism to allow data organization in memory to be organized in a way to increase performance. Like Wear Leveling, Garbage Collection is part of the SSD firmware, which performs GC independently of the OS in the background when the drive is idling, provided there is enough free space left to shift stuff around. All TRIM does is making this process more efficient by telling the SSD which data has been marked as deleted and therefore doesn't need to be retained.The GC in older (early generation) SSDs was pretty poor so when used with an OS that didn't support TRIM the SSD became increasingly slow over time as Garbage Collection wasn't triggered. But that's pretty much a thing of the past.QuoteI'm sorry but I don't think you really understand the article you quoted, which clearly talks about TRIM and its relevance to Garbage Collection.Let me suggest that you have a look what one of the largest SSD manufacturers has to say:http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/whitepaper/whitepaper04.htmlIt also confirms that Wear Leveling (as well as Garbage Collection) are part of a modern SSD's firmware and work pretty much OS-agnostic.

author: Wuerstchenhund
author_rank: Super Contributor
timestamp: January 10, 2016, 07:13:14 pm
content: Quote from: Karel on January 10, 2016, 09:22:34 amWhat problem, exactly? In what way is an instrument running a desktop OS worse than an instrument running some special purpose OS like VxWorks or any other software?Quote from: HighVoltage on January 10, 2016, 09:57:00 amThere's always built-in obsolescence because at some point there won't be any replacement parts available.As to the OS, the question is if this machine is directly connected to the open internet. If the answer is "no" then I can't see where the OS is a problem (and if the answer is "yes" then you have some a lot more pressing problems than the obsolescence of your machine, because connecting any piece of production equipment to the open internet would be plain stupid no matter what OS it runs)

author: nctnico
author_rank: Super Contributor
timestamp: January 10, 2016, 08:11:06 pm
content: Quote from: Wuerstchenhund on January 10, 2016, 07:13:14 pmI fully agree. No matter what OS is used the machine will function as long as the hardware is OK. I don't get the 'it must be the latest version or we are screwed' mentality. If a piece of equipment is PC based chances are you can replace the parts more easely because there is tons of new old stock PC hardware out there. Not to mention performance upgrades with more memory or processing power.

author: Chris Jones
author_rank: Regular Contributor
timestamp: January 11, 2016, 12:53:39 pm
content: Quote from: Wuerstchenhund on January 10, 2016, 07:01:25 pmMaybe they don't - I have never written SSD firmware nor dissassembled any. If I were writing it, however, I would certainly consider using a more powerful error-correcting code (or at its simplest, just a second copy of the data) when the drive is much less than half full, and then reduce the redundency when the drive is getting nearly full and the entire advertised capacity has to be made available to the user. I fully agree that adding extra redundency would certainly cause a trade-off, causing extra wear and making the wear levelling more difficult, but it might be a worthwhile trade-off - for some use cases such as where there isn't much wear in the first place because the user doesn't store their swap or page file and /tmp/ on the SSD e.g. if they have plenty of RAM or use a magnetic drive as well.Quote from: Wuerstchenhund on January 10, 2016, 07:01:25 pmThe may not be entirely unrelated. If you want to move a sector that is being frequently re-written (wear levelling) to a different physical region of the flash chips, there are more choices about where to move it to if you know which parts of the flash hold wanted user data. It may in many cases save you from having to move something else to make way for the sector that is getting frequently written.Anyway this is pretty unrelated to the original articles that prompted my post, which were suggesting that even SSDs that might have good error rates whilst power is applied (as they are periodically reading the entire flash and scrubbing errors using error correcting codes), might have higher error rates after a long period of storage with no power and therefore no regular scrubbing of errors. The articles were suggesting that SSDs being archived as evidence should be also imaged onto magnetic drives before storage. Whether it is really a problem is something I don't know, but others have suggested that it might be.

author: nctnico
author_rank: Super Contributor
timestamp: January 11, 2016, 01:44:38 pm
content: Quote from: Wuerstchenhund on January 10, 2016, 07:01:25 pmIt is not that simple. AFAIK: Data stored in MLC memory used in SSDs needs to be refreshed every now and then because of the cell leakage. If there is a lot of untrimmed data there will be extra wear on the memory so the SSD will degrade faster.

author: AlxDroidDev
author_rank: Frequent Contributor
timestamp: January 11, 2016, 03:44:50 pm
content: Quote from: Chris Jones on January 04, 2016, 02:32:31 pmIn some SSDs, the wear levelling algorithm does not rely on the OS, but is built-in into the drive's firmware. Such is the case with the some Intel SSDs. Therefore it would work seaminglessly even on older hardware.