To safely reboot or shut down Linux when your system freezes use the magic SysRq keys. The magic SysRq keys are a key combination which allows you to perform various low level commands regardless of the system's state. This should prevent a fsck from being required on reboot; it also gives some programs a chance to save emergency backups of unsaved work. You should never just cut the power or remove the battery when your system freezes, these actions can cause unnecessary data loss or the file system to become corrupted.
On most Linux system as well as when using Ubuntu the magic SysRq keys are the Alt and PrintScreen keys. When your system stalls first give your Mini 9 a second to catch up, remember it's a sub $400 netbook and not a super computer. If your computer is frozen and you are unable to regain control of the system:
1. Hold down the Alt and Printscreen keys
2. Enter these keys: R E I S U B, you do not need to capitalize the letters and shift should not be held down
3. The keystrokes should be entered a few seconds apart, 2-4 seconds, allowing for each process to end before starting the next.
REISUB allows you to:
R - unRaw (take control of keyboard back from X),
E - tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
I - kIll (send SIGKILL to all processes, forcing them to terminate immediately),
S - Sync (flush data to disk),
U- Unmount (remount all filesystems read-only),
B - reBoot.
You can replace B with O to shutdown the system.
This article was researched using the Magic SysRq Wikipedia page.