<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=2788&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / [Solved] openrc-init failure]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=2788</link>
		<description><![CDATA[The most recent posts in [Solved] openrc-init failure.]]></description>
		<lastBuildDate>Fri, 19 Jun 2020 08:37:14 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=22764#p22764</link>
			<description><![CDATA[<p>I have also had a look at getting a newer version of OpenRC running. I have reported on<br />this under the DIY thread :-</p><p><a href="https://dev1galaxy.org/viewtopic.php?id=3371" rel="nofollow">https://dev1galaxy.org/viewtopic.php?id=3371</a></p><p>A newer version is now available in Ceres, although there remains a bug related to openrc-init during shutdown.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 19 Jun 2020 08:37:14 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=22764#p22764</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15619#p15619</link>
			<description><![CDATA[<p>This may be a good point to ask about the benefits of running OpenRC and openrc-init.</p><p>As mentioned, OpenRC can use the existing init scripts as is, but if you re-do a script, you can set it up to do supervision, as in the above example of agetty, although SysV init already supervises getty! The other feature that OpenRC brings is that you can start services in parallel, although it does tend to make the logs a bit untidy. With OpenRC being started from SysV init, things seem to work very nicely and with little impact on the running of the machine. Once you replace SysV init with openrc-init, then the shutdown behaviour is changed as openrc-init uses different signals, so you tend to end up using openrc-shutdown. With openrc-init running the logging in rc.log is tidier, compared when started from SysV init, when I was seeing duplicates of the different phases.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sun, 21 Apr 2019 10:03:20 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15619#p15619</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15616#p15616</link>
			<description><![CDATA[<p>To document my findings.</p><p>Debians implementation of openrc init uses /sbin/init (obviously).&#160; /etc/inittab, /etc/init.d/rcS, and /etc/rc are used to run openrc runlevel sysinit (until completion) and then runlevel default.&#160; Note runlevel boot is not used in Debians implementation.&#160; &quot;running&quot; these runlevels is executing /sbin/openrc with the runlevel as the commandline arg.</p><p>When running openrc-init (as demonstrated by @Geoff42), /sbin/init, initab, rcS, rc are not used.&#160; Instead openrc-init has hard-coded (in openrc-init.c) the running of runlevel sysinit, followed by runlevel boot, followed by runlevel default.&#160; &quot;default&quot; can be overridden with a commandline arg to openrc-init.</p><p>Also, it appears that Debian has added patches to openrc for the LSB and insserv support.&#160; This support is not included in vanilla openrc.&#160; This modification provides the ability for openrc to use stock sysvinit init scripts (via LSB) and thus not requiring all init scripts to be rewritten to openrc-run interpretive specs (/bin/sh can be used).&#160; This is good in that it allows openrc to be run with minimal changes, from sysvinit.&#160; Debians process for using LSB and insserv does not use the 3 hidden .depend.* files in /etc/init.d, instead processes the LSB headers directly (thus the 3 .depend.* files are not used).</p><p>Thanks @Geoff42 for your persistent work in getting openrc-init to boot!</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Sat, 20 Apr 2019 23:54:36 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15616#p15616</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15550#p15550</link>
			<description><![CDATA[<p>I should mention that once you have <span class="bbc">openrc-init</span> working, that instead of using <span class="bbc">shutdown</span> you will need to use <span class="bbc">openrc-shutdown</span> which sends the correct signals to openrc-init. <span class="bbc">openrc-shutdown</span> takes -r for reboot and -p for poweroff and -H for halt and also needs the time do do it, which can be &#039;now&#039;. I just need to remember where I can plug this into LXQt!</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sun, 14 Apr 2019 10:14:58 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15550#p15550</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15542#p15542</link>
			<description><![CDATA[<p>Having got openrc-init working on a Xen Beowulf VM, the next thing to try was Beowulf on some real hardware.<br />As I had tried renaming the <span class="bbc">agetty</span> to <span class="bbc">getty</span>, I though this time I would leave it as agetty.</p><p>I had downloaded the 0.41.2 sources, as above, and run make, then :-</p><p>Either copy the files from your copy of the source tree or from their github at :-<br /><a href="https://github.com/OpenRC/openrc/blob/master/init.d/agetty.in" rel="nofollow">https://github.com/OpenRC/openrc/blob/m … /agetty.in</a><br /><a href="https://github.com/OpenRC/openrc/blob/master/conf.d/agetty" rel="nofollow">https://github.com/OpenRC/openrc/blob/m … f.d/agetty</a></p><div class="codebox"><pre><code>cp /home/user1/src/Devuan/openrc-0.41.2/src/rc/openrc-init /sbin/openrc-init.41
cd /etc/init.d/
cp /home/user1/src/Devuan/openrc-0.41.2/init.d/agetty .
chmod a+x agetty
cd ../conf.d/
cp /home/user1/src/Devuan/openrc-0.41.2/conf.d/agetty .</code></pre></div><p>I think the idea is that you leave <span class="bbc">init.d/agetty</span> as is and put your edits in <span class="bbc">conf.d/agetty</span></p><div class="codebox"><pre><code>ln -sr /etc/init.d/agetty /etc/init.d/agetty.tty1
rc-update add agetty.tty1 default
cd /boot/grub
nano grub.cfg</code></pre></div><p>add to the linux line in a spare entry <span class="bbc">init=/sbin/openrc-init.41</span></p><p>Then rebooted and selected the OpenRC-init option and it all seemed to work nicely.</p><p>The next step was to set up grub &#039;properly&#039; so edited <span class="bbc">/etc/default/grub</span> and added</p><div class="codebox"><pre><code>init=/sbin/openrc-init.41</code></pre></div><p>thus to</p><div class="codebox"><pre><code>GRUB_CMDLINE_LINUX_DEFAULT=&quot;earlyprintk=vga,keep net.ifnames=0 init=/sbin/openrc-init.41&quot;</code></pre></div><p>followed by <span class="bbc">update-grub</span>.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sat, 13 Apr 2019 15:11:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15542#p15542</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15539#p15539</link>
			<description><![CDATA[<p>I thought that it would be good to check that version 0.41.2 does actually work,&#160; so as a complete hack, I down loaded 0.41.2 from</p><p><a href="https://github.com/OpenRC/openrc/releases" rel="nofollow">https://github.com/OpenRC/openrc/releases</a></p><div class="codebox"><pre><code>tar xvf openrc-0.41.2.tar.gz
cd openrc-0.41.2
make</code></pre></div><p>then as root</p><div class="codebox"><pre><code>cp src/rc/openrc-init /sbin/openrc-init.41
cd /boot/grub
nano menu.lst</code></pre></div><p>where I changed the kernel line to <span class="bbc">init=openrc-init.41</span>, remembering that I had another kernel which could boot <span class="bbc">SysV init</span> if necessary!</p><p>When I booted up using the 0.41.2 openrc-init, it seems to work nicely and everything has come up without any errors.</p><p>I&#039;m sure it is not good practice to mix version stuff like this, but openrc-init is quite simple and I seem to have got away with it ;-)</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Sat, 13 Apr 2019 09:56:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15539#p15539</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15536#p15536</link>
			<description><![CDATA[<div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>I notice that the code you quote from openrc-init is a bit different from that on the github OpenRC.</p><p><a href="https://github.com/OpenRC/openrc/blob/master/src/rc/openrc-init.c" rel="nofollow">https://github.com/OpenRC/openrc/blob/m … nrc-init.c</a></p><p>Their version does not obviously wait for <span class="bbc">do_openrc</span> to finish and <span class="bbc">do_openrc</span> itself appears to <span class="bbc">execlp</span> the runlevel.<br />I am not an expert C coder so I may mis-understand what it is doing, but doesn&#039;t each level just get started asynchronously?</p><p>Geoff</p></div></blockquote></div><p>Just to tidy up-<br />Yes, in effect; it would be &quot;each level just get started asynchronously&quot; from the code change in init(), but the new code moved the waitpid out of from init() down into do_openrc() at line 73: </p><p>while (waitpid(pid, NULL, 0) != pid)</p><p>Thus the return from do_openrc() wont happen until the &quot;whatever we need to do to ensure all has started...&quot;&#160; has actually started.</p><p>EDIT- To clarify; The transition of sysinit-boot-default will not be asynchronously.&#160; atleast in the intent of the coding.</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Sat, 13 Apr 2019 00:01:37 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15536#p15536</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15535#p15535</link>
			<description><![CDATA[<p>I checked Debian unstable, still at .40.3.&#160; Guess its best to wait until the update migrates up through to testing...</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Fri, 12 Apr 2019 23:26:15 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15535#p15535</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15524#p15524</link>
			<description><![CDATA[<p>The Beowulf version I am running is 0.40.3. The latest version on github is 0.41.2 and I see that Debian have noticed that the latest upstream version is 0.41.2. I don&#039;t know how quickly they are likely to pick it up.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 12 Apr 2019 18:27:33 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15524#p15524</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15514#p15514</link>
			<description><![CDATA[<div class="quotebox"><cite>dxrobertson wrote:</cite><blockquote><div><div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>I think that OpenRC does not use the .depends files in init.d, as those files are based on the init runlevels 1 to 6,<br />while OpenRC uses /etc/runlevels/, which in my case are <span class="bbc">sysinit</span>, <span class="bbc">boot</span> and <span class="bbc">default</span>. I am now wondering whether boot and default are starting up before sysinit has finished.</p></div></blockquote></div><p>I thought OpenRC does use the .depend files, at each bootup to generate the /run/openrc directory.&#160; This is how the LSB code in the init scripts ends up being used by OpenRC, and the dependencies all work as expected.&#160; &#160;I played around with this some with some test scripts and it seemed thats the way it worked.&#160; But I may be mistaken, I will look into this further.</p></div></blockquote></div><p>It appears OpenRC does NOT use the .depend.* files in /etc/init.d.&#160; Instead directly using the LSB header info within the scripts.&#160; I ran some tests; changing the #Required-Start: in a particular script in /etc/init.d, and also manually changing the scripts entry in depend.boot to something different from that.&#160; The change to the script file was picked up on next boot, and the change to .depend.boot was not picked up at all.&#160; I then deleted the 3 .depend files, rebooted, and nobody complained.</p><p>The change I made to the script file was reflected in /run/openrc/deptree as well as the actual running of the script, at the next boot after the change.</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Fri, 12 Apr 2019 17:14:09 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15514#p15514</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15511#p15511</link>
			<description><![CDATA[<div class="quotebox"><cite>Geoff 42 wrote:</cite><blockquote><div><p>I see that the changes are recent :-</p><p><a href="https://github.com/OpenRC/openrc/commit/0d378974bfbd69c5427d44c0a43a9f36389aa235#diff-27beb9a9e904a8b574968665898b2411" rel="nofollow">https://github.com/OpenRC/openrc/commit … 65898b2411</a></p><p>and are to do with waiting for the child process.</p><p>Geoff</p><p>Edit: the bug report :-</p><p><a href="https://github.com/OpenRC/openrc/pull/300" rel="nofollow">https://github.com/OpenRC/openrc/pull/300</a></p></div></blockquote></div><p>The code I posted and was looking into was from Debian testing, most likely what you are running.&#160; And as you have found out, there seems to indeed be a problem with the child processes, and the github source is reflecting the current attempts being made to fix it.&#160; There is significant difference in the current Debian code, and the patches reflected in the github version; in the init as well as do_openrc functions.</p>]]></description>
			<author><![CDATA[dummy@example.com (dxrobertson)]]></author>
			<pubDate>Fri, 12 Apr 2019 17:02:28 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15511#p15511</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15507#p15507</link>
			<description><![CDATA[<p>I see that the changes are recent :-</p><p><a href="https://github.com/OpenRC/openrc/commit/0d378974bfbd69c5427d44c0a43a9f36389aa235#diff-27beb9a9e904a8b574968665898b2411" rel="nofollow">https://github.com/OpenRC/openrc/commit … 65898b2411</a></p><p>and are to do with waiting for the child process.</p><p>Geoff</p><p>Edit: the bug report :-</p><p><a href="https://github.com/OpenRC/openrc/pull/300" rel="nofollow">https://github.com/OpenRC/openrc/pull/300</a></p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 12 Apr 2019 16:05:34 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15507#p15507</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15506#p15506</link>
			<description><![CDATA[<p>I notice that the code you quote from openrc-init is a bit different from that on the github OpenRC.</p><p><a href="https://github.com/OpenRC/openrc/blob/master/src/rc/openrc-init.c" rel="nofollow">https://github.com/OpenRC/openrc/blob/m … nrc-init.c</a></p><p>Their version does not obviously wait for <span class="bbc">do_openrc</span> to finish and <span class="bbc">do_openrc</span> itself appears to <span class="bbc">execlp</span> the runlevel.<br />I am not an expert C coder so I may mis-understand what it is doing, but doesn&#039;t each level just get started asynchronously?</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 12 Apr 2019 15:58:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15506#p15506</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15505#p15505</link>
			<description><![CDATA[<p>On the question of dependencies, I thought that in <span class="bbc">/etc/rc.conf</span> I should try :-</p><div class="codebox"><pre><code>rc_depend_strict=&quot;YES&quot;</code></pre></div><p>to see if it made any difference and it didn&#039;t :-(</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 12 Apr 2019 14:45:25 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15505#p15505</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Solved] openrc-init failure]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=15504#p15504</link>
			<description><![CDATA[<p>Away from the dependencies for a moment, I have found the &quot;Official&quot; getty init.d script :-</p><p><a href="https://raw.githubusercontent.com/OpenRC/openrc/master/init.d/agetty.in" rel="nofollow">https://raw.githubusercontent.com/OpenR … /agetty.in</a></p><p>It includes <span class="bbc">supervision</span> and is in the <span class="bbc">openrc-run</span> style.<br />I have edited it a bit, to change the name to getty, for the <span class="bbc">#!/sbin</span> path and to put in the options I like, the <span class="bbc">--noclear</span> leaves the logging messages on the screen. I am not sure about the &quot;keyword -prefix&quot;, which I think may be a Gentoo-ism.</p><div class="codebox"><pre class="vscroll"><code>cat &lt;&lt; EOF &gt; /etc/init.d/getty
#!/sbin/openrc-run
# Copyright (c) 2017 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.

description=&quot;start getty on a terminal line&quot;
supervisor=supervise-daemon
baud=&quot;38400&quot;
port=&quot;${RC_SVCNAME#*.}&quot;
respawn_period=&quot;${respawn_period:-60}&quot;
term_type=&quot;${term_type:-linux}&quot;
getty_options=&quot;--noclear&quot;
command=/sbin/getty
command_args_foreground=&quot;${getty_options} ${port} ${baud} ${term_type}&quot;
pidfile=&quot;/run/${RC_SVCNAME}.pid&quot;

depend() {
	after local
	keyword -prefix
}

start_pre() {
	if [ -z &quot;$port&quot; ]; then
		eerror &quot;${RC_SVCNAME} cannot be started directly. You must create&quot;
		eerror &quot;symbolic links to it for the ports you want to start&quot;
		eerror &quot;getty on and add those to the appropriate runlevels.&quot;
		return 1
	else
		export EINFO_QUIET=&quot;${quiet:-yes}&quot;
	fi
}

stop_pre()
{
	export EINFO_QUIET=&quot;${quiet:-yes}&quot;
}
EOF</code></pre></div><p>This now works correctly and I can see it on ps</p><div class="codebox"><pre><code>$ ps axjf| grep getty
    1  2011   664   664 ?           -1 S        0   0:00 supervise-daemon getty.hvc0 --start --pidfile /run/getty.hvc0.pid --respawn-period 60 /sbin/getty -- --noclear hvc0 38400 linux
 2011  2012  2012  2012 hvc0      2012 Ss+      0   0:00  \_ /sbin/getty --noclear hvc0 38400 linux</code></pre></div><p>I can also see it in /var/log/boot</p><div class="codebox"><pre><code>Fri Apr 12 13:40:21 2019:  * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/networking start
Fri Apr 12 13:40:21 2019: [....] Configuring network interfaces... exim4??7[ ok 8??.
Fri Apr 12 13:40:21 2019:  * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/getty.hvc0 start
Fri Apr 12 13:40:21 2019:  * supervise-daemon: fopen `/run/getty.hvc0.pid&#039;: No such file or directory
Fri Apr 12 13:40:21 2019:  * Detaching to start `/sbin/getty&#039;
Fri Apr 12 13:40:22 2019:  * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/haveged start
Fri Apr 12 13:40:22 2019:  * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/irqbalance start
Fri Apr 12 13:40:22 2019: Internet Systems Consortium DHCP Client 4.4.1</code></pre></div><p>interestingly the PID file does exist from a similar time :-</p><div class="codebox"><pre><code>-rw-r--r-- 1 root root 5 Apr 12 13:40 /run/getty.hvc0.pid</code></pre></div><p>With this now running, I could log in on the console, as the prompt has now appeared.</p><p>Geoff</p>]]></description>
			<author><![CDATA[dummy@example.com (Geoff 42)]]></author>
			<pubDate>Fri, 12 Apr 2019 14:09:16 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=15504#p15504</guid>
		</item>
	</channel>
</rss>
