I strongly doubt it, avast only deletes what you have chosen to be deleted and a virus could mess with your files/folders and even FAT (file allocation table) or boot sector, but not what you are describing.

This sounds more like a hardware failure (which a virus can’t do) for it not to be recognised even on another system.

If this system hasn’t been active or to be stored inactive for a very long time if the conditions of storage weren’t ideal it could contribute to a failure and I believe this failure would happen soon after reactivation.

Is it even recognised at boot ?