Wednesday, February 23, 2022

Resurrecting a Dead ZOTAC ZBOX (AD02)

Resurrecting a Dead ZOTAC ZBOX (AD02)


1 x ZOTAC ZBOX AD02

2 x ELPIDA 2Gb 1Rx8 PC3-12800S DDR3 RAM @ 1600MHz

1 x 500Gb HGST HTS725050A7E630 @ 7200RPM (manufactured NOV-12) 

Initial Observations (Physical):

Cosmetic condition excellent

Physical condition was excellent

Almost all parts included (only missing TTL -> VGA converter)

The ZOTAC, Power Supply and Power Cord smelled moldy

The machine had obviously already been opened

A loose screw was rattling inside it

The machine had not been re-assembled properly

The motherboard had not been re-seated properly

The top rubber USB port cover was damaged, and blocking re-assembly

Initial Observations (Behavioral)

The power button is RED when the machine is idle, GREEN when running

Sometimes you cannot turn the machine on, the button stays RED despite pushing

Sometimes the machine starts after pressing the RED button many times

The machine does not beep when the power button is pressed (when it should)

The machine does not beep five times when memory popped out (when it should)

When the machine does make sound, it is almost like the speaker is "strangled".  

The CPU heat sink did not heat up

The Hard Disk did not heat up

The hard drive does not appear to be spinning up at any time

The Power Supply is giving out 19.2V, which is apparently more than enough

Every test using the TTL port failed to initialize the video, but the HDMI worked fine

Initial Remedial Actions

Machine completely disassembled and re-assembled

Vestigial USB port cover removed (it had been damaged)

The BIOS battery was probably dead, so I swapped in a new one

Power supply wiped down with alcohol to remove moldy smell

Power cord wiped down with alcohol to remove moldy smell

Unsuccessful Boot Method

1. Simply pressing the power button to boot the machine did not work (5 tests)

2. Using the DVI video connector did not work (no video)

Successful Boot Method

1. Unplug ZOTAC

2. Connect ZOTAC to HDMI display, Network, Keyboard & Mouse 

3. Open ZOTAC

4. Remove battery (if one is present)

5. Insert USB Thumb Drive in USB 2.0 (top, rear) or USB 3.1 (rear, blue)

6. Press power button for 30 seconds (CMOS clear)

7. Plug power into ZOTAC, it should light up RED

8. Press power button to boot ZOTAC, power button will turn GREEN

9. Fan should spin up to max speed.  Wait approximately 150 seconds

10. Fan should spin down to normal speed

11. ZOTAC should beep in a "ba-beep" fashion

12. ZOTAC should then automagically boot from USB thumb drive

13. Close up ZOTAC

14. If necessary, set the time/day in software

15. If necessary, use software to set the onboard clock

16. Hope that there is never a power failure :)

Initial Suspicions

Initially, I thought the power supply would be the problem and unable to feed the single-board computer everything it needs to power up at boot (CPU, FANS, HDD).  The power supply was a DELTA unit badged for 19V @ 3.42A but the unit is so small I think it's more likely an optimistic rating than anything else.  It looks more like a 2A unit.  I say this because a similarly rated DELL power supply is twice as big.  My guess was that an aging component (capacitor, usually) in the DELTA power supply was at the root of the problem.

Initial Conclusions

The machine is worth trying to save, as it does work when it can boot 

There is definitely something wrong with the Power On Self Test

There is maybe something wrong with the power supply

The easiest thing to blame (and fix) is the power supply

After speaking with the seller, it was concluded that the power supply was probably OK because it had been used to boot another machine during troubleshooting on their side.  HOWEVER, this may not be the last word on the Power Supply.

Booting From USB....Possible!

I started fooling around with typical "Computer won't boot" measures:

Removing all peripherals (in this case, there was just the 500Gb HGST HDD) 

Removing all the RAM

In both cases, nothing happened - but something should have with the RAM removed.  With most computers, when that happens, the machine starts beeping like crazy.  I then popped the battery out, unplugged the ZOTAC and pressed the power button for 30 seconds.  After that, I left the battery out of place, plugged the machine in and after a few more looooong waits...a miracle happened!  The fan speed slowed down dramatically and the machine issued a very strange "strangled" beep.  At that point, I was greeted with the BIOS setup screen.  Looking around the BIOS, I either noticed that the ZOTAC was able to boot from USB, or I enabled its ability to boot from USB.  In any case, it ended up being enabled.

Multiple HDD Failures on Ubuntu Server Install

I then loaded up a Ubuntu Server 20.04 installer onto a USB key and attempted an install.  A few more looooong waits later, the "strangled beep" happened again and this time the ZOTAC automagically loaded the Ubuntu Server 20.04 install.  Unfortunately, the Ubuntu installation failed multiple times with "Lost Connection to Hard Drive" or "Hard Drive Reset" or "Hard Drive Disconnect" errors that always ended up crashing the install.  This led me to think that the 10-year old 500Gb HGST Hard Drive in the system had gone bad.  

