<div dir="ltr">Hi Thomas,<div><br></div><div><br></div><div>Did you ever have any time to take a look at this, or have any thoughts about it ?</div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div><br></div>Cheers,<div>Just</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 10 May 2022 at 20:45, Justin Cattle <<a href="mailto:j@ocado.com">j@ocado.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi Thomas,</div><div><br></div><div><br></div>I found a bit of time to take a look.<div><br></div><div>I have forked and created a branch with a demo of how it could work.  It's not meant to be the finished article, but hopefully it shows how some of it could be achieved.</div><div><br></div><div>Things to note:</div><div><ul><li>Relevant part of NFSROOT config needs to be something like this:</li><ul><li>systemd systemd-sysv libpam-systemd sysvinit-core-</li></ul><li>Because of potential race conditions with starting usual tty services, I select unused tty for this</li><ul><li>fai on tty11</li><li>fai-maint on tty12</li></ul><li>fai-maint is a systemd service which creates a tty with a root bash session already logged in.  It's just an example of how that kind of thing could be achieved with systemd.</li><li>Although I tried to make FAI itself still support both SysV and Systemd, it's hard to do that in the packaging I think, so for this I dropped SysV support in the packaging.</li><ul><li>You can use the systemd-sysv compatibility layer to create service units, but that doesn't give as much control over the units [ they are much more basic ], so native systemd is better.</li></ul></ul></div><div><br></div><div>Please also note I haven't tested this exhaustively, so far I've only used it with a squashfs image, not an nfs root.</div><div><br></div><div>I'd be happy to work with you to create a PR and review it together to try and integrate it, but I appreciate you may not want to look at this yet.</div><div>It seems to be that multi init system packaging could be the trickiest part, and you may not want to drop SysV support any time soon.</div><div><br></div><div><div><div dir="ltr"><div><div>Please take a look and let me know what you think:</div><div><a href="https://github.com/ocadotechnology/fai/tree/systemd-support" target="_blank">https://github.com/ocadotechnology/fai/tree/systemd-support</a></div><div><br></div></div><div><br></div>Cheers,<div>Just</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 6 May 2022 at 20:40, Thomas Lange <<a href="mailto:lange@cs.uni-koeln.de" target="_blank">lange@cs.uni-koeln.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Justin,<br>
<br>
I didn't had time to work on this yet. I do not know how to call the<br>
main fai script from systemd, so its output is shown on the console<br>
and the input is also read from the console. It must also work that<br>
the admin can interrupt the fai run via ctrl-C and get an interactive shell.<br>
Does anyone know how to do this?<br>
<br>
Currently (using sysv init) the script is started as /etc/init.d/rcS<br>
and starts some other daemons on demand (for e.g. sshd is only started<br>
if FAI_FLAGS includes sshd). How do we do this using systemd?<br>
<br>
<br>
>>>>> On Fri, 6 May 2022 15:02:30 +0100, Justin Cattle <<a href="mailto:j@ocado.com" target="_blank">j@ocado.com</a>> said:<br>
<br>
    > Hi,<br>
    > I'm just wondering what the current blockers to using systemd in the nfsroot are.  Are there some things that simply won't work, or is it more about reducing complexity by only supporting<br>
    > a single init system, or something else ?<br>
<br>
<br>
-- <br>
best regards Thomas<br>
</blockquote></div>
</blockquote></div>

<br>
<p style="margin:0px;background-color:rgb(255,255,255)"><font face="Calibri, sans-serif" color="#aeaaaa"><span style="font-size:14.6667px">Notice: <br>This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group.<br><br>If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.<br><br>References to the "Ocado Group" are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Buildings One & Two, Trident Place, Mosquito Way, Hatfield, Hertfordshire, AL10 9UL.</span></font></p>