Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 37307  / 2 Years ago, tue, october 11, 2022, 10:06:59

When my Ubuntu freezes, is there a way to force reboot other than to hit the hardware reset button on my computer in order to ensure as best as possible that I don't corrupt any hard drive partition?



EDIT:
What do I do if I can't even access the terminal?


More From » freeze

 Answers
3

If your local keyboard is working, you can try the "magic keys"



First edit /etc/sysctl.conf



# Graphical
gksu gedit /etc/sysctl.conf

# Command line
sudo -e /etc/sysctl.conf


Add in the line (at the bottom)



kernel.sysrq = 1


"To perform a safe reboot of a Linux computer, use RSEIUB magic SysRq Magic combination key:



Hold Alt+PrtSc then type R+S+E+I+U+B , you need to press each key for 2-3 seconds."



http://www.unixmen.com/use-magic-sysrq-combination-key-to-recover-from-a-frozen-system-in-linux-ubuntu/



If you are not getting a response from the local keyboard or mouse, your only other option would be to try to ssh from another box.



You will need to install openssh-server first



sudo apt-get install openssh-server


You would then ssh in and shut it down. If you can ssh in, it helps to check the logs as well (before you shut down).



ssh user@froxen_box_ip

sudo shutdown -h now
sudo reboot

[#40799] Wednesday, October 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
coffekne

Total Points: 114
Total Questions: 122
Total Answers: 126

Location: Mauritania
Member since Sun, Oct 17, 2021
3 Years ago
;