But then I remembered that the seller had declared that the hard drive had been tested good on another system while they were troubleshooting this unit.  But without an external USB 3.x 2.5 HDD enclosure, I was without any means of further testing the HDD, so I put it aside for later.

A Bad SATA Controller?

Considering that the machine cannot complete its POST much of the time, even with the Hard Disk completely removed, the problem has been narrowed down to the onboard SATA Controller.  But, considering the fact that the ZOTAC is a "single board computer" it is very unlikely that the SATA Controller can be deactivated.  

But What About the eSATA Connector?

Another possibility is that the SATA Connector has somehow gone bad and is injecting noise onto the SATA channel.  I tried to test the eSATA interface with an external eSATA RAID device I have, but nothing happened and the ZOTAC was unable to recognize it, maybe because I had only one drive installed in it, and its minimum drive count is two.  The drive I attempted to use was a 3.5 inch Western Digital 640Gb drive, model WD6401AALS.

What About Just Running Linux From USB?

Instead of booting an install from a USB thumb drive, how about running Linux from a USB thumb drive?  I had seen this done before in the lab, so I looked into what version(s) of Linux could be run from a thumb drive.  As it turns out there's a distribution called Puppy Linux designed for just that.

Sources:

https://www.lifewire.com/install-puppy-linux-tahr-usb-drive-2202096

Downloading Puppy Linux

Downloading and installing Puppy Linux was a pretty simple process.  Once I had made my way to the Puppy Linux site, I was able to browse a list of available distributions.  I chose the one that I thought would be the most useful to me (Ubuntu Focal 64), as it seemed to be based on the most recent LTS version of Ubuntu, 20.04:

Running Puppy Linux From a USB Thumb Drive

To run Puppy Linux from a USB thumb drive (as opposed to install from a USB thumb drive) requires that you use two (2) thumb drives.  The smaller thumb drive holds the Puppy Linux installer files, the larger thumb drive is where the Puppy Linux live environment will be set up for preserving machine persistence across reboots, power down and so forth. 

The Installer Thumb Drive

Puppy Linux images are tiny.  FossaPup64 9.5 was only 420Mb in size, so it's going to fit on just about any thumb drive.  I chose a generic 2Gb drive as the installer thumb drive, and used Rufus to load the FossaPup64 image onto it as a bootable image.  When asked about it, I chose the ISO image option.  The install was completely uneventful (and lightning fast!).

The Live Thumb Drive

For the live thumb drive, I wanted to go with something a bigger, faster...and more in keeping with the overall look & feel of the ZOTAC.  So I chose a 16Gb Kingston DataTraveler Micro 3.1:



Installing Puppy Linux on the live thumb drive was also uneventful.  The Puppy Linux installer features an option to install to a thumb drive, so the entire process was slick and only took a few minutes.  After that it was a simple matter to install the 16Gb drive in the ZOTAC and go through the usual 5 or so 5-minute waits until the machine could make it past the POST.  Ultimately, I got this:



Time To Make Some Purchases

Seeing as the eSATA interface was still a question mark, the ZBOX is so tiny (and tidy) and its ability to boot from a USB thumb drive was proven, I decided to buy a USB 3.x thumb drive with a large enough capacity to host a full Ubuntu Desktop 20.04 installation so as to make it a truly useful machine regardless of the ultimate disposition of the SATA (and eSATA) controller.

USB 3.x vs. SATA

It's not like I was giving up much by switching away from SATA to USB 3.x  USB 3.0 and 3.1 are pretty fast, with transfer rates rivaling (and sometimes exceeding) that of eSATA:

USB tends to be about 20% faster than eSATA at reads, while eSATA was about 20% faster at writing data to the disk. While I make no claims for these to be definitive benchmarks (I used the freeware Crystal DiskMark 3.0 program for my tests), I do think the results indicate what you can expect to see from today's eSATA and USB 3.0 drives.  In both cases the real world results were quite a bit slower than their theoretical bests. With reads, my USB drive averaged 90 MBps, while the eSATA drive came in at 75 MBps. When it came to writing to the disk eSATA still processed data at 75 MBps while the USB drive dropped to 62 MBps.

https://www.computerworld.com/article/2693284/usb-3-0-vs-esata-is-faster-better.html

The New Thumb Drive

Seeing as Ubuntu recommends at least 25Gb for its Desktop edition, and with the relative low cost of USB thumb drives, I elected to buy a SanDisk Ultra Fit 128Gb USB 3.1:



Sources:

https://low-orbit.net/how-much-disk-space-for-ubuntu

Setting Up To Run Ubuntu Desktop from a Thumb Drive

