Reboot Safely When Your Linux Computer Becomes Unresponsive

Novi ste u svijetu Linuxa? Imate hrpu početničkih pitanja?

Moderator/ica: Moderatori/ce

Pravila foruma
PRAVILA ZA NOVE KORISNIKE LINUXA!
Prije otvaranja bilo kakve diskusije svaki novi korisnik u svijetu Linuxa obavezan je učiniti sljedeće korake:
Pročitati ove tekstove iz naše Wikipedije:
- Sve uvodne tekstove Linuxa za početnike (njih 5)
- Sve što trebate znati o radu s diskovima
- Pročitati ovu temu za početnike
- Pokušati pronaći riješenje problema u Enciklopediji znanja

Nakon toga korisnik smije otvoriti temu s naslovom svog problema uz obaveznu naznaku Linux distribucije koju koristi u formi:
[Linux distribucija, broj verzije, grafičko okruženje]: Naslov problema
U prvom postu korisnik obavezno mora odgovoriti na ova pitanja:
- Da li ima instalirane Windowse?
- Što ga je motiviralo na instaliranje i korištenje Linux distribucije?
- Obavezno je potrebno navesti specifikacije hardvera (Ime Laptopa, tip procesora, grafičke i mrežne kartice, količina RAM-a i diska)

Bez učinjenih ovih prvih koraka, na teme se neće odgovarati i one će biti izbrisane s foruma!
Avatar
max360se
Postovi: 6781
Pridružen/a: 06 lis 2011, 01:29
Spol: M
OS: Ovisi za sta
Lokacija: ~$

Reboot Safely When Your Linux Computer Becomes Unresponsive

Post Postao/la max360se »

Although most Linux distros are stable, there are some hard times when your system hangs, and leaves you in a frozen state. Your mouse, keyboard may not work, and so, you are unable to shutdown safely. At most of the time at these situations, we mostly reboot, but such force shutdowns may be harmful for your hard disk drives. There is a simple way where you can safely reboot your Linux box when it becomes unresponsive.

To do so, you will need to press the Alt key and SysRq key together. The SysRq key is mostly located at the topmost row of your keyboard, somewhere near the number keys. Now hold down Alt and keeping it pressed, press the SysRq key. Now you need to type reisub with your other hand. Make sure you keep a gap of few seconds between each letters while typing, this will ensure all the actions are completed successfully. The meaning of each key press are given below:

r – Puts the keyboard into raw mode, taking control of it away from the X server.
e – Sends the terminate signal to all processes, asking them to end gracefully.
i – Sends the kill signal to all processes, forcing them to end immediately.
s – Flushes data from your cache to disk.
u – Remounts all file systems read-only.
b – Reboots your computer.

You can learn more about this feature here.

For this to work, SysRq must be enabled in your kernel. To check it, type this in terminal:

cat /proc/sys/kernel/sysrq

If the above command returns 1, it is activated, otherwise you will need to enable it using

sudo echo "1" > /proc/sys/kernel/sysrq
http://www.muktware.com/3977/reboot-saf ... responsive
http://kernel.org/doc/Documentation/sysrq.txt
Lutherus je napisao/la:Ne postoje linuksi, postoji samo Linux i on je jedan i on je kernel.
Is Linux About Choice? || Pulsir - awesome blogging site :D
iv@n je napisao/la:Divide et impera i kako se kaže na latinskom da je ljudska glupost neuništiva.
Avatar
Abzeenth
Site Admin
Postovi: 6502
Pridružen/a: 06 lip 2009, 23:16
OS: Kubuntu & Fedora
Lokacija: Online

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la Abzeenth »

Da, Magic SysRq key. Mislim da mi je samo jednom to uspjelo rofl :facepalm
Avatar
max360se
Postovi: 6781
Pridružen/a: 06 lis 2011, 01:29
Spol: M
OS: Ovisi za sta
Lokacija: ~$

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la max360se »

Upće nisam imao pojma za ovo dok nisam naletio na članak.
Lutherus je napisao/la:Ne postoje linuksi, postoji samo Linux i on je jedan i on je kernel.
Is Linux About Choice? || Pulsir - awesome blogging site :D
iv@n je napisao/la:Divide et impera i kako se kaže na latinskom da je ljudska glupost neuništiva.
Avatar
Suko
Site Admin
Postovi: 16079
Pridružen/a: 03 tra 2008, 18:09
Spol: M
OS: Mint 17 Cinnamon
Lokacija: Svugdi me ima. Slavonija uglavnom.

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la Suko »

Meni to nikad nije radilo.
Avatar
sumski
Moderator
Postovi: 1779
Pridružen/a: 10 ruj 2010, 11:20
Spol: M
OS: openSUSE Factory KDE

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la sumski »

Neki to imaju po defaultu ugašeno. Znam da Arch ima skroz ugašen SysRq (podesivo u /etc/sysctl.conf), a SUSE recimo ima dozvoljen sync, remount i reboot
Listen, I gotta fight the lion. That's what that guy Scott's all about. I know. I've studied him already.
Avatar
shrike
Moderator
Postovi: 10322
Pridružen/a: 07 pro 2007, 18:07
Spol: Y
OS: utuntu 19.10
Kontakt:

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la shrike »

za ovo sam saznao još prije i par puta me spasilo.
Es gibt keinen Gott, kein Universum, keine menschliche Rasse, kein irdisches Leben, keinen Himmel, keine Hölle. Es ist alles ein Traum - ein grotesker und dummer Traum. Nichts existiert außer dir. Und du bist nur ein Gedanke - ein vagabundierender Gedanke, ein nutzloser Gedanke, ein heimatloser Gedanke, der verloren in der leeren Ewigkeit wandelt!
Avatar
Fugu
Postovi: 2322
Pridružen/a: 08 ožu 2010, 20:26
Spol: M
OS: CimetMint 18.1
Lokacija: JustPine

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la Fugu »

Imam to isprintano još od ulaska u Linux.
Isprobao masu puta.
Nikad nije pomoglo.
:zbunjen
Where there is a gui there's a way.
Avatar
sumski
Moderator
Postovi: 1779
Pridružen/a: 10 ruj 2010, 11:20
Spol: M
OS: openSUSE Factory KDE

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la sumski »

Samo nije Alt, nego AltGr, barem na hrvatskom layoutu. Neznam, meni radi svaki put, samo u
/etc/sysctl.conf treba bit linija

Kod: Označi sve

kernel.sysrq = 1
Listen, I gotta fight the lion. That's what that guy Scott's all about. I know. I've studied him already.
Avatar
Fugu
Postovi: 2322
Pridružen/a: 08 ožu 2010, 20:26
Spol: M
OS: CimetMint 18.1
Lokacija: JustPine

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la Fugu »

Moram provjerit tu liniju.
AltGr sigurno nisam koristio.
Prepravit ću si uputu.
Korisna informacija.
:thumbs
Where there is a gui there's a way.
Avatar
madone
Postovi: 1594
Pridružen/a: 09 srp 2008, 09:49
Spol: M
OS: Debian
Lokacija: Zagreb

Re: Reboot Safely When Your Linux Computer Becomes Unrespons

Post Postao/la madone »

Kod mene radi od kad koristim linux (Ubuntu, Debian) kombinacija (altGr + printscreen).. jedini problem je što se uvijek smrzne bios nakon takvog reboota...
Odgovori