I was wondering if there is a live ubuntu or linux in general OS built for running hardware and software diagnostics no matter what condition the hardware is in.
Yes, there are several Live Linux to do hardware diagnostics. Such as system rescue cd or grml. System rescue CD is based on Gentoo. Of course, You can use Ubuntu Live CD also for using partitioning and other stuff. It has Gparted software installed.
But note that, In a regular Ubuntu Live CD, you can install any software from repository and use this same Live CD to solve any of your problem which can also be solved by other CD's. It is an invaluable feature of Live CD.
This page from distrowatch lists some of the rescue CDs or distros. You can take a look at there.