I wrote a start up script that goes to an infinite loop but I forgot to start the process as a separate thread (&). Because the script runs as a daemon, it also gets stuck when shutting down.
Now when the system boots/shutsdown, it gets stuck...I can't exit it using Ctrl + C.
I also can't boot to recovery mode because I changed the default timeout on the grub bootloader to 0 (it used to be 5 seconds which allowed me to select the recovery mode etc).
How do I fix this?