Question About Linux Magic System Request Key
From: Bugrahan İmal
Date: Fri Nov 08 2024 - 04:21:24 EST
Hi!
My name is Bugrahan, I hope you are doing well. I found this email
in https://www.kernel.org/doc/html/v4.18/admin-guide/sysrq.html, and yes
I have more question :).
My case is about raspberry pi which run raspberry pi os based on
debian. In my use case power may suddenly cuts off so I cannot schedule
a shutdown perfectly so that leads sdcard corruption. But fortunately I
can have a clue that cuts off will be in next 5 minutes. So I was
thinking remounting filesystem as read only for that 5 minutes. If power
cuts off memory will be safe, else after that time I remount this rw
again. I search and found I cannot remount / partition while working on
it with "mount" command. After a search I found out magic sysrq-triggers
that seems solve my problem. I run "echo u > sysrq-trigger" to make
filesystem ro, and "mount -o remount, rw /" to return it rw. I want to
be sure about this process has no side effect. I couldnt find any
documentation especially related with "u" so I asked you.
Thank you for reading my problem, I would be glad if you guide me about
this situation.
Sincerely
Bugrahan Imal