Unlike your typical computer where you usually shutdown properly, I cannot rely on this during the use of my Raspberry Pi. If the Raspberry Pi is improperly shutdown too many times, data corruption in the file system leading to unbootable SD card may result. So we should use a read-only file system.
Full instructions and explanations are obtained from this link but you can run these commands directly. I modified some of the instructions for personal convenience.
Login with default username: alarm, password: alarm
#Optionally enable root over SSH. The rest of these instructions assume u are in root.