• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Hard reset on linux

Silver Rabbit

New Member
Joined
Dec 24, 2013
Messages
8 (0.00/day)
Hey guys. I know this is subjective but does hard reset damage the Linux Os? I am currently using Pear OS but also i do use other OS so i want to know. Does it damage the OS like the way in windows?
 
since when does it 'damage' windows, that's only if you're writing data (i've had bsods during saving a game while my OC was unstable that broke the very same save files the game was trying to write)
 
Anything that isn't malware doesn't damage the OS it just writes a bunch of files into a directory that only run when you want to run them unless you accidentally set them up to start automatically.
 
Hey guys. I know this is subjective but does hard reset damage the Linux Os? I am currently using Pear OS but also i do use other OS so i want to know. Does it damage the OS like the way in windows?

Will it damage it? Most likely not.

Can it damage it? Maybe, but most likely not.

Do you have anything to worry about if you pressed the reset button? Probably not.
 
Wait did you mean hard reset as in pressing the reset button or Hard Reset the game?
 
If system already crashed/hung it means no any reads/writes performed. Hard reset itself can't damage anything.
 
Yea, like Drone said if the system is already crashed/hung then no reads or writes are being performed. I would perform a cold boot, and not just a warm boot/reset. Power the system off, then count to 10, and then power it back on. :toast:

EDIT: Oh and always remember anything you power off there is always a chance it won't power back on... :p But I wouldn't worry about it.
 
Last edited:
  • Like
Reactions: xvi
For future reference, Alt+SysRq+K will reset the kernel without messing with the power and should work in any kind of crash that isn't the result of hardware.
 
For future reference, Alt+SysRq+K will reset the kernel without messing with the power and should work in any kind of crash that isn't the result of hardware.

Here's a little tutorial to help him out. :toast:
 
Thanks hellrazor and Mindweaver for the tips.
And for the sake of further documenting what Alt-SysRq can do:
Check if SysRq key is enabled in your linux distribution:
(most modern linux distributions have their kernel compiled with sysrq key support)
Code:
from a terminal prompt:
cat /proc/sys/kernel/sysrq
- a value of "0" means it's disabled
- a value of "1" means all sysrq features are available
- any values beetween "2" and "510" specify which sysrq features are available.

A typical value of "438" splits into 2 + 4 + 16 + 32 + 128 + 256, only the functions associated with the numbers below are allowed:

0- disable SysRq
1- enable SysRq completely
2- enable control of console logging level
4- enable control of keyboard (SAK, unraw)
8- enable debugging dumps of processes etc.
16- enable sync command
32- enable remount read-only
64- enable signalling of processes (term, kill, oom-kill)
128- allow reboot/poweroff
256- allow nicing of all RT tasks

source : http://superuser.com/questions/375816/configuring-sysrq-in-linux
A common use of the magic SysRq key is to perform a safe reboot of a Linux computer which has otherwise locked up. This can prevent a fsck being required on reboot and gives some programs a chance to save emergency backups of unsaved work.

1- Hold down the Alt and SysRq (Print Screen) keys.
2- While holding those down, type the following keys in order, several seconds apart: R E I S U B
3- Computer should reboot.


What "R E I S U B" does in the background :
unRaw (take control of keyboard back from X),
tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
kIll (send SIGKILL to all processes, forcing them to terminate immediately),
Sync (flush data to disk),
Unmount (remount all filesystems read-only),
reBoot.

source : http://en.wikipedia.org/wiki/Magic_SysRq_key
Several ways to defeat the magic SysRq key (for example, in an educational environment):
Code:
from a terminal prompt:
echo 0 > /proc/sys/kernel/sysrq
Code:
edit /etc/sysctl.conf and add the following lines
# Disables the magic SysRq key
kernel.sysrq = 0
Code:
from a terminal prompt:
sysctl -w kernel.sysrq=0
source : http://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/security-sysrq.html
 
Last edited:
Back
Top