squashfs is very CPU intensive (it is compressing your files). If your heatsink fins are clogged up, your system will overheat and it will shut down to protect itself.

Shine a light in the fan...