I have a computer that occasionally crashes. I am using Teamviewer to access it remotely, but I obviously lose access when it crashes.

Is it possible to switch the default behaviour from shutting down to restarting? Then I could put Teamviewer in my startup programs and solve my post-crash access issues.


If you mean to reboot when there is a kernel panic, you can edit /etc/default/grub and add the panic=10 parameter which will reboot after 10 seconds of a panic. Add it to the line containing GRUB_CMDLINE_LINUX_DEFAULT=, e.g that line should read:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash panic=10"

You can change that number to the seconds you want to initiate the reboot after the panic. To reboot immediately after a panic add a negative value, e.g. panic=-1. After editing that file run sudo update-grub.

Alternatively you can edit /etc/sysctl.conf and add the

kernel.panic = 10

line there. It has the same meaning.

Also if you want to reboot on oops-es too, you may add the oops=panic kernel parameter in the /etc/default/grub file, so the line will read something like:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash panic=10 oops=panic"

This will trigger a panic on oops-es too and reboot after 10 seconds. (Again don't forget to run sudo update-grub after editing the grub file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.