<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} p
{margin-top:0;
margin-bottom:0}--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi,</p>
<p><br>
</p>
<p>I have two questions about entering emergency mode when mount target fails.<br>
</p>
<p><br>
</p>
<p>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?
</p>
<p>Replacing emergency mode by such a method can be useful when local-fs.target's failure is transient or user interaction is not convenient.
</p>
<p>A possible crash service may like this:</p>
<p>[Unit]<br>
DefaultDependencies=no<br>
Description=Crash the system using the SysRq trigger<br>
[Service]<br>
ExecStartPre=-/bin/sh -c 'echo "crash-system.service started" > /dev/kmsg'<br>
ExecStart=/bin/sh -c 'echo c > /proc/sysrq-trigger'<br>
Type=oneshot<br>
</p>
<p>And this new service(instead of current emergency.target) is used in OnFailure of local-fs.target.
</p>
<p>Does this sound good and useful? Or what is the drawback of this solution?<br>
</p>
<p><br>
</p>
<p>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.
</p>
<p><br>
</p>
<p>Thank you in advance.<br>
</p>
<p><br>
</p>
<p>Best regards,</p>
<p>Yang<br>
</p>
</body>
</html>