I was installing LibreOffice on my Pi and after around 2 hours of waiting it appeared as if it frozen. The mouse would still respond but the entire desktop environment had hung. So I unplugged it then plugged it back in, now it reaches the point where the desktop environment is supposed to load then shows a black screen. After that the console cursor starts flashing and doesn't stop.
The installation of LibreOffice had hung the system because it was out of space. During boot-up, there were a number of warnings that popped up about insufficient space and files failing to be created. The space issue had resulted in the desktop environment not loading up after the boot completed. I solved this by pressing Ctrl+Shift+F1 after boot completed and launched raspi-config. From this menu I expanded the filesystem to fill the entire SD card. I rebooted and was greeted with the desktop environment.