<div dir="ltr"><div><div><div>From further reading of documentation, please correct me if I am wrong, one way (not sure if correct) to start SSH during emergency mode is to edit /etc/systemd/system/sshd.service and modify: <br><br>WantedBy=multi-user.target<br><br></div>to<br><br>WantedBy=multi-user.target emergency.target<br><br></div>Do I need to do anything with networking service or systemd will figure dependency of SSH service automatically? Any reason why emergency mode is not running SSH by default?<br><br></div>Sergei.<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On 26 September 2016 at 13:37, Sergei Franco <span dir="ltr"><<a href="mailto:sergei.franco@gmail.com" target="_blank">sergei.franco@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I wasn't aware of emergency.target existence (systemd is new to me).<br></div><div>What would be correct way to automatically start networking/ssh in emergency mode?<br><br></div><div>The only thing I could find is this bug report: <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1213781" target="_blank">https://bugzilla.redhat.com/<wbr>show_bug.cgi?id=1213781</a><span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Sergei.<br></div><div><br></div><div><br><br></div><br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On 26 September 2016 at 13:09, Dave Reisner <span dir="ltr"><<a href="mailto:d@falconindy.com" target="_blank">d@falconindy.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Mon, Sep 26, 2016 at 11:35:51AM +1300, Sergei Franco wrote:<br>
> Thank you for your quick reply.<br>
><br>
> I just tested this scenario on Ubuntu 12.04LTS (with upstart) and it<br>
> present the following message:<br>
><br>
> The disk drive for /data is not ready yet or not present.<br>
> keys:Continue to wait, or Press S to skip mounting or M for manual recovery<br>
><br>
> So it is not as big difference as I initially thought, except it is much<br>
> easier to deal with by simply pressing S, while I believe there is no<br>
> such option for systemd (it would be nice).<br>
<br>
</span>Making bootup potentially interactive in this manner is strictly worse<br>
than dumping you into emergency mode. At least with emergency mode, you<br>
might be able to add dependencies to emergency.target such that, for<br>
example, an sshd comes up and an admin can login to the remote box.<br>
How's this supposed to work with a random prompt which must be accessed<br>
on /dev/console? Enforce that everyone has some sort of out of band<br>
console?<br>
<br>
Unclear why you consider this a superior design decision...<br>
<div><div><br>
> So in future for non crucial disks I will use nofail.<br>
><br>
> Best regards.<br>
><br>
> Sergei.<br>
><br>
> P.S. As advised I have replied to correct address.<br>
><br>
> On 26 September 2016 at 11:30, Reindl Harald <<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a>> wrote:<br>
><br>
> if you post somehting to a mailing-list and you get a response on the list<br>
> POST REPLIES TO THE LIST - *period*<br>
><br>
> Am 26.09.2016 um 00:28 schrieb Sergei Franco:<br>
><br>
> Thank you for your quick reply.<br>
><br>
> I just tested this scenario on Ubuntu 12.04LTS (with upstart) and it<br>
> present the following message:<br>
><br>
> The disk drive for /data is not ready yet or not present.<br>
> keys:Continue to wait, or Press S to skip mounting or M for manual<br>
> recovery<br>
><br>
> So it is not as big difference as I initially thought, except it is<br>
> much<br>
> easier to deal with by simply pressing S, while I believe there is no<br>
> such option for systemd (it would be nice).<br>
><br>
> So in future for non crucial disks I will use nofail.<br>
><br>
> Best regards.<br>
><br>
> Sergei.<br>
><br>
> On 26 September 2016 at 10:57, Reindl Harald <<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.net</a><br>
> <mailto:<a href="mailto:h.reindl@thelounge.net" target="_blank">h.reindl@thelounge.<wbr>net</a>>> wrote:<br>
><br>
><br>
><br>
> Am 25.09.2016 um 23:52 schrieb Sergei Franco:<br>
><br>
> I am looking at correct way to disable the "feature" of<br>
> emergency mode<br>
> when systemd encounters missing block device entires in fstab.<br>
><br>
> For example:<br>
><br>
> the following entry is in /etc/fstab:<br>
> UUID=d4a23034-8cbe-44b3-92a5-3<wbr>d38e1816eff /data <br>
> xfs<br>
> defaults 0 0<br>
><br>
> If the drive (d4a23034-8cbe-44b3-92a5-3d38e<wbr>1816eff) has been<br>
> detached<br>
> and machine rebooted it stops booting with Emergency mode, even<br>
> though<br>
> the /data is not crucial for boot<br>
><br>
><br>
> RTFM - when you don't say "nofail" it's ecpected to be crucial<br>
><br>
> your entry says it's crucial<br>
><br>
> <a href="http://unix.stackexchange.com/questions/53456/what-is-the-di" rel="noreferrer" target="_blank">http://unix.stackexchange.com/<wbr>questions/53456/what-is-the-di</a><br>
> fference-between-nobootwait-a<wbr>nd-nofail-in-fstab<br>
> <<a href="http://unix.stackexchange.com/questions/53456/what-is-the-" rel="noreferrer" target="_blank">http://unix.stackexchange.com<wbr>/questions/53456/what-is-the-</a><br>
> difference-between-<wbr>nobootwait-and-nofail-in-<wbr>fstab><br>
><br>
><br>
><br>
><br>
<br>
</div></div><div><div>> ______________________________<wbr>_________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedeskto<wbr>p.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/systemd-devel</a><br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>