N9020A hard drive cloning - Page 1
Forum section: electronics / repair

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: October 24, 2024, 12:17:29 am
content: I have a Keysight N9020A MXA spectrum analyzer with the older single-core CPU module with the non-removable hard drive. It's a mechanical 40 GB drive with a parallel ATA interface, and I figured it's a matter of time before it dies so I made an image of it using 'ddrescue'. ddrescue found one bad sector on the entire drive, but was otherwise able to make an image. I wrote the image onto a 64 GB compact flash card in a CF to PATA adapter, and could verify that the drive is readable. It shows four partitions: Windows XP, User Data, Calibration and Recovery.When I installed the CF card in the instrument, it does boot into XP, but it shows only the 'C:' drive. The other three are not visible, and the spectrum analyzer application refuses to start. Using the "Disk Management" utility (after logging in as Administrator) shows four partitions on the disk, but only one is 'active'. I'm unable to mark the others as active, the option is grayed out. Using a PATA to USB adapter, I plugged the drive into a Windows 11 machine and all four partitions were visible and I could see the files on them.The instrument boots and runs fine after reinstalling the original hard drive.Any clues on how to correctly image and restore this drive?

author: KE5FX
author_rank: Super Contributor
timestamp: October 24, 2024, 02:59:16 am
content: Quote from: radar_macgyver on October 24, 2024, 12:17:29 amI usually either attach the old and new drives on a PC temporarily and boot Clonezilla from a USB stick, or use a dedicated disk copier such asthis one. Both have worked fine for backing up hard drives in various embedded systems, from car infotainment systems running QNX to spectrum analyzers running Windows.The built-in Windows utilities are either hard to use or incapable, and the old standby commercial products like Acronis are basically malware at this point, installing tons of unrelated junk that may or may not uninstall cleanly.Also, booting an OS from CF is asking for grief in my experience. At least I've never had much luck with them. I'd try to find a way to use a real SSD or hard drive.

author: fzabkar
author_rank: Super Contributor
timestamp: October 24, 2024, 03:12:53 am
content: Quote from: radar_macgyver on October 24, 2024, 12:17:29 amThe active partition is the one that the system boots from. That's why you can make only one partition active.Note that CF cards can be preconfigured as either ATA or ATAPI devices. You need the former. A tool such as HDAT2 will enable you to retrieve a 512-byte info block using the Identify Device (ATA) or Identify Packet Device (ATAPI) command. You can also do this with CrystalDiskInfo (Text Copy).

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: October 25, 2024, 07:58:51 pm
content: Thank you for the replies!Quote from: KE5FX on October 24, 2024, 02:59:16 amI did try Clonezilla, it would not let me select the original drive from the spectrum analyzer (CZ would detect it, but then only show me the USB drive that I booted CZ from). I had used the 'whole disk' copy mode rather than partitions, and chose to write an image to another drive rather than a disk-to-disk copy.Quote from: KE5FX on October 24, 2024, 02:59:16 amThe interface available from the embedded PC is a 2.5" parallel ATA, so I will find a SATA to PATA adapter (I didn't know these exist - turns out they do) and figure out how to power it within the N9020A's CPU module. I successfully used a CF card to replace the HDD of other embedded devices with PATA HDDs that ran DOS (an older Seapath inertial navigation system) and Windows NT (R&S ZVC Network Analyzer).Quote from: fzabkar on October 24, 2024, 03:12:53 amI forgot to mention that I went down this track because while the Windows "Disk Management" utility shows four entries, only one has a drive letter assigned. The other three do not have a letter, and attempting to assign one gives an error that the partition is not currently active.Quote from: fzabkar on October 24, 2024, 03:12:53 amI think this could be the the reason if Windows XP distinguishes between ATA and ATAPI devices (all four partitions of the cloned CF disk is readable under both Windows 11 and Linux). I'll check this when I have access to the drive if there's an option to switch to ATAPI. When looking up info on ATA vs ATAPI CF cards I did find a couple of your older posts on other forums, and just like in those, I am using a SanDisk CF card.

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: October 27, 2024, 04:41:07 am
content: CrystalDiskInfo does not detect the CF card when using a USB adapter to connect it to a Windows desktop.

author: fzabkar
author_rank: Super Contributor
timestamp: October 27, 2024, 05:20:15 am
content: Quote from: radar_macgyver on October 27, 2024, 04:41:07 amI can't remember if CDI can detect ATAPI devices. Perhaps it can't (they certainly don't support SMART), so that probably confirms your problem. I know for certain that HDAT2 can retrieve Identify info from both ATA and ATAPI devices, but that's a DOS tool, so you'll need to connect the card to a native IDE port. Otherwise, try hdparm in Linux.

author: radar_macgyver
author_rank: Frequent Contributor
timestamp: November 11, 2024, 10:01:11 pm
content: I could not get CrystalDiskInfo to show me details on the CF card on several different Windows 11 machines, so I ordered a PATA SSD from eBay:https://www.ebay.com/itm/314677423941It's a "KingSpec 2.5-inch PATA/IDE SSD Solid State Disk MLC Flash SM2236 Controller", the 64 GB version. It consists of a PATA to SATA bridge chip, with an M.2 SATA SSD on a circuit board, with a plastic shell over the whole works. I used dd to transfer the previously created image and noted that it transferred faster than the CF card did. Installation was easier than the CF card since the mounting holes lined up with the original SSD. I used a hobby knife to trim a bit of the plastic shell so that the 2mm ribbon cable from the motherboard would correctly mate with the SSD. After installation, Windows XP first did a CHKDSK scan, rebooted and the analyzer worked normally. It did boot up a bit faster than usual.Hope this helps anyone else who attempts this.