Fix reboot to recovery by checking cmdline parameter

Credits to @Agontuk