I agree with
@jojesa , before going for diagnosing ram or CPU issues, first check that you are using an original and trustable installation media.
After you are sure that your disk is ok, then you can test your hard disk by downloading an Ubuntu live disk image
https://ubuntu.com/ , and use it to boot into system and do a read test on the hard disk and check if it is ok.
But if you are sure that this is a CPU thing, you have to use
https://www.memtest.org/ < free really good and feature rich but not as easy to use
or
https://www.memtest86.com/ < not free, they have a limited free version too,
And test your RAM stick with the caching enabled which would end up checking for CPU issues as well. Let it run for a few hours, like 6-8 hours to be fully sure that your RAM and CPU are working as desired.