Hi,

I have two questions about entering emergency mode when mount target fails.


If local-fs.target fails in booting stage, it will come into emergency mode and 
wait for user interaction. In this failure case, is it better to introduce a 
crash generate core dump and reboot automatically?

Replacing emergency mode by such a method can be useful when local-fs.target's 
failure is transient or user interaction is not convenient.

A possible crash service may like this:

[Unit]
DefaultDependencies=no
Description=Crash the system using the SysRq trigger
[Service]
ExecStartPre=-/bin/sh -c 'echo "crash-system.service started" > /dev/kmsg'
ExecStart=/bin/sh -c 'echo c > /proc/sysrq-trigger'
Type=oneshot

And this new service(instead of current emergency.target) is used in OnFailure 
of local-fs.target.

Does this sound good and useful? Or what is the drawback of this solution?


Another question is: is there a configuration option to cause a reboot if 
local-fs.target fails? So that we can use the option directly.


Thank you in advance.


Best regards,

Yang
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to