Installing Ubuntu Desktop on the ZOTAC ZBOX followed exactly the same process as installing Puppy Linux.  Two USB thumb drives were involved, just bigger ones.  The image for Ubuntu Desktop is 2.9Gb in size, so a bigger installer thumb drive was needed.

Sources:

https://www.fosslinux.com/10212/how-to-install-a-complete-ubuntu-on-a-usb-flash-drive.htm

Running Ubuntu From a USB Thumb Drive

Running Ubuntu Desktop from a USB thumb Drive was "OK".  Using the GUI interface was a bit of a drag due to lag, but the command line was fast enough.  Considering that my plan is to use the ZOTAC as a headless staging server on my local LAN, this unit is more than enough for my needs:


Cost Breakdown

ZOTAC ZBOX AD02                 HKD230.00 (USD29.49), 

SanDisk SanDisk Ultra Fit 128Gb USB 3.1 HKD115.00 (USD14.74), 

Total:  HKD345.00 (USD44.23)...and a whole bunch of fun!

Initial Conclusions

I had a lot of fun troubleshooting the ZOTAC ZBOX AD02.  At first, it was quite challenging just to get it to boot.  Then, once I had figured out how to get it to boot consistently, I had to learn how to run it from a thumb drive because the hard disk subsystem wasn't working properly.  This was also fun.  

Epilogue


Enter RAIDON

After I wrote the original ZOTAC article, I subsequently acquired three "problematic" external hard drive enclosures for HKD125 (USD16.00).  

One of them was a RAIDON / Stardom iTank i302 3.5" External USB/eSATA Harddisk Case that came with a Seagate Barracuda 250Gb (ST3250318AS) inside.  The only problem with the RAIDON enclosure was that it came without its specialized tray key.  Instead, you need to use a small-bore screwdriver to open it:


RAIDON eSATA Enclosure

  • As soon as I plugged RAIDON into ZOTAC it was automagically recognized and made available as /dev/sdb.  
  • I then used the fdisk command to delete any old partitions on the disk and to create a new primary linux partition on it as /dev/sdb1.  
  • I then used the mkfs program to create a linux filesystem (type 83) on /dev/sdb1.  

Everything went normally...and very quickly!  Taking note of what seemed like a large speed difference, I used hdparm to get some performance numbers from ZOTAC with respect to the throughput of the eSATA and USB 3.1 subsystems.  

Here's what I found out:

USB 3.1

# hdparm -t /dev/sda

/dev/sda:

Timing buffered disk reads: 128 MB in  3.00 seconds =  42.62 MB/sec

eSATA

# hdparm -t /dev/sdb

/dev/sdb:

Timing buffered disk reads: 326 MB in  3.01 seconds = 108.19 MB/sec

Startling Results

As it turns out, the eSATA interface in ZOTAC is about 2.5X faster than its USB 3.1 counterpart.  This is a very interesting result, given the throughput claims made by USB 3.1 fans, who say that USB 3.1 is equal and sometimes faster than eSATA.  Not on ZOTAC.

Can ZOTAC Boot from eSATA?

Given the large speed difference, the next question to be answered was whether or not ZOTAC could boot from RAIDON.  If possible, this would garner an immediate and significant speed gain and make ZOTAC much more flexible and expandable (not to mention make ZOTAC even more fun in a kind of "second wave" type of puzzle to solve.  It's been a long, long time since I have needed to boot a computer from an external hard drive).

So I:

  • Used rufus to load the Ubuntu Server 20.04 installer on a USB thumb drive
  • Plugged the USB thumb drive into one of the ZOTAC blue USB 3.1 ports
  • Booted ZOTAC with RAIDON unplugged
  • Waited about 5 minutes for console messages to appear
  • Plugged in the RAIDON
The installer immediately recognized the Seagate Barracuda 250Gb (ST3250318AS) and presented it as the target destination disk.  The only thing I had to adjust was the suggested size of the root partition (from 100GB to the maximum size possible) and then Ubuntu Server 20.04 installed without incident.  Once the install was complete, I removed the USB thumb drive and soft-rebooted ZOTAC using the following command:

# shutdown -r now

ZOTAC then booted from RAIDON without any incident.

Final Conclusions

In the final analysis, the problem area of ZOTAC is the onboard SATA subsystem.  I wonder how many other ZOTAC have suffered a similar fate, and been tossed into the trash as a consequence.  

Hopefully this article has demonstrated a few ways to keep a "ZOTAC gone bad" in service, with just a couple of small changes in terms of its configuration and system boot strategy:

1.  You can boot ZOTAC using a USB 3.1 thumb drive as a primary data store

2.  You can boot ZOTAC using an eSATA hard drive as a primary data store

As for myself, for a grand total of HKD460 (USD58.87), I saved a ZOTAC from the trash pile and gave it a new lease on life as a website development server, where it will undoubtedly provide many more useful years of service.

No comments:

Post a Comment